diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-05 20:36:43 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-05 20:36:43 +0300 |
commit | 6877ef9a7c9c7ee55d67e4baaf4e8f7b874c9f89 (patch) | |
tree | ade4c0b2e50538438e70dc49581541de94098625 /sql/sql_base.cc | |
parent | 374f94c5a749ec6af83824c1f55f0f49029a9714 (diff) | |
parent | 68d9d512e933a1d40670add50f205e5266bc5507 (diff) | |
download | mariadb-git-6877ef9a7c9c7ee55d67e4baaf4e8f7b874c9f89.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 8dd85d3de24..1567df7d537 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1765,6 +1765,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); @@ -2086,12 +2087,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 @@ -2123,16 +2125,15 @@ retry_share: my_error(ER_NOT_SEQUENCE, MYF(0), table_list->db.str, table_list->alias.str); DBUG_RETURN(true); } - table->init(thd, table_list); - DBUG_ASSERT(thd->locked_tables_mode || table->file->row_logging == 0); - DBUG_RETURN(FALSE); + DBUG_ASSERT(thd->locked_tables_mode || table->file->row_logging == 0); + DBUG_RETURN(false); err_lock: tdc_release_share(share); DBUG_PRINT("exit", ("failed")); - DBUG_RETURN(TRUE); + DBUG_RETURN(true); } |