summaryrefslogtreecommitdiff
path: root/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result')
-rw-r--r--mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result89
1 files changed, 89 insertions, 0 deletions
diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result
new file mode 100644
index 00000000000..3f2b1546995
--- /dev/null
+++ b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result
@@ -0,0 +1,89 @@
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
+SET TIMESTAMP=1171346973;
+INSERT INTO t1 (c1) VALUES(NOW());
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+INSERT INTO t1 (c1) VALUES(NOW());
+ERROR 23000: Duplicate entry '2007-02-13' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+2007-02-13
+2007-02-14
+DROP TABLE t1;
+CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
+INSERT INTO t1 (c1) VALUES(1999);
+INSERT INTO t1 (c1) VALUES(2000);
+INSERT INTO t1 (c1) VALUES(1999);
+ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+1999
+2000
+DROP TABLE t1;
+CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY);
+SET TIMESTAMP=1171346973;
+INSERT INTO t1 (c1) VALUES(NOW());
+INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
+INSERT INTO t1 (c1) VALUES(NOW());
+ERROR 23000: Duplicate entry '09:09:33' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+09:09:33
+10:10:34
+DROP TABLE t1;
+CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
+INSERT INTO t1 (c1) VALUES(1999);
+INSERT INTO t1 (c1) VALUES(2000);
+INSERT INTO t1 (c1) VALUES(1999);
+ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+1999
+2000
+DROP TABLE t1;
+CREATE TABLE t1(c1 DATETIME NOT NULL PRIMARY KEY);
+SET TIMESTAMP=1171346973;
+INSERT INTO t1 (c1) VALUES(NOW());
+INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
+INSERT INTO t1 (c1) VALUES(NOW());
+ERROR 23000: Duplicate entry '2007-02-13 09:09:33' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+2007-02-13 09:09:33
+2007-02-14 10:10:34
+DROP TABLE t1;
+CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
+INSERT INTO t1 (c1) VALUES(1999);
+INSERT INTO t1 (c1) VALUES(2000);
+INSERT INTO t1 (c1) VALUES(1999);
+ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+1999
+2000
+DROP TABLE t1;
+CREATE TABLE t1(c1 TIMESTAMP NOT NULL PRIMARY KEY);
+SET TIMESTAMP=1171346973;
+INSERT INTO t1 (c1) VALUES(NOW());
+INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01'));
+INSERT INTO t1 (c1) VALUES(NOW());
+ERROR 23000: Duplicate entry '2007-02-13 09:09:33' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+2007-02-13 09:09:33
+2007-02-14 10:10:34
+DROP TABLE t1;
+CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY);
+INSERT INTO t1 (c1) VALUES(1999);
+INSERT INTO t1 (c1) VALUES(2000);
+INSERT INTO t1 (c1) VALUES(1999);
+ERROR 23000: Duplicate entry '1999' for key 'PRIMARY'
+SELECT * FROM t1;
+c1
+1999
+2000
+DROP TABLE t1;