diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-06-24 13:06:38 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-06-25 16:43:37 -0400 |
| commit | c99345ee9994c3ea2a5e6536cc3365f18d017cc1 (patch) | |
| tree | 43e68f5a4872398c6c1b0a7304c2413f942c56d5 /lib/sqlalchemy/testing/suite/test_reflection.py | |
| parent | 7d2a581a58e9ca4ffbcb39a384ba6950a966de7a (diff) | |
| download | sqlalchemy-c99345ee9994c3ea2a5e6536cc3365f18d017cc1.tar.gz | |
Use utf8mb4 (or utf8mb3) for all things MySQL
Fixed bug in MySQLdb dialect and variants such as PyMySQL where an
additional "unicode returns" check upon connection makes explicit use of
the "utf8" character set, which in MySQL 8.0 emits a warning that utf8mb4
should be used. This is now replaced with a utf8mb4 equivalent.
Documentation is also updated for the MySQL dialect to specify utf8mb4 in
all examples. Additional changes have been made to the test suite to use
utf8mb3 charsets and databases (there seem to be collation issues in some
edge cases with utf8mb4), and to support configuration default changes made
in MySQL 8.0 such as explicit_defaults_for_timestamp as well as new errors
raised for invalid MyISAM indexes.
Change-Id: Ib596ea7de4f69f976872a33bffa4c902d17dea25
Fixes: #4283
Fixes: #4192
Diffstat (limited to 'lib/sqlalchemy/testing/suite/test_reflection.py')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_reflection.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index 70a2f3f4f..00a5aac01 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -153,14 +153,18 @@ class ComponentReflectionTest(fixtures.TablesTest): cls.define_index(metadata, users) if not schema: + # test_needs_fk is at the moment to force MySQL InnoDB noncol_idx_test_nopk = Table( 'noncol_idx_test_nopk', metadata, Column('q', sa.String(5)), + test_needs_fk=True, ) + noncol_idx_test_pk = Table( 'noncol_idx_test_pk', metadata, Column('id', sa.Integer, primary_key=True), Column('q', sa.String(5)), + test_needs_fk=True, ) Index('noncol_idx_nopk', noncol_idx_test_nopk.c.q.desc()) Index('noncol_idx_pk', noncol_idx_test_pk.c.q.desc()) |
