diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-10-19 20:18:34 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-10-19 20:18:41 +0200 |
commit | d851dd619f9e373c453355fd613088488e2c3d5c (patch) | |
tree | 151e3f51cd7bcfbb11d4e26a4107dddc2296de0d /scripts/mysql_system_tables_fix.sql | |
parent | e31e697f17f79ffa6913499e7e2d29866f24b475 (diff) | |
download | mariadb-git-d851dd619f9e373c453355fd613088488e2c3d5c.tar.gz |
MDEV-13912 mysql_upgrade: case (in)sensitivity for stored procedures
mysql_upgrade used to convert all columns of mysql.db to
utf8_general_ci and then back to utf8_bin. In two separate ALTER's.
This failed if UNIQUE indexes in mysql.db contained entries
that differ only in the letter case.
Diffstat (limited to 'scripts/mysql_system_tables_fix.sql')
-rw-r--r-- | scripts/mysql_system_tables_fix.sql | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 9bc61f38cea..dd792ce9f2f 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -468,15 +468,15 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL, DEFAULT CHARACTER SET utf8; # Correct the character set and collation -ALTER TABLE proc CONVERT TO CHARACTER SET utf8; # Reset some fields after the conversion SET @alter_statement = CONCAT(" -ALTER TABLE proc MODIFY db - char(64) collate utf8_bin DEFAULT '' NOT NULL, +ALTER TABLE proc CONVERT TO CHARACTER SET utf8, + MODIFY db + char(64) binary DEFAULT '' NOT NULL, MODIFY definer - char(", @definer_name_length, ") collate utf8_bin DEFAULT '' NOT NULL, + char(", @definer_name_length, ") binary DEFAULT '' NOT NULL, MODIFY comment - char(64) collate utf8_bin DEFAULT '' NOT NULL + char(64) binary DEFAULT '' NOT NULL "); PREPARE alter_stmt FROM @alter_statement; EXECUTE alter_stmt; |