]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use a full ConnectionCharacteristic for logging_token
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Mar 2024 13:59:44 +0000 (09:59 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Mar 2024 15:01:59 +0000 (11:01 -0400)
commita124a593c86325389a92903d2b61f40c34f6d6e2
treeea384883ed4a66bf935d1dd5698be8afe8373485
parenta40b9f3704b095e3406a2e41bf2d0e7a963f2f38
use a full ConnectionCharacteristic for logging_token

Fixed issue in the
:paramref:`_engine.Connection.execution_options.logging_token` option,
where changing the value of ``logging_token`` on a connection that has
already logged messages would not be updated to reflect the new logging
token.  This in particular prevented the use of
:meth:`_orm.Session.connection` to change the option on the connection,
since the BEGIN logging message would already have been emitted.

Fixes: #11210
Change-Id: I0ddade3778215259a6eacde3a67e09d30bc3257b
doc/build/changelog/unreleased_20/11210.rst [new file with mode: 0644]
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/characteristics.py
lib/sqlalchemy/engine/default.py
test/engine/test_logging.py