1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Nikita Malyavin
2023-01-11 18:57:44 +03:00
parent eb145e5ad7
commit 7a98d232e4
4 changed files with 89 additions and 1 deletions

View File

@ -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