diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-12-16 21:02:21 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-12-16 21:02:21 +0300 |
commit | 5f0c09dd7220b7ad5709823788e9289fc94ab8fe (patch) | |
tree | c656767fe54a976ffb669926348b9fac198be312 /scripts | |
parent | 5194074be762f169fcc25b9ad0d4013905ba0655 (diff) | |
parent | f1e83a4163458f7e25c709403cc7c7b48a7ef23e (diff) | |
download | mariadb-git-5f0c09dd7220b7ad5709823788e9289fc94ab8fe.tar.gz |
Manual merge from mysql-trunk-merge.
Conflicts:
- include/my_no_pthread.h
- mysql-test/r/sp-ucs2.result
- sql/log.cc
- sql/sql_acl.cc
- sql/sql_yacc.yy
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_system_tables_fix.sql | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index b7bcaeb62c9..8551e4cd6c9 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -420,18 +420,48 @@ ALTER TABLE proc ADD character_set_client ALTER TABLE proc MODIFY character_set_client char(32) collate utf8_bin DEFAULT NULL; +SELECT CASE WHEN COUNT(*) > 0 THEN +CONCAT ("WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (", @@character_set_client, "). Please verify if necessary.") +ELSE NULL +END +AS value FROM proc WHERE character_set_client IS NULL; + +UPDATE proc SET character_set_client = @@character_set_client + WHERE character_set_client IS NULL; + ALTER TABLE proc ADD collation_connection char(32) collate utf8_bin DEFAULT NULL AFTER character_set_client; ALTER TABLE proc MODIFY collation_connection char(32) collate utf8_bin DEFAULT NULL; +SELECT CASE WHEN COUNT(*) > 0 THEN +CONCAT ("WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (", @@collation_connection, "). Please verify if necessary.") +ELSE NULL +END +AS value FROM proc WHERE collation_connection IS NULL; + +UPDATE proc SET collation_connection = @@collation_connection + WHERE collation_connection IS NULL; + ALTER TABLE proc ADD db_collation char(32) collate utf8_bin DEFAULT NULL AFTER collation_connection; ALTER TABLE proc MODIFY db_collation char(32) collate utf8_bin DEFAULT NULL; +SELECT CASE WHEN COUNT(*) > 0 THEN +CONCAT ("WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.") +ELSE NULL +END +AS value FROM proc WHERE db_collation IS NULL; + +UPDATE proc AS p SET db_collation = + ( SELECT DEFAULT_COLLATION_NAME + FROM INFORMATION_SCHEMA.SCHEMATA + WHERE SCHEMA_NAME = p.db) + WHERE db_collation IS NULL; + ALTER TABLE proc ADD body_utf8 longblob DEFAULT NULL AFTER db_collation; ALTER TABLE proc MODIFY body_utf8 longblob DEFAULT NULL; |