]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Remove silent ignore for skip_locked w/ unsupported backends
authorGord Thompson <gord@gordthompson.com>
Sun, 13 Sep 2020 22:38:13 +0000 (16:38 -0600)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Sep 2020 13:43:00 +0000 (09:43 -0400)
commit31c3ed715ad2e6007bf6b98ae7670cb1a902731c
treef45449f7a27460d44f463a201de50c8224d33a76
parent8455a11bcc23e97afe666873cd872b0f204848d8
Remove silent ignore for skip_locked w/ unsupported backends

For SQLAlchemy 1.4:

The "skip_locked" keyword used with ``with_for_update()`` will render "SKIP
LOCKED" on all MySQL backends, meaning it will fail for MySQL less than
version 8 and on current MariaDB backends.  This is because those backends
do not support "SKIP LOCKED" or any equivalent, so this error should not be
silently ignored.   This is upgraded from a warning in the 1.3 series.

For SQLAlchemy 1.3:

The "skip_locked" keyword used with ``with_for_update()`` will emit a
warning when used on MariaDB backends, and will then be ignored.   This is
a deprecated behavior that will raise in SQLAlchemy 1.4, as an application
that requests "skip locked" is looking for a non-blocking operation which
is not available on those backends.

Fixes: #5578
Change-Id: I49ccb6c6ff46eafed12b77f51e1da8e0e397966c
doc/build/changelog/unreleased_13/5578.rst [new file with mode: 0644]
doc/build/changelog/unreleased_14/5578.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_compiler.py
test/dialect/mysql/test_for_update.py