summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-04-01 19:47:20 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2021-04-01 14:36:13 -0400
commitbe200636a90e0ab5cd54f694c03b6593013665e1 (patch)
tree38255a44850b7adc355e0febffe34d3a4e5e4f7b /lib/sqlalchemy
parent3a29d65f73c6e705f486588068172d45017285fa (diff)
downloadsqlalchemy-be200636a90e0ab5cd54f694c03b6593013665e1.tar.gz
Fix has table reflection on MySQL 5.0 5.1
Fixed regression in the MySQL dialect where the reflection query used to detect if a table exists would fail on very old MySQL 5.0 and 5.1 versions. Fixes: #6151 Change-Id: I48e98542c3a1a49519a5d113e43ba6f917e8580e
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index e6052f69f..b3c338bad 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -2812,7 +2812,7 @@ class MySQLDialect(default.DefaultDialect):
rs = connection.execute(
text(
- "SELECT * FROM information_schema.tables WHERE "
+ "SELECT COUNT(*) FROM information_schema.tables WHERE "
"table_schema = :table_schema AND "
"table_name = :table_name"
).bindparams(