diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-05 16:51:26 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-05 16:51:26 +0300 |
commit | 680463a8d991389f4ea5942e87764137c55c0eb4 (patch) | |
tree | 427f8946aa9085c7f6346e1047144995cb7c459e /sql/sql_base.cc | |
parent | 05693cf2149f8792863a32325090e789015286fc (diff) | |
parent | efc70da5fd0459ff44153529d13651741cc32bc4 (diff) | |
download | mariadb-git-680463a8d991389f4ea5942e87764137c55c0eb4.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index e3993600b37..073c37e9b99 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1715,6 +1715,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx) { table= best_table; table->query_id= thd->query_id; + table->init(thd, table_list); DBUG_PRINT("info",("Using locked table")); #ifdef WITH_PARTITION_STORAGE_ENGINE part_names_error= set_partitions_as_used(table_list, table); @@ -2011,12 +2012,13 @@ retry_share: } table->mdl_ticket= mdl_ticket; + table->reginfo.lock_type=TL_READ; /* Assume read */ + + table->init(thd, table_list); table->next= thd->open_tables; /* Link into simple list */ thd->set_open_tables(table); - table->reginfo.lock_type=TL_READ; /* Assume read */ - reset: /* Check that there is no reference to a condition from an earlier query @@ -2049,8 +2051,6 @@ retry_share: DBUG_RETURN(true); } - table->init(thd, table_list); - DBUG_RETURN(FALSE); err_lock: |