mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Merge mysql.com:/home/emurphy/src/bk-clean/tmp_merge
into mysql.com:/home/emurphy/src/bk-clean/mysql-5.1
This commit is contained in:
commit
d4796d9df6
8 changed files with 96 additions and 73 deletions
|
|
@ -6910,17 +6910,28 @@ ha_innobase::store_lock(
|
|||
stored function call (MySQL does have thd->in_lock_tables
|
||||
TRUE there). */
|
||||
|
||||
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT
|
||||
&& lock_type <= TL_WRITE)
|
||||
&& !(thd->in_lock_tables
|
||||
&& thd->lex->sql_command == SQLCOM_LOCK_TABLES)
|
||||
&& !thd->tablespace_op
|
||||
&& thd->lex->sql_command != SQLCOM_TRUNCATE
|
||||
&& thd->lex->sql_command != SQLCOM_OPTIMIZE
|
||||
&& thd->lex->sql_command != SQLCOM_CREATE_TABLE) {
|
||||
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT
|
||||
&& lock_type <= TL_WRITE)
|
||||
&& !(thd->in_lock_tables
|
||||
&& thd->lex->sql_command == SQLCOM_LOCK_TABLES)
|
||||
&& !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;
|
||||
}
|
||||
}
|
||||
|
||||
/* In queries of type INSERT INTO t1 SELECT ... FROM t2 ...
|
||||
MySQL would use the lock TL_READ_NO_INSERT on t2, and that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue