diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-05-19 20:55:37 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-05-19 20:55:37 +0200 |
commit | c07325f932abef2032b2e56532f6cb615e2a1161 (patch) | |
tree | 754ca158e45ebc014e5cbeaf4c3e7581f9575d76 /sql/sql_truncate.cc | |
parent | 7f8187bc432f79afe4c0549d68845a68e6c159ab (diff) | |
parent | 2ae83affef5a4d89f38272db31a400f968279a7a (diff) | |
download | mariadb-git-c07325f932abef2032b2e56532f6cb615e2a1161.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql/sql_truncate.cc')
-rw-r--r-- | sql/sql_truncate.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index c89ca92bcb1..bfcdda6e0e9 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ #include "mariadb.h" #include "debug_sync.h" // DEBUG_SYNC @@ -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)) |