]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- MySQL catches exception on "describe" and reports as NoSuchTableError
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Oct 2006 22:53:36 +0000 (22:53 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 24 Oct 2006 22:53:36 +0000 (22:53 +0000)
CHANGES
lib/sqlalchemy/databases/mysql.py

diff --git a/CHANGES b/CHANGES
index b19142f92bc7a6b6d65939938a2a76584e00875e..bfcf195c1c13c3340c9709aed048ba625f576410 100644 (file)
--- 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:
index 86b74c364459efb84b12fe405e8382704c40f41f..671fbaf4165dfdaacc534aa294cde1f94e784599 100644 (file)
@@ -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()