diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-05-09 20:43:36 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-05-09 20:43:36 +0200 |
commit | 13038e4705ed55e24362dfad977a1ee454cfebfd (patch) | |
tree | ac3d37fe69e802dec8008748b86cc901f116eead /sql/sql_base.cc | |
parent | 72c7b4eb4cc86ca2f6bdb9e105b67d39df018a40 (diff) | |
parent | f5844e7c4bc693783f088a5fc9c399b786ddc8c1 (diff) | |
download | mariadb-git-13038e4705ed55e24362dfad977a1ee454cfebfd.tar.gz |
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 08dd03dc7f6..b5064fe9fd9 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4756,10 +4756,19 @@ bool Lock_tables_prelocking_strategy:: handle_table(THD *thd, Query_tables_list *prelocking_ctx, TABLE_LIST *table_list, bool *need_prelocking) { + TABLE_LIST **last= prelocking_ctx->query_tables_last; + if (DML_prelocking_strategy::handle_table(thd, prelocking_ctx, table_list, need_prelocking)) return TRUE; + /* + normally we don't need to open FK-prelocked tables for RESTRICT, + MDL is enough. But under LOCK TABLES we have to open everything + */ + for (TABLE_LIST *tl= *last; tl; tl= tl->next_global) + tl->open_strategy= TABLE_LIST::OPEN_NORMAL; + /* We rely on a caller to check that table is going to be changed. */ DBUG_ASSERT(table_list->lock_type >= TL_WRITE_ALLOW_WRITE); |