1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

extend prelocking to FK-accessed tables

Backport of f136291098
This commit is contained in:
Sergei Golubchik
2018-07-17 16:56:40 +02:00
parent 3b365fa829
commit 64a23c1c8a
6 changed files with 157 additions and 4 deletions

View File

@ -5082,7 +5082,8 @@ has_write_table_with_auto_increment_and_select(TABLE_LIST *tables)
for(TABLE_LIST *table= tables; table; table= table->next_global)
{
if (!table->placeholder() &&
(table->lock_type <= TL_READ_NO_INSERT))
table->lock_type <= TL_READ_NO_INSERT &&
table->prelocking_placeholder != TABLE_LIST::FK)
{
has_select= true;
break;