From: Mike Bayer Date: Mon, 19 Jun 2006 21:52:54 +0000 (+0000) Subject: single space for MySQL appeasement X-Git-Tag: rel_0_2_4~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac56d17a7ea3b19cc5abb786a7cfa9a5b8f0e941;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git single space for MySQL appeasement --- diff --git a/CHANGES b/CHANGES index d5bdb82b30..c4608bbf79 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,9 @@ otherwise still requires you explicitly remove the instance from the previous Session. - fixes to mapper compilation, checking for more error conditions - small fix to eager loading combined with ordering/limit/offset +- utterly remarkable: added a single space between 'CREATE TABLE' +and '(' since *thats how MySQL indicates a non- +reserved word tablename.....* [ticket:206] 0.2.3 - overhaul to mapper compilation to be deferred. this allows mappers diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index 82abb95775..78017bc919 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -606,7 +606,10 @@ class ANSISchemaGenerator(engine.SchemaIterator): raise NotImplementedError() def visit_table(self, table): - self.append("\nCREATE TABLE " + table.fullname + "(") + # the single whitespace before the "(" is significant + # as its MySQL's method of indicating a table name and not a reserved word. + # feel free to localize this logic to the mysql module + self.append("\nCREATE TABLE " + table.fullname + " (") separator = "\n"