List:Commits« Previous MessageNext Message »
From:Dmitry Lenev Date:December 2 2010 9:22am
Subject:bzr commit into mysql-trunk-bugfixing branch (Dmitry.Lenev:3396) Bug#27480
View as plain text  
#At file:///home/dlenev/src/bzr/mysql-trunk-bugfixing-bug27480/ based on revid:dmitry.lenev@stripped

 3396 Dmitry Lenev	2010-12-02
      Prerequisite patch for Bug#27480 (Extend CREATE TEMPORARY
      TABLES privilege to allow temp table operations).
      
      Review fixes in progress. Fixed issues discovered by
      flush_read_lock.test.

    modified:
      sql/sql_parse.cc
      sql/sql_update.cc
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-12-01 10:07:22 +0000
+++ b/sql/sql_parse.cc	2010-12-02 09:21:50 +0000
@@ -494,8 +494,8 @@ void init_update_queries(void)
   sql_command_flags[SQLCOM_OPTIMIZE]|=        CF_HA_CLOSE;
   sql_command_flags[SQLCOM_ANALYZE]|=         CF_HA_CLOSE;
   sql_command_flags[SQLCOM_CHECK]|=           CF_HA_CLOSE;
-  sql_command_flags[SQLCOM_CREATE_INDEX]=     CF_HA_CLOSE;
-  sql_command_flags[SQLCOM_DROP_INDEX]=       CF_HA_CLOSE;
+  sql_command_flags[SQLCOM_CREATE_INDEX]|=    CF_HA_CLOSE;
+  sql_command_flags[SQLCOM_DROP_INDEX]|=      CF_HA_CLOSE;
   sql_command_flags[SQLCOM_PRELOAD_KEYS]|=    CF_HA_CLOSE;
   sql_command_flags[SQLCOM_ASSIGN_TO_KEYCACHE]|=  CF_HA_CLOSE;
 }

=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc	2010-11-18 16:34:56 +0000
+++ b/sql/sql_update.cc	2010-12-02 09:21:50 +0000
@@ -1130,6 +1130,10 @@ int mysql_multi_update_prepare(THD *thd)
                        0, 0) ||
           check_grant(thd, want_privilege, tl, FALSE, 1, FALSE))
         DBUG_RETURN(TRUE);
+
+      if (is_temporary_table(tl))
+        tl->table->grant= tl->grant;
+
     }
   }
 


Attachment: [text/bzr-bundle] bzr/dmitry.lenev@oracle.com-20101202092150-wjjmdal1a3qsbmy5.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (Dmitry.Lenev:3396) Bug#27480Dmitry Lenev2 Dec