ha_innobase::start_stmt(): Remove the check for

prebuilt->stored_select_lock_type being LOCK_X or LOCK_S.
This would cause false alarms with INSERT ... SELECT, which would use
LOCK_NONE in innodb_locks_unsafe_for_binlog mode.  (Bug #10746)
This commit is contained in:
marko 2006-09-20 08:52:00 +00:00
parent df49c4bf60
commit 7e894a1b88

View file

@ -6177,25 +6177,11 @@ ha_innobase::start_stmt(
1) ::store_lock(),
2) ::external_lock(),
3) ::init_table_handle_for_HANDLER(), and
4) :.transactional_table_lock(). */
4) ::transactional_table_lock(). */
prebuilt->select_lock_type =
prebuilt->stored_select_lock_type;
}
if (prebuilt->stored_select_lock_type != LOCK_S
&& prebuilt->stored_select_lock_type != LOCK_X) {
sql_print_error(
"stored_select_lock_type is %lu inside "
"::start_stmt()!",
prebuilt->stored_select_lock_type);
/* Set the value to LOCK_X: this is just fault
tolerance, we do not know what the correct value
should be! */
prebuilt->select_lock_type = LOCK_X;
}
}
trx->detailed_error[0] = '\0';