Skip to content

Commit 278face

Browse files
committed
Added test case for query that was crashing in 10.4.13
1 parent ed1434d commit 278face

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

mysql-test/main/alter_table.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,3 +2594,8 @@ alter table person_principal add column if not exists date_mask tinyint null;
25942594
update person_principal set date_mask = 0;
25952595
alter table person_principal modify column date_mask tinyint not null;
25962596
drop tables person_principal_hist, person_principal;
2597+
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;
2598+
insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id");
2599+
insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2");
2600+
ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name);
2601+
DROP TABLE t1;

mysql-test/main/alter_table.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,3 +2111,12 @@ update person_principal set date_mask = 0;
21112111
alter table person_principal modify column date_mask tinyint not null;
21122112
drop tables person_principal_hist, person_principal;
21132113

2114+
#
2115+
# The following ALTER TABLE caused crash in 10.4.13 (Reported on freenode)
2116+
#
2117+
2118+
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;
2119+
insert into t1 (id,name,enabled,domain_id) values (1,"Monty",1,"domain_id");
2120+
insert into t1 (id,name,enabled,domain_id) values (2,"Monty2",1,"domain_id2");
2121+
ALTER TABLE t1 ADD CONSTRAINT ixu_user2_name_domain_id UNIQUE (domain_id, name);
2122+
DROP TABLE t1;

0 commit comments

Comments
 (0)