diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-12-07 17:24:09 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-12-07 17:24:09 -0500 |
| commit | 3f42743d6aa1326a80a0ed720a92266aa5fbf209 (patch) | |
| tree | 8f67c6c50753df23e759fdfee73c79072260718d /test/dialect | |
| parent | d7eae8c95ca8c5963fc78fc997ed0f2da76aed31 (diff) | |
| download | sqlalchemy-3f42743d6aa1326a80a0ed720a92266aa5fbf209.tar.gz | |
- Fixed bug in MySQL reflection where the "fractional sections portion"
of the :class:`.mysql.DATETIME`, :class:`.mysql.TIMESTAMP` and
:class:`.mysql.TIME` types would be incorrectly placed into the
``timestamp`` attribute, which is unused by MySQL, instead of the
``fsp`` attribute.
fixes #3602
Diffstat (limited to 'test/dialect')
| -rw-r--r-- | test/dialect/mysql/test_reflection.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/dialect/mysql/test_reflection.py b/test/dialect/mysql/test_reflection.py index 024567828..09499fae4 100644 --- a/test/dialect/mysql/test_reflection.py +++ b/test/dialect/mysql/test_reflection.py @@ -72,8 +72,14 @@ class TypeReflectionTest(fixtures.TestBase): specs = [] for type_ in (mysql.TIMESTAMP, mysql.DATETIME, mysql.TIME): - typespec = type_() - specs.append((typespec, typespec)) + # MySQL defaults fsp to 0, and if 0 does not report it. + # we don't actually render 0 right now in DDL but even if we do, + # it comes back blank + for fsp in (None, 0, 5): + if fsp: + specs.append((type_(fsp=fsp), type_(fsp=fsp))) + else: + specs.append((type_(), type_())) specs.extend([ (TIMESTAMP(), mysql.TIMESTAMP()), |
