Bug#42108 Wrong locking for UPDATE with subqueries leads to broken statement
replication MySQL server uses wrong lock type (always TL_READ instead of TL_READ_NO_INSERT when appropriate) for tables used in subqueries of UPDATE statement. This leads in some cases to a broken replication as statements are written in the wrong order to the binlog.
This commit is contained in:
parent
e1d49b8143
commit
21d401c202
@ -7810,7 +7810,7 @@ update:
|
||||
LEX *lex= Lex;
|
||||
mysql_init_select(lex);
|
||||
lex->sql_command= SQLCOM_UPDATE;
|
||||
lex->lock_option= TL_UNLOCK; /* Will be set later */
|
||||
lex->lock_option= using_update_log ? TL_READ_NO_INSERT : TL_READ;
|
||||
lex->duplicates= DUP_ERROR;
|
||||
}
|
||||
opt_low_priority opt_ignore join_table_list
|
||||
|
Loading…
x
Reference in New Issue
Block a user