diff options
Diffstat (limited to 'mysql-test/suite/engines/funcs/t/in_calendar_pk_constraint_ignore.test')
-rw-r--r-- | mysql-test/suite/engines/funcs/t/in_calendar_pk_constraint_ignore.test | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/mysql-test/suite/engines/funcs/t/in_calendar_pk_constraint_ignore.test b/mysql-test/suite/engines/funcs/t/in_calendar_pk_constraint_ignore.test new file mode 100644 index 00000000000..36a8ef3a0a7 --- /dev/null +++ b/mysql-test/suite/engines/funcs/t/in_calendar_pk_constraint_ignore.test @@ -0,0 +1,64 @@ +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); +SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 +INSERT INTO t1 (c1) VALUES(NOW()); +INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(NOW()); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY); +INSERT INTO t1 (c1) VALUES(1999); +INSERT INTO t1 (c1) VALUES(2000); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(1999); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY); +SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 +INSERT INTO t1 (c1) VALUES(NOW()); +INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(NOW()); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY); +INSERT INTO t1 (c1) VALUES(1999); +INSERT INTO t1 (c1) VALUES(2000); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(1999); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1(c1 DATETIME NOT NULL PRIMARY KEY); +SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 +INSERT INTO t1 (c1) VALUES(NOW()); +INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(NOW()); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY); +INSERT INTO t1 (c1) VALUES(1999); +INSERT INTO t1 (c1) VALUES(2000); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(1999); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1(c1 TIMESTAMP NOT NULL PRIMARY KEY); +SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 +INSERT INTO t1 (c1) VALUES(NOW()); +INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(NOW()); +SELECT * FROM t1; +DROP TABLE t1; +CREATE TABLE t1(c1 YEAR NOT NULL PRIMARY KEY); +INSERT INTO t1 (c1) VALUES(1999); +INSERT INTO t1 (c1) VALUES(2000); +--error ER_DUP_ENTRY +INSERT INTO t1 (c1) VALUES(1999); +SELECT * FROM t1; +DROP TABLE t1; + |