summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2023-01-11 18:57:44 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2023-01-12 21:51:48 +0300
commit7a98d232e42b66efc759d584b05214e91681c346 (patch)
treeae182cc4f354717c04f6e68faaefff85eb61f721 /sql/sql_insert.cc
parenteb145e5ad7afa29f1d298452b80fcca36a6c3bbe (diff)
downloadmariadb-git-7a98d232e42b66efc759d584b05214e91681c346.tar.gz
MDEV-30378 Versioned REPLACE succeeds with ON DELETE RESTRICT constraint
node->is_delete was incorrectly set to NO_DELETE for a set of operations. In general we shouldn't rely on sql_command and look for more abstract ways to control the behavior. trg_event_map seems to be a suitable way. To mind replica nodes, it is ORed with slave_fk_event_map, which stores trg_event_map when replica has triggers disabled.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index b743fc88061..0fd18c3e597 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4396,6 +4396,7 @@ TABLE *select_create::create_table_from_items(THD *thd,
*/
DBUG_ASSERT(0);
}
+ create_table->table->pos_in_table_list= create_table;
}
}
else