diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/t/innodb_bug60229.test | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb_bug60229.test')
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_bug60229.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb_bug60229.test b/mysql-test/suite/innodb/t/innodb_bug60229.test new file mode 100644 index 00000000..aee0b96a --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug60229.test @@ -0,0 +1,43 @@ +# +# Bug #13083023 - 60229: BROKEN COMPATIBILITY: ERROR WHILE CREATE TABLE +# WITH FOREIGN KEY CONSTRAINT. + +#Server variable option 'lower_case_table_names' sets '0' as default value +#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of +#insensitive filsystem is not allowed. +-- source include/have_case_sensitive_file_system.inc +-- source include/have_innodb.inc + +CREATE TABLE PERSON ( + PERSON_ID VARCHAR(50) NOT NULL, + DOB VARCHAR(50) NOT NULL, + NAME NVARCHAR(255) NOT NULL, + CONSTRAINT PK_PERSON PRIMARY KEY (PERSON_ID, DOB) +)Engine=InnoDB; + + +CREATE TABLE PHOTO ( + PERSON_ID VARCHAR(50) NOT NULL, + DOB VARCHAR(50) NOT NULL, + PHOTO_DETAILS VARCHAR(50) NULL, + CONSTRAINT PK_PHOTO PRIMARY KEY (PERSON_ID, DOB), + CONSTRAINT FK_PHOTO_2_PERSON FOREIGN KEY (PERSON_ID, DOB) REFERENCES PERSON (PERSON_ID, DOB) +)Engine=InnoDB; + + +CREATE TABLE ADDRESS ( + PERSON_ID VARCHAR(50) NOT NULL, + DOB VARCHAR(50) NOT NULL, + ADDRESS_ID VARCHAR(50) NOT NULL, + ADDRESS_DETAILS NVARCHAR(250) NULL, + CONSTRAINT PK_ADDRESS PRIMARY KEY (PERSON_ID, DOB, ADDRESS_ID), + CONSTRAINT FK_ADDRESS_2_PERSON FOREIGN KEY (PERSON_ID, DOB) REFERENCES PERSON (PERSON_ID, DOB) ON DELETE CASCADE +)Engine=InnoDB; + +INSERT INTO PERSON VALUES("10", "11011999", "John"); +INSERT INTO PHOTO VALUES("10", "11011999", "new photo"); + +DROP TABLE PHOTO; +DROP TABLE ADDRESS; +DROP TABLE PERSON; + |