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
parent 26e9e13c
...@@ -5764,7 +5764,12 @@ MySQL calls this function at the start of each SQL statement inside LOCK ...@@ -5764,7 +5764,12 @@ MySQL calls this function at the start of each SQL statement inside LOCK
TABLES. Inside LOCK TABLES the ::external_lock method does not work to 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 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 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 int
ha_innobase::start_stmt( ha_innobase::start_stmt(
...@@ -6443,10 +6448,8 @@ ha_innobase::store_lock( ...@@ -6443,10 +6448,8 @@ ha_innobase::store_lock(
if (srv_locks_unsafe_for_binlog && if (srv_locks_unsafe_for_binlog &&
prebuilt->trx->isolation_level != TRX_ISO_SERIALIZABLE && prebuilt->trx->isolation_level != TRX_ISO_SERIALIZABLE &&
(lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) && (lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) &&
thd->lex->sql_command != SQLCOM_SELECT && (thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
thd->lex->sql_command != SQLCOM_UPDATE_MULTI && thd->lex->sql_command == SQLCOM_UPDATE)) {
thd->lex->sql_command != SQLCOM_DELETE_MULTI &&
thd->lex->sql_command != SQLCOM_LOCK_TABLES) {
/* In case we have innobase_locks_unsafe_for_binlog /* In case we have innobase_locks_unsafe_for_binlog
option set and isolation level of the transaction option set and isolation level of the transaction
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment