]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add error code 1049 for mysql has_table
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Feb 2023 18:54:56 +0000 (13:54 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Feb 2023 21:06:11 +0000 (16:06 -0500)
commit662d6e24526bfd9d358b8a9e1906fb29bf93ef30
treecd473a0b48312f599ec7a7d65ef43cd617420a41
parentce7922dfd001a0e9fc0914ec217c950acc5e0e5f
add error code 1049 for mysql has_table

Fixed regression caused by issue :ticket:`9058` which adjusted the MySQL
dialect's ``has_table()`` to again use "DESCRIBE", where the specific error
code raised by MySQL version 8 when using a non-existent schema name was
unexpected and failed to be interpreted as a boolean result.

Fixed the SQLite dialect's ``has_table()`` function to correctly report
False for queries that include a non-None schema name for a schema that
doesn't exist; previously, a database error was raised.

Fixes: #9251
Change-Id: I5ef9cf0887865c3c521d88bca0ba18954a108241
doc/build/changelog/unreleased_20/9251.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/testing/suite/test_reflection.py