Skip to content

Commit

Permalink
Add a test case for a MySQL 5.7 bug that did not affect MariaDB
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed May 11, 2018
1 parent 82f0dc3 commit e26b07d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mysql-test/suite/innodb/r/foreign_key.result
Expand Up @@ -306,3 +306,14 @@ id member_id
SELECT * FROM payment_method;
id member_id cardholder_address_id
DROP TABLE payment_method,address,member;
#
# Bug #26958695 INNODB NESTED STORED FIELD WITH CONSTRAINT KEY
# PRODUCE BROKEN TABLE (no bug in MariaDB)
#
create table t1(f1 int,f2 int, primary key(f1), key(f2, f1))engine=innodb;
create table t2(f1 int, f2 int as (2) stored, f3 int as (f2) stored,
foreign key(f1) references t1(f2) on update set NULL)
engine=innodb;
insert into t1 values(1, 1);
insert into t2(f1) values(1);
drop table t2, t1;
12 changes: 12 additions & 0 deletions mysql-test/suite/innodb/t/foreign_key.test
Expand Up @@ -276,4 +276,16 @@ SELECT * FROM payment_method;

DROP TABLE payment_method,address,member;

--echo #
--echo # Bug #26958695 INNODB NESTED STORED FIELD WITH CONSTRAINT KEY
--echo # PRODUCE BROKEN TABLE (no bug in MariaDB)
--echo #
create table t1(f1 int,f2 int, primary key(f1), key(f2, f1))engine=innodb;
create table t2(f1 int, f2 int as (2) stored, f3 int as (f2) stored,
foreign key(f1) references t1(f2) on update set NULL)
engine=innodb;
insert into t1 values(1, 1);
insert into t2(f1) values(1);
drop table t2, t1;

--source include/wait_until_count_sessions.inc

0 comments on commit e26b07d

Please sign in to comment.