mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user