]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Use case insensitive matching on lower_case_table_names=1,2
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 10 Nov 2018 04:18:55 +0000 (23:18 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 10 Nov 2018 04:22:43 +0000 (23:22 -0500)
commit7f1294cbe5683faa77a57f075a962009d3bd2cc4
treea15f4be906a86b862b1196b2bf526be712c006fc
parenteb5d6f9da81e945a0371d1a28a1d4162cc9c2489
Use case insensitive matching on lower_case_table_names=1,2

Fixed regression caused by :ticket:`4344` released in 1.2.13, where the fix
for MySQL 8.0's case sensitivity problem with referenced column names when
reflecting foreign key referents is worked around using the
``information_schema.columns`` view.  The workaround was failing on OSX /
``lower_case_table_names=2`` which produces non-matching casing for the
``information_schema.columns`` vs. that of ``SHOW CREATE TABLE``, so in
case-insensitive SQL modes case-insensitive matching is now used.

Fixes: #4361
Change-Id: I748549bc4c27fad6394593f8ec93fc22bfd01f6c
(cherry picked from commit af159c56957b26c523e7fe324edf7d17882f88be)
doc/build/changelog/unreleased_12/4361.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_reflection.py