mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-18923 Assertion `!lex_string_cmp(system_charset_info, fk_info->referenced_table, &table->s->table_name)' failed in fk_truncate_illegal_if_parent
don't assert the correctness of FK constraints, as it can be broken under `SET FOREIGN_KEY_CHECKS= OFF`
This commit is contained in:
@ -150,15 +150,11 @@ fk_truncate_illegal_if_parent(THD *thd, TABLE *table)
|
||||
/* Loop over the set of foreign keys for which this table is a parent. */
|
||||
while ((fk_info= it++))
|
||||
{
|
||||
DBUG_ASSERT(!my_strcasecmp(system_charset_info,
|
||||
fk_info->referenced_db->str,
|
||||
table->s->db.str));
|
||||
|
||||
DBUG_ASSERT(!my_strcasecmp(system_charset_info,
|
||||
fk_info->referenced_table->str,
|
||||
table->s->table_name.str));
|
||||
|
||||
if (my_strcasecmp(system_charset_info, fk_info->foreign_db->str,
|
||||
if (my_strcasecmp(system_charset_info, fk_info->referenced_db->str,
|
||||
table->s->db.str) ||
|
||||
my_strcasecmp(system_charset_info, fk_info->referenced_table->str,
|
||||
table->s->table_name.str) ||
|
||||
my_strcasecmp(system_charset_info, fk_info->foreign_db->str,
|
||||
table->s->db.str) ||
|
||||
my_strcasecmp(system_charset_info, fk_info->foreign_table->str,
|
||||
table->s->table_name.str))
|
||||
|
Reference in New Issue
Block a user