summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/ha_innodb.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-05-24 09:38:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-05-24 09:38:49 +0300
commit1864a8ea93aa1d1a540c83526a25df2ad0330763 (patch)
treef6d1ae8e9e696ea8537a395d061f697e5bccd4aa /storage/innobase/handler/ha_innodb.cc
parentb01a9fd817d9d8e5941008d6981338eaa7369c83 (diff)
parent5c75ba9cadc7877e91d6b712f157ff5623c09c60 (diff)
downloadmariadb-git-1864a8ea93aa1d1a540c83526a25df2ad0330763.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase/handler/ha_innodb.cc')
-rw-r--r--storage/innobase/handler/ha_innodb.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index eec5c4b3f4a..eb28a0ba59f 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -6367,7 +6367,9 @@ no_such_table:
/* Index block size in InnoDB: used by MySQL in query optimization */
stats.block_size = srv_page_size;
- if (m_prebuilt->table == NULL
+ const my_bool for_vc_purge = THDVAR(thd, background_thread);
+
+ if (for_vc_purge || !m_prebuilt->table
|| m_prebuilt->table->is_temporary()
|| m_prebuilt->table->persistent_autoinc
|| !m_prebuilt->table->is_readable()) {
@@ -6394,7 +6396,7 @@ no_such_table:
ut_ad(!m_prebuilt->table
|| table->versioned() == m_prebuilt->table->versioned());
- if (!THDVAR(thd, background_thread)) {
+ if (!for_vc_purge) {
info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST
| HA_STATUS_OPEN);
}
@@ -12834,7 +12836,6 @@ create_table_info_t::create_table_update_dict()
if (!innobase_fts_load_stopword(innobase_table, NULL, m_thd)) {
dict_table_close(innobase_table, FALSE, FALSE);
srv_active_wake_master_thread();
- m_trx->free();
DBUG_RETURN(-1);
}
@@ -12961,19 +12962,12 @@ ha_innobase::create(
}
trx_rollback_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx);
- if (own_trx) {
- trx->free();
- }
- DBUG_RETURN(error);
+ goto func_exit;
}
innobase_commit_low(trx);
row_mysql_unlock_data_dictionary(trx);
- if (own_trx) {
- trx->free();
- }
-
/* Flush the log to reduce probability that the .frm files and
the InnoDB data dictionary get out-of-sync if the user runs
with innodb_flush_log_at_trx_commit = 0 */
@@ -12983,6 +12977,11 @@ ha_innobase::create(
error = info.create_table_update_dict();
+func_exit:
+ if (own_trx) {
+ trx->free();
+ }
+
/* Tell the InnoDB server that there might be work for
utility threads: */