summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-07-29 05:49:55 +0000
committerJason Kirtland <jek@discorporate.us>2007-07-29 05:49:55 +0000
commitc9cc90bbdc24f8d4d0429468404cd43de46fc07f (patch)
tree738f31216ca0cc7dbea3755cbf30d678bdeb687b /lib/sqlalchemy/databases
parentcbb9e7f191b5bedf7ef7ee53244fda8ab9d4d46b (diff)
downloadsqlalchemy-c9cc90bbdc24f8d4d0429468404cd43de46fc07f.tar.gz
Finish table_names.
Diffstat (limited to 'lib/sqlalchemy/databases')
-rw-r--r--lib/sqlalchemy/databases/mysql.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 859846636..53ef1a95b 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -1092,8 +1092,10 @@ class MySQLDialect(ansisql.ANSIDialect):
return name
def table_names(self, connection, schema):
- s = "SHOW TABLES"
- return [row[0] for row in connection.execute(s)]
+ charset = self._detect_charset(connection)
+ rp = connection.execute("SHOW TABLES FROM %s" %
+ self.preparer().quote_identifier(schema))
+ return [row[0] for row in _compat_fetchall(rp, charset=charset)]
def has_table(self, connection, table_name, schema=None):
# SHOW TABLE STATUS LIKE and SHOW TABLES LIKE do not function properly