diff options
author | Monty <monty@mariadb.org> | 2020-05-28 16:56:37 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-05-28 16:56:37 +0300 |
commit | 278facee7c7a028d642f3b5f23a42bcf099d86f3 (patch) | |
tree | 6e51f7aed00896edef633987b91a83fe7c675b55 /mysql-test/main | |
parent | ed1434df88270ebe70ae412b5b723920b6b4e0e8 (diff) | |
download | mariadb-git-278facee7c7a028d642f3b5f23a42bcf099d86f3.tar.gz |
Added test case for query that was crashing in 10.4.13
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/alter_table.result | 5 | ||||
-rw-r--r-- | mysql-test/main/alter_table.test | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result index 8e8b4362ed8..4b817ca11b5 100644 --- a/mysql-test/main/alter_table.result +++ b/mysql-test/main/alter_table.result @@ -2594,3 +2594,8 @@ alter table person_principal add column if not exists date_mask tinyint null; update person_principal set date_mask = 0; alter table person_principal modify column date_mask tinyint not null; drop tables person_principal_hist, person_principal; +CREATE OR REPLACE TABLE `t1` ( `id` varchar(64) NOT NULL, `name` varchar(255) NOT NULL, `extra` text DEFAULT NULL, `password` varchar(128) DEFAULT NULL, `enabled` tinyint(1) DEFAULT NULL, `domain_id` varchar(64) NOT NULL, `default_project_id` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `CONSTRAINT_1` CHECK (`enabled` in (0,1)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id"); +insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2"); +ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name); +DROP TABLE t1; diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test index f090df56e5f..25a2a6a7a00 100644 --- a/mysql-test/main/alter_table.test +++ b/mysql-test/main/alter_table.test @@ -2111,3 +2111,12 @@ update person_principal set date_mask = 0; alter table person_principal modify column date_mask tinyint not null; drop tables person_principal_hist, person_principal; +# +# The following ALTER TABLE caused crash in 10.4.13 (Reported on freenode) +# + +CREATE OR REPLACE TABLE `t1` ( `id` varchar(64) NOT NULL, `name` varchar(255) NOT NULL, `extra` text DEFAULT NULL, `password` varchar(128) DEFAULT NULL, `enabled` tinyint(1) DEFAULT NULL, `domain_id` varchar(64) NOT NULL, `default_project_id` varchar(64) DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `CONSTRAINT_1` CHECK (`enabled` in (0,1)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id"); +insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2"); +ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name); +DROP TABLE t1; |