]> git.pld-linux.org Git - packages/mysql.git/commitdiff
This commit was manufactured by cvs2git to create branch 'MYSQL_5_0'.
authorcvs2git <feedback@pld-linux.org>
Wed, 24 Oct 2007 09:49:00 +0000 (09:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Cherrypick from master 2007-10-24 09:49:00 UTC Elan Ruusamäe <glen@pld-linux.org> '- commit 36146':
    mysql-bug-16470.patch -> 1.1
    mysql-bug-27694.patch -> 1.2
    mysql-bug-29082.patch -> 1.1

mysql-bug-16470.patch [new file with mode: 0644]
mysql-bug-27694.patch [new file with mode: 0644]
mysql-bug-29082.patch [new file with mode: 0644]

diff --git a/mysql-bug-16470.patch b/mysql-bug-16470.patch
new file mode 100644 (file)
index 0000000..28e39c4
--- /dev/null
@@ -0,0 +1,59 @@
+From: kpettersson
+Date: October 23 2007 4:07pm
+Subject: bk commit into 5.0 tree (thek:1.2537) BUG#16470
+
+Below is the list of changes that have just been committed into a local
+5.0 repository of thek. When thek does a push these changes will
+be propagated to the main repository and, within 24 hours after the
+push, to the public repository.
+For information on how to access the public repository
+see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
+
+ChangeSet@stripped, 2007-10-23 16:07:32+02:00, thek@adventure.(none) +1 -0
+  Bug #16470 crash on grant if old grant tables
+  
+  If a user upgraded the server without running mysql_upgrade, and later tried
+  to run a GRANT command on grant tables like tables_priv, the server would
+  crash.
+  
+  This patch fixes this problem by checking if the grant tables were properly
+  initialized before attempt to store any new grants.
+
+  sql/sql_acl.cc@stripped, 2007-10-23 16:07:31+02:00, thek@adventure.(none) +9 -3
+    If grant_reload fails, don't try to store new GRANTs because the grant tables
+    weren't properly initialized.
+
+diff -Nrup a/sql/sql_acl.cc b/sql/sql_acl.cc
+--- a/sql/sql_acl.cc   2007-06-20 14:24:27 +02:00
++++ b/sql/sql_acl.cc   2007-10-23 16:07:31 +02:00
+@@ -2786,7 +2786,12 @@ bool mysql_table_grant(THD *thd, TABLE_L
+                MYF(0));
+     DBUG_RETURN(TRUE);
+   }
+-
++  if (!grant_option)
++  {
++    my_message(ER_TABLE_NEEDS_UPGRADE, ER(ER_ILLEGAL_GRANT_FOR_TABLE),
++                MYF(0));
++    DBUG_RETURN(TRUE);
++  }
+   if (!revoke_grant)
+   {
+     if (columns.elements)
+@@ -3335,13 +3340,14 @@ my_bool grant_init()
+     DBUG_RETURN(1);                           /* purecov: deadcode */
+   thd->thread_stack= (char*) &thd;
+   thd->store_globals();
+-  return_val=  grant_reload(thd);
++  if (grant_reload(thd))
++    return TRUE;
+   delete thd;
+   /* Remember that we don't have a THD */
+   my_pthread_setspecific_ptr(THR_THD,  0);
+   /* Set the grant option flag so we will check grants */
+   grant_option= TRUE;
+-  DBUG_RETURN(return_val);
++  DBUG_RETURN(FALSE);
+ }
diff --git a/mysql-bug-27694.patch b/mysql-bug-27694.patch
new file mode 100644 (file)
index 0000000..4dba319
--- /dev/null
@@ -0,0 +1,10 @@
+--- mysql-5.0.41/scripts/mysqlhotcopy.sh~      2007-06-21 14:17:42.000000000 +0300
++++ mysql-5.0.41/scripts/mysqlhotcopy.sh       2007-06-21 14:17:43.671033114 +0300
+@@ -840,6 +840,7 @@
+     my $quote = $dbh->get_info(29); # SQL_IDENTIFIER_QUOTE_CHAR
+     if ($quote) {
+       foreach (@dbh_tables) {
++        s/$quote.+$quote\.//; # perl-DBD-mysql-4.003 fix
+         s/^$quote(.*)$quote$/$1/;
+         s/$quote$quote/$quote/g;
+       }
diff --git a/mysql-bug-29082.patch b/mysql-bug-29082.patch
new file mode 100644 (file)
index 0000000..0cb62d9
--- /dev/null
@@ -0,0 +1,16 @@
+--- mysql-5.0.41/scripts/mysqlhotcopy.sh~      2007-06-21 14:37:22.000000000 +0300
++++ mysql-5.0.41/scripts/mysqlhotcopy.sh       2007-06-21 14:37:24.924257114 +0300
+@@ -605,7 +605,12 @@
+       # add recursive option for scp
+       $cp.= " -r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/;
+-      my @non_raid = map { "'$_'" } grep { ! m:/$raid_dir_regex/[^/]+$: } @$files;
++      my @non_raid;
++      if (@$raid_dirs) {
++          @non_raid = map { "'$_'" } grep { ! m:/$raid_dir_regex/[^/]+$: } @$files;
++      } else {
++          @non_raid = @$files;
++      }
+       # add files to copy and the destination directory
+       safe_system( $cp, @non_raid, "'$target'" ) if (@non_raid);
This page took 0.179117 seconds and 4 git commands to generate.