summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_alter.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-05-26 22:44:16 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-05-26 22:45:46 +0300
commit8c81f24d1bedb11364288d42d5492e76816fe20a (patch)
treeaade13bca6207b89634b2b87db16e18301e9ec0e /mysql-test/r/partition_alter.result
parent8f643e2063c9890a353149f39ef85b2cf3151fd0 (diff)
parent808f18c748a98dcc7df0b8154563153c8527d3f0 (diff)
downloadmariadb-git-8c81f24d1bedb11364288d42d5492e76816fe20a.tar.gz
Merge 10.1 into 10.2
Diffstat (limited to 'mysql-test/r/partition_alter.result')
-rw-r--r--mysql-test/r/partition_alter.result47
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/partition_alter.result b/mysql-test/r/partition_alter.result
index cbd90b5ba7c..76b55cefb07 100644
--- a/mysql-test/r/partition_alter.result
+++ b/mysql-test/r/partition_alter.result
@@ -51,3 +51,50 @@ execute stmt;
execute stmt;
deallocate prepare stmt;
drop table test_data;
+create table t1(id int, d date not null, b bool not null default 0, primary key(id,d))
+engine=innodb
+partition by range columns (d) (
+partition p1 values less than ('2016-10-18'),
+partition p2 values less than ('2020-10-19'));
+insert t1 values (0, '2000-01-02', 0);
+insert t1 values (1, '2020-01-02', 10);
+alter table t1 add check (b in (0, 1));
+ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`#sql-temporary`
+alter table t1 add check (b in (0, 10));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) NOT NULL,
+ `d` date NOT NULL,
+ `b` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`,`d`),
+ CONSTRAINT `CONSTRAINT_1` CHECK (`b` in (0,10))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ PARTITION BY RANGE COLUMNS(d)
+(PARTITION p1 VALUES LESS THAN ('2016-10-18') ENGINE = InnoDB,
+ PARTITION p2 VALUES LESS THAN ('2020-10-19') ENGINE = InnoDB)
+insert t1 values (2, '2020-01-03', 20);
+ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
+drop table t1;
+create table t1(id int, d date not null, b bool not null default 0, primary key(id,d))
+partition by range columns (d) (
+partition p1 values less than ('2016-10-18'),
+partition p2 values less than ('2020-10-19'));
+insert t1 values (0, '2000-01-02', 0);
+insert t1 values (1, '2020-01-02', 10);
+alter table t1 add check (b in (0, 1));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) NOT NULL,
+ `d` date NOT NULL,
+ `b` tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`,`d`),
+ CONSTRAINT `CONSTRAINT_1` CHECK (`b` in (0,1))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY RANGE COLUMNS(d)
+(PARTITION p1 VALUES LESS THAN ('2016-10-18') ENGINE = MyISAM,
+ PARTITION p2 VALUES LESS THAN ('2020-10-19') ENGINE = MyISAM)
+insert t1 values (2, '2020-01-03', 20);
+ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
+drop table t1;