Commits

Mike Bayer  committed 915c77c

undo that change with the _, it doesn't break round trips

  • Participants
  • Parent commits 3aaff9a

Comments (0)

Files changed (3)

   - a CREATE TABLE will put the COLLATE option 
     after CHARSET, which appears to be part of 
     MySQL's arbitrary rules regarding if it will actually
-    work or not.  [ticket:2225]
-
-  - reflecting a MySQL table will ensure that the 
-    options added to the Table at the table.kwargs
-    level have spaces converted to underscores.
-    This is a slight behavioral change specifically
-    to the "mysql_default_charset" option which 
-    previously would not be symmetrical.
+    work or not.  [ticket:2225]  Also in 0.6.9.
 
 - mssql
   - Changes to attempt support of FreeTDS 0.91 with 

File lib/sqlalchemy/dialects/mysql/base.py

             options.pop(nope, None)
 
         for opt, val in options.items():
-            state.table_options['%s_%s' % (self.dialect.name, opt.replace(' ', '_'))] = val
+            state.table_options['%s_%s' % (self.dialect.name, opt)] = val
 
     def _parse_column(self, line, state):
         """Extract column details.

File test/dialect/test_mysql.py

         m2 = MetaData(testing.db)
         t2 = Table('foo', m2, autoload=True)
         eq_(t2.kwargs['mysql_collate'], 'utf8_unicode_ci')
-        # this is also testing that the names coming
-        # back get an underscore _ in them
-        eq_(t2.kwargs['mysql_default_charset'], 'utf8')
+        eq_(t2.kwargs['mysql_default charset'], 'utf8')
 
     @testing.exclude('mysql', '<', (5, 0, 5), 'a 5.0+ feature')
     @testing.fails_on('mysql+oursql', 'some round trips fail, oursql bug ?')
 
         assert reflected.kwargs['mysql_engine'] == 'MEMORY'
         assert reflected.kwargs['mysql_comment'] == comment
-        assert reflected.kwargs['mysql_default_charset'] == 'utf8'
+        assert reflected.kwargs['mysql_default charset'] == 'utf8'
         assert reflected.kwargs['mysql_avg_row_length'] == '3'
         assert reflected.kwargs['mysql_connection'] == 'fish'