List:Commits« Previous MessageNext Message »
From:Marc Alff Date:August 6 2008 4:35pm
Subject:bzr commit into mysql-6.0-bugteam branch (marc.alff:2746)
View as plain text  
#At file:///home/malff/BZR-TREE/mysql-6.0-10143/

 2746 Marc Alff	2008-08-06 [merge]
      Merge 6.0-bugteam -> local bugfix branch
modified:
  client/Makefile.am
  scripts/mysql_system_tables_fix.sql
  sql/share/errmsg.txt
  sql/sql_acl.cc
  sql/sql_parse.cc

=== modified file 'client/Makefile.am'
--- a/client/Makefile.am	2008-06-20 11:40:01 +0000
+++ b/client/Makefile.am	2008-08-06 14:39:03 +0000
@@ -88,11 +88,12 @@ mysqlslap_LDADD =		$(CXXLDFLAGS) $(CLIEN
 
 mysqltest_SOURCES=		mysqltest.c
 mysqltest_CFLAGS=		-DTHREAD -UUNDEF_THREADS_HACK
-mysqltest_LDADD =		$(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
+mysqltest_LDADD =		$(CXXLDFLAGS) \
 				@CLIENT_EXTRA_LDFLAGS@ \
 				$(LIBMYSQLCLIENT_LA) \
 				$(top_builddir)/mysys/libmysys.a \
-				$(top_builddir)/regex/libregex.a
+				$(top_builddir)/regex/libregex.a \
+				$(CLIENT_THREAD_LIBS)
 
 mysql_upgrade_SOURCES=          mysql_upgrade.c \
                                 $(top_srcdir)/mysys/my_getpagesize.c

=== modified file 'scripts/mysql_system_tables_fix.sql'
--- a/scripts/mysql_system_tables_fix.sql	2008-04-29 04:37:22 +0000
+++ b/scripts/mysql_system_tables_fix.sql	2008-08-05 21:36:14 +0000
@@ -216,6 +216,52 @@ ALTER TABLE func
   MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
 
 #
+# Convert miscellaneous tables to UTF-8.
+#
+# Tables coming from a old version might have the 3-byte Unicode
+# character set formerly known as utf8.
+#
+
+ALTER TABLE help_category CONVERT TO CHARACTER SET utf8;
+ALTER TABLE help_keyword CONVERT TO CHARACTER SET utf8;
+ALTER TABLE help_relation CONVERT TO CHARACTER SET utf8;
+ALTER TABLE servers CONVERT TO CHARACTER SET utf8;
+ALTER TABLE time_zone CONVERT TO CHARACTER SET utf8;
+ALTER TABLE time_zone_leap_second CONVERT TO CHARACTER SET utf8;
+ALTER TABLE time_zone_name CONVERT TO CHARACTER SET utf8;
+ALTER TABLE time_zone_transition CONVERT TO CHARACTER SET utf8;
+ALTER TABLE time_zone_transition_type CONVERT TO CHARACTER SET utf8;
+
+# Bug#31291: Avoid conversion from text to mediumtext
+ALTER TABLE help_topic
+  MODIFY description text NOT NULL,
+  MODIFY example text NOT NULL,
+CONVERT TO CHARACTER SET utf8;
+
+#
+# Convert log tables to UTF-8.
+#
+
+SET @old_log_state = @@global.general_log;
+SET GLOBAL general_log = 'OFF';
+ALTER TABLE general_log CONVERT TO CHARACTER SET utf8;
+SET GLOBAL general_log = @old_log_state;
+
+SET @old_log_state = @@global.slow_query_log;
+SET GLOBAL slow_query_log = 'OFF';
+ALTER TABLE slow_log CONVERT TO CHARACTER SET utf8;
+SET GLOBAL slow_query_log = @old_log_state;
+
+#
+# Convert plugin table to UTF-8 with binary collation.
+#
+
+ALTER TABLE plugin
+  MODIFY name char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  MODIFY dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
+  CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+
+#
 # Detect whether we had Create_view_priv
 #
 SET @hadCreateViewPriv:=0;
@@ -431,6 +477,13 @@ ALTER TABLE db MODIFY Event_priv enum('N
 #
 # EVENT table
 #
+
+#
+# WARNING: Beware that some columns are added and modified multiple
+# times. Whether adding or modifying the column, it's specification
+# should always be the same.
+#
+
 ALTER TABLE event DROP PRIMARY KEY;
 ALTER TABLE event ADD PRIMARY KEY(db, name);
 # Add sql_mode column just in case.
@@ -499,6 +552,20 @@ ALTER TABLE event ADD body_utf8 longblob
                       AFTER db_collation;
 ALTER TABLE event MODIFY body_utf8 longblob DEFAULT NULL;
 
+#
+# Convert event table to UTF-8 with binary collation.
+#
+
+ALTER TABLE event
+  CONVERT TO CHARACTER SET utf8;
+ALTER TABLE event
+  MODIFY time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
+  MODIFY db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+  MODIFY definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+  MODIFY comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+  MODIFY character_set_client char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+  MODIFY collation_connection char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+  MODIFY db_collation char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL;
 
 #
 # TRIGGER privilege

=== modified file 'sql/share/errmsg.txt'
--- a/sql/share/errmsg.txt	2008-07-18 13:30:53 +0000
+++ b/sql/share/errmsg.txt	2008-08-06 14:39:03 +0000
@@ -4718,7 +4718,7 @@ ER_SLAVE_IGNORED_TABLE  
         swe "Slav SQL tr�den ignorerade fr�gan pga en replicate-*-table regel"
 ER_INCORRECT_GLOBAL_LOCAL_VAR  
         eng "Variable '%-.192s' is a %s variable"
-        serbian "Incorrect foreign key definition for '%-.192s': %s"
+        serbian "Promenljiva '%-.192s' je %s promenljiva"
         ger "Variable '%-.192s' ist eine %s-Variable"
         nla "Variabele '%-.192s' is geen %s variabele"
         spa "Variable '%-.192s' es una %s variable"

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2008-07-17 19:55:18 +0000
+++ b/sql/sql_acl.cc	2008-08-06 14:39:03 +0000
@@ -5811,7 +5811,6 @@ bool mysql_drop_user(THD *thd, List <LEX
 
   while ((tmp_user_name= user_list++))
   {
-    user_name= get_current_user(thd, tmp_user_name);
     if (!(user_name= get_current_user(thd, tmp_user_name)))
     {
       result= TRUE;

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2008-07-28 17:31:04 +0000
+++ b/sql/sql_parse.cc	2008-08-06 14:39:03 +0000
@@ -6645,15 +6645,24 @@ bool reload_acl_and_cache(THD *thd, ulon
       thd->store_globals();
       lex_start(thd);
     }
+    
     if (thd)
     {
-      if (acl_reload(thd))
-        result= 1;
-      if (grant_reload(thd))
+      bool reload_acl_failed= acl_reload(thd);
+      bool reload_grants_failed= grant_reload(thd);
+      bool reload_servers_failed= servers_reload(thd);
+      
+      if (reload_acl_failed || reload_grants_failed || reload_servers_failed)
+      {
         result= 1;
-      if (servers_reload(thd))
-        result= 1; /* purecov: inspected */
+        /*
+          When an error is returned, my_message may have not been called and
+          the client will hang waiting for a response.
+        */
+        my_error(ER_UNKNOWN_ERROR, MYF(0), "FLUSH PRIVILEGES failed");
+      }
     }
+
     if (tmp_thd)
     {
       delete tmp_thd;
@@ -6734,8 +6743,10 @@ bool reload_acl_and_cache(THD *thd, ulon
       tmp_write_to_binlog= 0;
       if (lock_global_read_lock(thd))
 	return 1;                               // Killed
-      result= close_cached_tables(thd, tables, FALSE, (options & REFRESH_FAST) ?
-                                  FALSE : TRUE);
+      if (close_cached_tables(thd, tables, FALSE, (options & REFRESH_FAST) ?
+                                  FALSE : TRUE))
+          result= 1;
+      
       if (make_global_read_lock_block_commit(thd)) // Killed
       {
         /* Don't leave things in a half-locked state */
@@ -6797,8 +6808,8 @@ bool reload_acl_and_cache(THD *thd, ulon
 #ifdef OPENSSL
    if (options & REFRESH_DES_KEY_FILE)
    {
-     if (des_key_file)
-       result=load_des_key_file(des_key_file);
+     if (des_key_file && load_des_key_file(des_key_file))
+         result= 1;
    }
 #endif
 #ifdef HAVE_REPLICATION

Thread
bzr commit into mysql-6.0-bugteam branch (marc.alff:2746) Marc Alff6 Aug