]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
narrow scope of _correct_for_mysql_bugs_88718_96365 rel_2_0
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Apr 2026 13:30:35 +0000 (09:30 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 21 Apr 2026 14:58:45 +0000 (10:58 -0400)
commite10faf27cd7a0044cef5ffe9c69a5dd043b8dea0
tree0f43fb8cf77302cbef12cccc244ce96e5efe9234
parent950b20a808aec946f04df9126dbccfa5f23ba17b
narrow scope of _correct_for_mysql_bugs_88718_96365

Narrowed the scope of the internal workaround for MySQL bugs `#88718
<https://bugs.mysql.com/bug.php?id=88718>`_ and `#96365
<https://bugs.mysql.com/bug.php?id=96365>`_ so that it is only applied
where needed: MySQL 8.0.1 through 8.0.13 (where bug 88718 is present), and
on systems with ``lower_case_table_names=2`` (where bug 96365 applies,
typically macOS).  Previously the workaround was applied unconditionally
for all MySQL 8.0+ versions, which caused a ``KeyError`` during foreign key
reflection when the database user lacked SELECT privileges on referred
tables.

Fixes: #13243
Change-Id: I7c29f67d1653c5cd32f29e098f038fea1d56117b
(cherry picked from commit 530e1f71e74263ee9e23245071af2557aa65d425)
doc/build/changelog/unreleased_20/13243.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_dialect.py