summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-24 16:07:00 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-24 16:07:00 +0300
commit7dc405f0523313546eeb7b30d6b534081dd9e3d8 (patch)
treefd5521885ad207d11d59a354c1c0307def3979e5 /sql/handler.cc
parenta18639f1a913b446f32d7fbe531aa0d5782cf720 (diff)
downloadmariadb-git-bb-10.5-MDEV-21175.tar.gz
WIP MDEV-21175 Remove dict_table_t::n_foreign_key_checks_runningbb-10.5-MDEV-21175
The counter dict_table_t::n_foreign_key_checks_running was a work-around for missing meta-data locking (MDL) on the SQL layer. ER_TABLE_IN_FK_CHECK: Replaced with ER_UNUSED_26. HA_ERR_TABLE_IN_FK_CHECK: Remove. dict_table_t: Remove inc_fk_checks(), dec_fk_checks(), n_foreign_key_checks_running. row_ins_check_foreign_constraints(), row_upd_check_references_constraints(): Do not acquire a shared dict_sys latch nor touch the reference counters. row_drop_table_for_mysql(): Make the checks stricter. We will still employ row_mysql_drop_list for TRUNCATE TABLE and for dropping internal tables related to FULLTEXT INDEX. So, this will not fix MDEV-21283 yet. MDEV-21602 CREATE TABLE…PRIMARY KEY…SELECT workaround causes DROP TABLE to ignore locks The error handling of CREATE…SELECT would invoke handler::delete_table() while still holding locks on the table, due to not having invoked handlerton::rollback first. InnoDB used to work around this as well. In MDEV-742 this was worked around further by breaking MDL, causing MDEV-22733.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 58f1c60edf9..d96a800d284 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -486,7 +486,6 @@ int ha_init_errors(void)
SETMSG(HA_ERR_INDEX_COL_TOO_LONG, ER_DEFAULT(ER_INDEX_COLUMN_TOO_LONG));
SETMSG(HA_ERR_INDEX_CORRUPT, ER_DEFAULT(ER_INDEX_CORRUPT));
SETMSG(HA_FTS_INVALID_DOCID, "Invalid InnoDB FTS Doc ID");
- SETMSG(HA_ERR_TABLE_IN_FK_CHECK, ER_DEFAULT(ER_TABLE_IN_FK_CHECK));
SETMSG(HA_ERR_DISK_FULL, ER_DEFAULT(ER_DISK_FULL));
SETMSG(HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE, "Too many words in a FTS phrase or proximity search");
SETMSG(HA_ERR_FK_DEPTH_EXCEEDED, "Foreign key cascade delete/update exceeds");
@@ -4186,9 +4185,6 @@ void handler::print_error(int error, myf errflag)
case HA_ERR_UNDO_REC_TOO_BIG:
textno= ER_UNDO_RECORD_TOO_BIG;
break;
- case HA_ERR_TABLE_IN_FK_CHECK:
- textno= ER_TABLE_IN_FK_CHECK;
- break;
default:
{
/* The error was "unknown" to this function.