From fb577ecd6ffcb91025cf6f2d748d3afdbe1c9657 Mon Sep 17 00:00:00 2001 From: Huai Jiang Date: Wed, 3 Sep 2014 23:25:11 +0800 Subject: [PATCH] Use single quotes for db schema sanity check double quotes would cause failure when mysql running on ANSI sql_mode. Change-Id: I891b61035ecb90b91a9ccdbec14dd567c575299b Closes-Bug:1365019 --- oslo/db/sqlalchemy/migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo/db/sqlalchemy/migration.py b/oslo/db/sqlalchemy/migration.py index d7a17b3..f1cecdd 100644 --- a/oslo/db/sqlalchemy/migration.py +++ b/oslo/db/sqlalchemy/migration.py @@ -93,7 +93,7 @@ def _db_schema_sanity_check(engine): onlyutf8_sql = ('SELECT TABLE_NAME,TABLE_COLLATION ' 'from information_schema.TABLES ' 'where TABLE_SCHEMA=%s and ' - 'TABLE_COLLATION NOT LIKE "%%utf8%%"') + 'TABLE_COLLATION NOT LIKE \'%%utf8%%\'') # NOTE(morganfainberg): exclude the sqlalchemy-migrate and alembic # versioning tables from the tables we need to verify utf8 status on.