diff options
author | Jason Kirtland <jek@discorporate.us> | 2007-09-05 19:39:07 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2007-09-05 19:39:07 +0000 |
commit | c3c79b997b4550c1696aa21ffbbe560c30262677 (patch) | |
tree | dcf967ff10a6a9418f18ae05ee0f3db8cf368f12 /lib/sqlalchemy/databases/mysql.py | |
parent | 9717c7170917856e07331796d8439d30ac93006e (diff) | |
download | sqlalchemy-c3c79b997b4550c1696aa21ffbbe560c30262677.tar.gz |
Fixed reflection of the empty string for mysql enums.
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r-- | lib/sqlalchemy/databases/mysql.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 6d5c54578..507876481 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -1106,7 +1106,7 @@ class MSEnum(MSString): self.enums = strip_enums self.strict = kw.pop('strict', False) - length = max([len(v) for v in strip_enums]) + length = max([len(v) for v in strip_enums] + [0]) super(MSEnum, self).__init__(length, **kw) def bind_processor(self, dialect): @@ -2175,7 +2175,7 @@ class MySQLSchemaReflector(object): r'(?:\((\d+)\))?(?=\,|$))+' % quotes) # 'foo' or 'foo','bar' or 'fo,o','ba''a''r' - self._re_csv_str = _re_compile(r'\x27(?:\x27\x27|[^\x27])+\x27') + self._re_csv_str = _re_compile(r'\x27(?:\x27\x27|[^\x27])*\x27') # 123 or 123,456 self._re_csv_int = _re_compile(r'\d+') @@ -2192,7 +2192,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+))?' |