mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Applying patch from SergeyV
Fixes bug#17264, for alter table on win32 for successfull operation completion it is used TL_WRITE(=10) lock instead of TL_WRITE_ALLOW_READ(=6), however here in innodb handler TL_WRTIE is lifted to TL_WRITE_ALLOW_WRITE, which causes race condition when several clients do alter table simultaneously. mysql-test/r/lock_multi.result: Test case for bug#17264. mysql-test/t/lock_multi.test: Test case for bug#17264
This commit is contained in:
parent
70a087e53d
commit
b250722087
3 changed files with 43 additions and 0 deletions
|
|
@ -6684,6 +6684,17 @@ ha_innobase::store_lock(
|
|||
&& !thd->tablespace_op
|
||||
&& thd->lex->sql_command != SQLCOM_TRUNCATE
|
||||
&& thd->lex->sql_command != SQLCOM_OPTIMIZE
|
||||
#ifdef __WIN__
|
||||
/*
|
||||
for alter table on win32 for succesfull operation
|
||||
completion it is used TL_WRITE(=10) lock instead of
|
||||
TL_WRITE_ALLOW_READ(=6), however here in innodb handler
|
||||
TL_WRITE is lifted to TL_WRITE_ALLOW_WRITE, which causes
|
||||
race condition when several clients do alter table
|
||||
simultaneously (bug #17264). This fix avoids the problem.
|
||||
*/
|
||||
&& thd->lex->sql_command != SQLCOM_ALTER_TABLE
|
||||
#endif
|
||||
&& thd->lex->sql_command != SQLCOM_CREATE_TABLE) {
|
||||
|
||||
lock_type = TL_WRITE_ALLOW_WRITE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue