List:Commits« Previous MessageNext Message »
From:kroki Date:March 13 2007 6:15pm
Subject:bk commit into 5.1 tree (kroki:1.2464) BUG#18326
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomash. When tomash 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-03-13 21:15:29+03:00, kroki@stripped +1 -0
  Fix the bug introduced with the push of the fix for bug#18326: Do not
  lock table for writing during prepare of statement.
  
  When single call open_normal_and_derived_tables() was used, we never
  set table_count to the right value.  This patch reverts the part of
  the old code that does open_tables() (and sets table_count), then
  checks if table_list->multitable_view is set (and returns if so, using
  table_count value), and only then it does mysql_handle_derived().

  sql/sql_prepare.cc@stripped, 2007-03-13 21:15:24+03:00, kroki@stripped +8 -1
    Fix the bug introduced with the push of the fix for bug#18326: Do not
    lock table for writing during prepare of statement.
    
    When single call open_normal_and_derived_tables() was used, we never
    set table_count to the right value.  This patch reverts the part of
    the old code that does open_tables() (and sets table_count), then
    checks if table_list->multitable_view is set (and returns if so, using
    table_count value), and only then it does mysql_handle_derived().

# 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:	kroki
# Host:	moonlight.home
# Root:	/home/tomash/src/mysql_ab/mysql-5.1-bug18326

--- 1.204/sql/sql_prepare.cc	2007-03-13 21:15:39 +03:00
+++ 1.205/sql/sql_prepare.cc	2007-03-13 21:15:39 +03:00
@@ -1142,7 +1142,7 @@ static int mysql_test_update(Prepared_st
   DBUG_ENTER("mysql_test_update");
 
   if (update_precheck(thd, table_list) ||
-      open_normal_and_derived_tables(thd, table_list, 0))
+      open_tables(thd, &table_list, &table_count, 0))
     goto error;
 
   if (table_list->multitable_view)
@@ -1154,6 +1154,13 @@ static int mysql_test_update(Prepared_st
     /* convert to multiupdate */
     DBUG_RETURN(2);
   }
+
+  /*
+    thd->fill_derived_tables() is false here for sure (because it is
+    preparation of PS, so we even do not check it).
+  */
+  if (mysql_handle_derived(thd->lex, &mysql_derived_prepare))
+    goto error;
 
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   /* TABLE_LIST contain right privilages request */
Thread
bk commit into 5.1 tree (kroki:1.2464) BUG#18326kroki13 Mar