Fixed bug where ORM relationship would warn against conflicting sync
targets (e.g. two relationships would both write to the same column) for
sibling classes in an inheritance hierarchy, where the two relationships
would never actually conflict during writes.
Change-Id: I9367a7978cadc59066e89fc4917d7eb6c78dedee
Fixes: #4078
(cherry picked from commit 8ba8dd23b7)
One test appears to use some awkward calling style
with the current_date function that isn't working in pg10
anymore, this looks like an extremely
old test that can be removed
Also cherry-picks f846a789b7 from master
to repair 'postgres'-deprecation warning test for multiple
calls within a single process
Change-Id: I5f8aee0f5ed423461be5a9060c812eb0acdc7df5
(cherry picked from commit 67ee56be69)
Fixed bug where SQLite CHECK constraint reflection would fail
if the referenced table were in a remote schema, e.g. on SQLite a
remote database referred to by ATTACH.
Also add suite support for general CHECK constraint reflection.
Change-Id: I073a72cb47dc4f8c5683000d708768523759332f
Fixes: #4099
(cherry picked from commit 68b52c48b7)
Fixed issue where CURRENT_TIMESTAMP would not reflect correctly
in the MariaDB 10.2 series due to a syntax change, where the function
is now represented as ``current_timestamp()``.
Fixes: #4096
MariaDB 10.2 now supports CHECK constraints (warning: use version 10.2.9
or greater due to upstream issues noted in 🎫`4097`). Reflection
now takes these CHECK constraints into account when they are present in
the ``SHOW CREATE TABLE`` output.
Fixes: #4098
Change-Id: I8666d61814e8145ca12cbecad94019b44af868e3
(cherry picked from commit 29b752f8b2)
The changeset in c88d4d0 takes advantage of a
mariadb function that got randomly committed as part
of the SQL server fixup in 2efd89d029, not
part of rel_1_1. The change here was not reviewed or tested
in gerrit and breaks the main branch.
Change-Id: I41746f890e6e82acfb12e78f174d00d7ba7d19d4
Fixes: #4097
Two independent gerrits for 04bbad660b
and ec1700ba29 produce a failure
when merged due to new warning.
will merge into rel_1_1 as well for completeness even though
warning is not there.
Change-Id: I1bd494d205107d8b2a30d475a22c61a59b70985b
(cherry picked from commit 21ff71b0eb)
There's a few CHECK constraint issues we managed
to get resolved as of MariaDB 10.2.8 then 10.2.9. They
are pretty severe so warn users for these particular mariadb
versions.
Change-Id: Ie0899f94fda25960975ebee72f3044370f43eb7c
Fixes: #4097
(cherry picked from commit 21bf37f6e4)
Moved the SQL server error codes out of connnectors/pyodbc.py
and into mssql/pyodbc.py. Added complete list
of odbc-related disconnect codes.
Change-Id: Icd84a920dbfa1f188847f859654ff6f7a48170f1
Fixes: #4095
(cherry picked from commit 6a38697261)
Fixed bug where the recently added :meth:`.ColumnOperators.any_`
and :meth:`.ColumnOperators.all_` methods didn't work when called
as methods, as opposed to using the standalone functions
:func:`~.expression.any_` and :func:`~.expression.all_`. Also
added documentation examples for these relatively unintuitive
SQL operators.
Change-Id: I3e56b463e9fd146a077b9970624f50cba27f9811
Fixes: #4093
(cherry picked from commit 944c662d8a)
Made further fixes to the :class:`.ARRAY` class in conjunction with
COLLATE, as the fix made in 🎫`4006` failed to accommodate
for a multidimentional array.
Change-Id: If3e438f8ce94ebae2196671c88a4914f3b743e60
Fixes: #4006
(cherry picked from commit 6652f72352)
A use case has been identified for __table_cls__, which was
added in 1.0 just for the purpose of test fixtures. Add this to
public API and ensure the target use case (conditional table generation)
stays supported.
Change-Id: I87be5bcb72205cab89871fa586663bf147450995
Fixes: #4082
(cherry picked from commit 04bbad660b)
Fixed bug in Postgresql :meth:`.postgresql.dml.Insert.on_conflict_do_update`
which would prevent the insert statement from being used as a CTE,
e.g. via :meth:`.Insert.cte`, within another statement.
Change-Id: Ie20972a05e194290bc9d92819750845872949ecc
Fixes: #4074
(cherry picked from commit 7051653610)
Fixed bug in :meth:`.Session.merge` following along similar lines as that
of 🎫`4030`, where an internal check for a target object in
the identity map could lead to an error if it were to be garbage collected
immediately before the merge routine actually retrieves the object.
Change-Id: Ifecfb8b9d50c52d0ebd5a03e1bd69fe3abf1dc40
Fixes: #4069
(cherry picked from commit bfad032017fde2e519ad5eacc0011a71bf7a22a9)
An :class:`.InvalidRequestError` is raised when a :func:`.synonym`
is used against an attribute that is not against a :class:`.MapperProperty`,
such as an association proxy. Previously, a recursion overflow would
occur trying to locate non-existent attributes.
Change-Id: If2ce38c429a69951df4c94b71b74edbd59d775e3
Fixes: #4067
(cherry picked from commit 130f31ca79)
Fixed race condition in ORM identity map which would cause objects
to be inappropriately removed during a load operation, causing
duplicate object identities to occur, particularly under joined eager
loading which involves deduplication of objects. The issue is specific
to garbage collection of weak references and is observed only under the
Pypy interpreter.
Change-Id: I9f6ae3fe5b078f26146af82b15d16f3a549a9032
Fixes: #4068
(cherry picked from commit 37c5ed2ed9)
mysqlclient as of 1.3.11 changed the exception
class for a particular disconnect situation from
InterfaceError to InternalError; the disconnection
detection logic now accommodates this.
Change-Id: I294f90f794491fd363548719222d8e3008480615
Fixes: #4065
(cherry picked from commit 65680b2343)
Fixed bug in :meth:`.Session.merge` where objects in a collection that had
the primary key attribute set to ``None`` for a key that is typically
autoincrementing would be considered to be a database-persisted key for
part of the internal deduplication process, causing only one object to
actually be inserted in the database.
Change-Id: I0a6e00043be0b2979cda33740e1be3b430ecf8c7
Fixes: #4056
Altered the range specification for window functions to allow
for two of the same PRECEDING or FOLLOWING keywords in a range
by allowing for the left side of the range to be positive
and for the right to be negative, e.g. (1, 3) is
"1 FOLLOWING AND 3 FOLLOWING".
Change-Id: I7d3a6c641151bb49219104968d18dac2266f3db8
Fixes: #4053
(cherry picked from commit 3a5bbe4cbe)
Fixed bug where an :func:`.undefer_group` option would not be recognized
if it extended from a relationship that was loading using joined eager
loading.
In particular we need to double check the column both in terms of
the given "adapter" as well as without applying the "adapter"
when searching for the column in the result.
As we now avoid redoing the row processor step we also
improve on callcounts in joined eager loading.
Change-Id: I0f48766f12f7299f4626ff41a00bf1f5bfca5f3b
Fixes: #4048
(cherry picked from commit eee9dfd4514801f0c67f71632fc722731171479b)
The change in de1f8f8345
modified how test classes are named, breaking logic that
extracts the class name for the profiling suite.
Add a new variable _sa_orig_cls_name if we've modified the
name so that the profiling logic doesn't need to guess
the original class name.
Change-Id: Ica15a97408b9e0749a78c87f62749c15c1627009
(cherry picked from commit bb9d511e52)
Improve screen output to illustrate which server version is
running for a particular database config, and additionally
allow full overriding for the backend-specific targets in
tox.ini via environment variables, so that CI can inject
multiple server urls for a particular database such as MySQL/MariaDB.
Change-Id: Ibf443bb9fb82e4563efd1bb66058fa9989aa2fda
(cherry picked from commit de1f8f8345)
Fixed more regressions caused by cx_Oracle 6.0; at the moment, the only
behavioral change for users is disconnect detection now detects for
cx_Oracle.DatabaseError in addition to cx_Oracle.InterfaceError, as
this behavior seems to have changed. Other issues regarding numeric
precision and uncloseable connections are pending with the upstream
cx_Oracle issue tracker.
Change-Id: Id61f1e33b21c155a598396340dfdecd28ff4066b
Fixes: #4045
(cherry picked from commit 03255a5a0f)
PG CREATE DATABASE. as nobody will connect to it that would
solve the contention issue here
- backport --nomemory since tox.ini is using it
Change-Id: I00a4d52091876e120faff4a8a5493c53280d96f1
(cherry picked from commit 4c30681839)