summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2021-05-19 17:51:34 +0300
committerAleksey Midenkov <midenok@gmail.com>2021-06-05 01:44:11 +0300
commit41a170c60abc4d6e70996bf6ec48fc52975cca18 (patch)
treeebafed864a3ae4052015125e59c39a63aa858e0c /sql/partition_info.cc
parent404428733b2622acd1f69ebe6cd578510485cce6 (diff)
downloadmariadb-git-bb-10.6-midenok-MDEV-23639.tar.gz
MDEV-23639 Auto-create does not work under LOCK TABLES or inside triggersbb-10.6-midenok-MDEV-23639
Don't do tdc_remove_table() for OT_ADD_HISTORY_PARTITION because it is not possible in locked tables mode. LTM_LOCK_TABLES mode (and LTM_PRELOCKED_UNDER_LOCK_TABLES) works out of the box as fast_alter_partition_table() can reopen tables via locked_tables_list. In LTM_PRELOCKED we reopen and relock table manually.
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 06773d03381..e89e8870832 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -910,15 +910,6 @@ bool partition_info::vers_set_hist_part(THD *thd, uint *create_count)
}
}
- /*
- When hist_part is almost full LOCK TABLES may overflow the partition as we
- can't add new partitions under LOCK TABLES. Reserve one more for this case.
- */
- if (auto_hist && *create_count == 0 &&
- thd->lex->sql_command == SQLCOM_LOCK_TABLES &&
- vers_info->hist_part->id + 1 == vers_info->now_part->id)
- ++*create_count;
-
return false;
}