diff options
author | Elena Stepanova <elenst@montyprogram.com> | 2014-04-11 02:10:03 +0400 |
---|---|---|
committer | Elena Stepanova <elenst@montyprogram.com> | 2014-04-11 02:10:03 +0400 |
commit | a7962ea53e74cf2bca5efbd8f9e9b77526644261 (patch) | |
tree | b8f81915a056bb9fa4eeef97693ddb3bcfa78b1c /scripts | |
parent | 5fffa449edd9d7953236a9ce88b9b4cdda300ad9 (diff) | |
download | mariadb-git-a7962ea53e74cf2bca5efbd8f9e9b77526644261.tar.gz |
MDEV-6068 Upgrade removes all changes to 'mysql' database
10.0 variation of the problem was that system tables were altered
during mysql_upgrade process using old (smaller) column lengths.
At the end the tables were altered again, so the structure was restored,
but if there were long values before the upgrade, they were truncated.
Fixed by using correct column length in alter statements.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_system_tables_fix.sql | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 45c862e1420..dbfe1fa5c8c 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -62,9 +62,9 @@ ALTER TABLE tables_priv ALTER TABLE tables_priv MODIFY Host char(60) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', - MODIFY User char(16) NOT NULL default '', + MODIFY User char(80) NOT NULL default '', MODIFY Table_name char(64) NOT NULL default '', - MODIFY Grantor char(77) NOT NULL default '', + MODIFY Grantor char(141) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; @@ -90,7 +90,7 @@ ALTER TABLE columns_priv ALTER TABLE columns_priv MODIFY Host char(60) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', - MODIFY User char(16) NOT NULL default '', + MODIFY User char(80) NOT NULL default '', MODIFY Table_name char(64) NOT NULL default '', MODIFY Column_name char(64) NOT NULL default '', ENGINE=MyISAM, @@ -161,7 +161,7 @@ alter table func comment='User defined functions'; # and reset all char columns to correct width ALTER TABLE user MODIFY Host char(60) NOT NULL default '', - MODIFY User char(16) NOT NULL default '', + MODIFY User char(80) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; ALTER TABLE user MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '', @@ -191,7 +191,7 @@ ALTER TABLE user ALTER TABLE db MODIFY Host char(60) NOT NULL default '', MODIFY Db char(64) NOT NULL default '', - MODIFY User char(16) NOT NULL default '', + MODIFY User char(80) NOT NULL default '', ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; ALTER TABLE db MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, @@ -449,7 +449,7 @@ ALTER TABLE proc CONVERT TO CHARACTER SET utf8; ALTER TABLE proc MODIFY db char(64) collate utf8_bin DEFAULT '' NOT NULL, MODIFY definer - char(77) collate utf8_bin DEFAULT '' NOT NULL, + char(141) collate utf8_bin DEFAULT '' NOT NULL, MODIFY comment char(64) collate utf8_bin DEFAULT '' NOT NULL; |