diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-06-12 22:54:46 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-06-12 22:54:46 +0200 |
commit | 5b65d61d9384a45ea1b8df79694493fbb1a14e4a (patch) | |
tree | 451255aa141e115baf97b867fb0752b8ce4dd9a9 /sql/sql_base.cc | |
parent | 56c60b2fc5d006206f54b93be401570837f2f312 (diff) | |
parent | 7a7d9904e12335ee8b1eea9671138b3c469a3829 (diff) | |
download | mariadb-git-5b65d61d9384a45ea1b8df79694493fbb1a14e4a.tar.gz |
Merge branch '5.5' into 10.1
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 043be9b9a96..d49fbcddbf9 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4531,8 +4531,7 @@ open_tables_check_upgradable_mdl(THD *thd, TABLE_LIST *tables_start, */ bool open_tables(THD *thd, const DDL_options_st &options, - TABLE_LIST **start, uint *counter, - Sroutine_hash_entry **sroutine_to_open_list, uint flags, + TABLE_LIST **start, uint *counter, uint flags, Prelocking_strategy *prelocking_strategy) { /* @@ -4575,9 +4574,10 @@ restart: has_prelocking_list= thd->lex->requires_prelocking(); table_to_open= start; - sroutine_to_open= sroutine_to_open_list; + sroutine_to_open= &thd->lex->sroutines_list.first; *counter= 0; THD_STAGE_INFO(thd, stage_opening_tables); + prelocking_strategy->reset(thd); /* If we are executing LOCK TABLES statement or a DDL statement @@ -4635,8 +4635,7 @@ restart: elements in prelocking list/set. */ while (*table_to_open || - (thd->locked_tables_mode <= LTM_LOCK_TABLES && - *sroutine_to_open)) + (thd->locked_tables_mode <= LTM_LOCK_TABLES && *sroutine_to_open)) { /* For every table in the list of tables to open, try to find or open @@ -4756,6 +4755,8 @@ restart: } } } + if ((error= prelocking_strategy->handle_end(thd))) + goto error; } /* |