summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-05-03 18:07:06 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-05-06 17:29:04 -0400
commitaa94afcdaf4faeacf13836de2475954e06a7fb67 (patch)
tree66fd5e9625d424806bd8e2f656669a686404e343 /lib/sqlalchemy
parent1c3e92627362604472ca483055fc827a97942e6b (diff)
downloadsqlalchemy-aa94afcdaf4faeacf13836de2475954e06a7fb67.tar.gz
Don't warn on multi delete rowcount if supports_sane_multi is False
Fixed an issue where the "number of rows matched" warning would emit even if the dialect reported "supports_sane_multi_rowcount=False", as is the case for psycogp2 with ``use_batch_mode=True`` and others. Fixes: #4661 Change-Id: I93aaf7f597b6083e860ab3cbcd620ba5621c57a8
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/persistence.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py
index 6345ee28a..e9e6975ca 100644
--- a/lib/sqlalchemy/orm/persistence.py
+++ b/lib/sqlalchemy/orm/persistence.py
@@ -1335,6 +1335,7 @@ def _emit_delete_statements(
if (
base_mapper.confirm_deleted_rows
+ and connection.dialect.supports_sane_multi_rowcount
and rows_matched > -1
and expected != rows_matched
):