summaryrefslogtreecommitdiff
path: root/sql/sql_truncate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r--sql/sql_truncate.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc
index bab9bb5e9ac..d87fe13b10e 100644
--- a/sql/sql_truncate.cc
+++ b/sql/sql_truncate.cc
@@ -147,15 +147,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(!lex_string_cmp(system_charset_info,
- fk_info->referenced_db,
- &table->s->db));
-
- DBUG_ASSERT(!lex_string_cmp(system_charset_info,
- fk_info->referenced_table,
- &table->s->table_name));
-
- if (lex_string_cmp(system_charset_info, fk_info->foreign_db,
+ if (lex_string_cmp(system_charset_info, fk_info->referenced_db,
+ &table->s->db) ||
+ lex_string_cmp(system_charset_info, fk_info->referenced_table,
+ &table->s->table_name) ||
+ lex_string_cmp(system_charset_info, fk_info->foreign_db,
&table->s->db) ||
lex_string_cmp(system_charset_info, fk_info->foreign_table,
&table->s->table_name))