List:Commits« Previous MessageNext Message »
From:dlenev Date:May 10 2006 12:12pm
Subject:bk commit into 5.0 tree (dlenev:1.2121)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of dlenev. When dlenev 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
  1.2121 06/05/10 14:12:32 dlenev@stripped +1 -0
  Follow-up for the patch for bugs #12472/#15137 "CREATE TABLE ... SELECT ...
  which explicitly or implicitly uses stored function gives 'Table not locked'
  error"
  
  Test case for these bugs crashed in --ps-protocol mode. The crash was caused
  by incorrect usage of check_grant() routine from create_table_precheck()
  routine. The former assumes that either number of tables to be inspected by
  it is limited explicitly (i.e. is is not UINT_MAX) or table list used and
  thd->lex->query_tables_own_last value correspond to each other.
  create_table_precheck() was not fulfilling this condition and crash happened.
  The fix simply sets number of tables to be inspected by check_grant() to 1.

  sql/sql_parse.cc
    1.544 06/05/10 14:12:25 dlenev@stripped +1 -1
    create_table_precheck():
      At the moment when create_table_precheck() is called TABLE_LIST element
      representing table to be created does not belong to global table list
      therefore we should limit number of tables to be inspected by check_grant()
      explicitly (as in this case table list passed to this function does not
      correspond to thd->lex->query_tables_own_last value).

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	dlenev
# Host:	jabberwock.site
# Root:	/home/dlenev/mysql-5.0-bg12472

--- 1.543/sql/sql_parse.cc	2006-05-03 18:02:37 +04:00
+++ 1.544/sql/sql_parse.cc	2006-05-10 14:12:25 +04:00
@@ -7227,7 +7227,7 @@
 			       lex->create_info.merge_list.first))
     goto err;
   if (grant_option && want_priv != CREATE_TMP_ACL &&
-      check_grant(thd, want_priv, create_table, 0, UINT_MAX, 0))
+      check_grant(thd, want_priv, create_table, 0, 1, 0))
     goto err;
 
   if (select_lex->item_list.elements)
Thread
bk commit into 5.0 tree (dlenev:1.2121)dlenev10 May