hey Marcin - Seems like Jason Kirtland is out today. Any chance you could add a simple test case to test/dialect/mysql.py for this ? It might go quite nicely into test_type_reflection(). We generally like to add unit tests at the same time bugs like these are fixed.
- mike On Sep 5, 2007, at 12:48 PM, Marcin Kasperski wrote: > Attached patch seems to resolve both problems. > > > > > poprawione > > diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/ > databases/mysql.py > --- a/lib/sqlalchemy/databases/mysql.py > +++ b/lib/sqlalchemy/databases/mysql.py > @@ -1106,7 +1106,10 @@ class MSEnum(MSString): > > self.enums = strip_enums > self.strict = kw.pop('strict', False) > - length = max([len(v) for v in strip_enums]) > + if strip_enums: > + length = max([len(v) for v in strip_enums]) > + else: > + length = 30 # some heuristics... > super(MSEnum, self).__init__(length, **kw) > > def bind_processor(self, dialect): > @@ -2192,7 +2195,7 @@ class MySQLSchemaReflector(object): > r'%(iq)s(?P<name>(?:%(esc_fq)s|[^%(fq)s])+)%(fq)s +' > r'(?P<coltype>\w+)' > r'(?:\((?P<arg>(?:\d+|\d+,\d+|' > - r'(?:\x27(?:\x27\x27|[^\x27])+\x27,?)+))\))?' > + r'(?:\x27(?:\x27\x27|[^\x27])*\x27,?)+))\))?' > r'(?: +(?P<unsigned>UNSIGNED))?' > r'(?: +(?P<zerofill>ZEROFILL))?' > r'(?: +CHARACTER SET +(?P<charset>\w+))?' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---