List:Internals« Previous MessageNext Message »
From:Heikki Tuuri Date:May 27 2005 4:05pm
Subject:bk commit into 5.0 tree (heikki:1.1929) BUG#10746
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of heikki. When heikki 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.1929 05/05/27 17:04:50 heikki@stripped +1 -0
  ha_innodb.cc:
    Check in Jan's fix to bug #10746 and also add a note to ::start_stmt() that stored
procs in 5.0 call it

  sql/ha_innodb.cc
    1.212 05/05/27 17:03:53 heikki@stripped +8 -5
    Check in Jan's fix to bug #10746 and also add a note to ::start_stmt() that stored
procs in 5.0 call it

# 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:	heikki
# Host:	hundin.mysql.fi
# Root:	/home/heikki/mysql-5.0

--- 1.211/sql/ha_innodb.cc	Thu May 26 20:54:24 2005
+++ 1.212/sql/ha_innodb.cc	Fri May 27 17:03:53 2005
@@ -5764,7 +5764,12 @@
 TABLES. Inside LOCK TABLES the ::external_lock method does not work to
 mark SQL statement borders. Note also a special case: if a temporary table
 is created inside LOCK TABLES, MySQL has not called external_lock() at all
-on that table. */
+on that table.
+MySQL-5.0 also calls this before each statement in an execution of a stored
+procedure. To make the execution more deterministic for binlogging, MySQL-5.0
+locks all tables involved in a stored procedure with full explicit table
+locks (thd->in_lock_tables is true in ::store_lock()) before executing the
+procedure. */
 
 int
 ha_innobase::start_stmt(
@@ -6443,10 +6448,8 @@
 		if (srv_locks_unsafe_for_binlog &&
 		    prebuilt->trx->isolation_level != TRX_ISO_SERIALIZABLE &&
 		    (lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) &&
-		    thd->lex->sql_command != SQLCOM_SELECT &&
-		    thd->lex->sql_command != SQLCOM_UPDATE_MULTI &&
-		    thd->lex->sql_command != SQLCOM_DELETE_MULTI &&
-		    thd->lex->sql_command != SQLCOM_LOCK_TABLES) {
+		    (thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
+		     thd->lex->sql_command == SQLCOM_UPDATE)) {
 
 			/* In case we have innobase_locks_unsafe_for_binlog
 			option set and isolation level of the transaction
Thread
bk commit into 5.0 tree (heikki:1.1929) BUG#10746Heikki Tuuri27 May