From: Mike Bayer Date: Tue, 24 Oct 2006 22:53:36 +0000 (+0000) Subject: - MySQL catches exception on "describe" and reports as NoSuchTableError X-Git-Tag: rel_0_3_1~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=427ee509bb3e8eb4a3700eb668151aca465f121f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - MySQL catches exception on "describe" and reports as NoSuchTableError --- diff --git a/CHANGES b/CHANGES index b19142f92b..bfcf195c1c 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ - the "delete" cascade will load in all child objects, if they were not loaded already. this can be turned off (i.e. the old behavior) by setting passive_deletes=True on a relation(). +- MySQL catches exception on "describe" and reports as NoSuchTableError 0.3.0 - General: diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 86b74c3644..671fbaf416 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -314,7 +314,10 @@ class MySQLDialect(ansisql.ANSIDialect): if not case_sensitive: table.name = table.name.lower() table.metadata.tables[table.name]= table - c = connection.execute("describe " + table.name, {}) + try: + c = connection.execute("describe " + table.name, {}) + except: + raise exceptions.NoSuchTableError(table.name) found_table = False while True: row = c.fetchone()