MDEV-33934 Assertion `!check_foreigns' failed in

	     bulk_insert_apply_for_table(dict_table_t*)

This issue is caused by
commit 188c5da7 (MDEV-32453).

trx_t::bulk_insert_apply_for_table(): Remove the assert
check_unique_secondary and check_foreigns. InnoDB can
apply the bulk insert operation even after disabling
the check_foreigns and check_unique_secondary variable.
parent 11aeef2a
......@@ -488,4 +488,16 @@ BEGIN;
LOAD DATA INFILE 'VARDIR/tmp/t.outfile' INTO TABLE t;
COMMIT;
DROP TABLE t;
#
# MDEV-33934 Assertion `!check_foreigns' failed in
# trx_t::bulk_insert_apply_for_table(dict_table_t*)
#
CREATE TABLE t1(f1 INT,f2 INT,KEY(f1))engine=innodb;
BEGIN;
INSERT INTO t1 VALUES();
SET STATEMENT FOREIGN_KEY_CHECKS=1 FOR SELECT * FROM t1;
f1 f2
NULL NULL
COMMIT;
DROP TABLE t1;
# End of 10.11 tests
......@@ -523,4 +523,15 @@ eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t.outfile' INTO TABLE t;
COMMIT;
DROP TABLE t;
--remove_file $MYSQLTEST_VARDIR/tmp/t.outfile
--echo #
--echo # MDEV-33934 Assertion `!check_foreigns' failed in
--echo # trx_t::bulk_insert_apply_for_table(dict_table_t*)
--echo #
CREATE TABLE t1(f1 INT,f2 INT,KEY(f1))engine=innodb;
BEGIN;
INSERT INTO t1 VALUES();
SET STATEMENT FOREIGN_KEY_CHECKS=1 FOR SELECT * FROM t1;
COMMIT;
DROP TABLE t1;
--echo # End of 10.11 tests
......@@ -5373,8 +5373,6 @@ dberr_t trx_t::bulk_insert_apply_for_table(dict_table_t *table)
{
if (UNIV_UNLIKELY(!bulk_insert))
return DB_SUCCESS;
ut_ad(!check_unique_secondary);
ut_ad(!check_foreigns);
auto it= mod_tables.find(table);
if (it != mod_tables.end() && it->second.bulk_store)
if (dberr_t err= it->second.write_bulk(table, this))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment