summaryrefslogtreecommitdiff
path: root/mysql-test/r/alter_table.result
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-19 09:47:08 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-19 09:47:08 +0200
commitf9bdc7c01af52c04a05b5d0e890f86c77323d3b0 (patch)
tree09779236c1d7061fb1706524c2e3b357369eae8e /mysql-test/r/alter_table.result
parentf7be8cf2854fc0c2871c1537e60b1d7cb1931a61 (diff)
parentf566a4f83c8c255e0192afa525fdeb0897927167 (diff)
downloadmariadb-git-f9bdc7c01af52c04a05b5d0e890f86c77323d3b0.tar.gz
Merge branch '10.2' into bb-10.2-jan
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r--mysql-test/r/alter_table.result25
1 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index d8e17419342..522d8ab45f9 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -1504,7 +1504,7 @@ ALTER TABLE t1 DROP KEY IF EXISTS transaction_id, ADD PRIMARY KEY IF NOT EXISTS
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `transaction_id` int(11) NOT NULL DEFAULT '0',
+ `transaction_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`transaction_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2057,3 +2057,26 @@ t1 CREATE TABLE `t1` (
KEY `i1` (`a`) COMMENT 'comment2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+#
+# MDEV-10421 duplicate CHECK CONSTRAINTs
+#
+CREATE TABLE t1 (a INT, b INT) engine=myisam;
+ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
+ALTER TABLE t1 ADD CONSTRAINT `min` CHECK (a+b > 100);
+ERROR HY000: Duplicate CHECK constraint name 'min'
+ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
+Warnings:
+Note 1826 Duplicate CHECK constraint name 'min'
+ALTER TABLE t1 ADD CONSTRAINT `mini` CHECK (a+b > 100);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ CONSTRAINT `min` CHECK (a+b > 100),
+ CONSTRAINT `mini` CHECK (a+b > 100)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1(a INT, b INT, CONSTRAINT min check (a>5),
+CONSTRAINT min check (b>5));
+ERROR HY000: Duplicate CHECK constraint name 'min'