mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
BUG#11704: Make InnoDB not to convert TL_WRITE_ONLY locks to TL_WRITE_ALLOW_WRITE in
OPTIMIZE TABLE. sql/ha_innodb.cc: Fix for BUG#11704: "Found locks from different thread" warnings: The source of warnings was this scenario in OPTIMIZE: thr1: lock table with TL_WRITE_ONLY (InnoDB converts lock to TL_WRITE_ALLOW_WRITE) thr2: (UPDATE command) obtains a TL_WRITE_ALLOW_WRITE lock thr1: call mysql_lock_abort(). This function sets type of thr'1 lock to TL_WRITE_ONLY thr2: try to release thr2's lock. See two locks: TL_WRITE_ONLY, TL_WRITE_ALLOW_WRITE and produce a warning. The fix: Make InnoDB not to convert TL_WRITE_ONLY locks to TL_WRITE_ALLOW_WRITE in OPTIMIZE TABLE.
This commit is contained in:
parent
e897eb3492
commit
d91f4dead8
1 changed files with 1 additions and 0 deletions
|
@ -6811,6 +6811,7 @@ ha_innobase::store_lock(
|
|||
|| thd->lex->sql_command == SQLCOM_CALL)
|
||||
&& !thd->tablespace_op
|
||||
&& thd->lex->sql_command != SQLCOM_TRUNCATE
|
||||
&& thd->lex->sql_command != SQLCOM_OPTIMIZE
|
||||
&& thd->lex->sql_command != SQLCOM_CREATE_TABLE) {
|
||||
|
||||
lock_type = TL_WRITE_ALLOW_WRITE;
|
||||
|
|
Loading…
Add table
Reference in a new issue