--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
SET sql_mode='NO_ENGINE_SUBSTITUTION';
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL UNIQUE);
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'));
INSERT IGNORE INTO t1 (c1) VALUES(NOW());
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 YEAR NULL UNIQUE);
INSERT INTO t1 (c1) VALUES(1999);
INSERT INTO t1 (c1) VALUES(2000);
INSERT IGNORE INTO t1 (c1) VALUES(1999);
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TIME NULL UNIQUE);
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'));
INSERT IGNORE INTO t1 (c1) VALUES(NOW());
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 YEAR NULL UNIQUE);
INSERT INTO t1 (c1) VALUES(1999);
INSERT INTO t1 (c1) VALUES(2000);
INSERT IGNORE INTO t1 (c1) VALUES(1999);
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 DATETIME NULL UNIQUE);
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'));
INSERT IGNORE INTO t1 (c1) VALUES(NOW());
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 YEAR NULL UNIQUE);
INSERT INTO t1 (c1) VALUES(1999);
INSERT INTO t1 (c1) VALUES(2000);
INSERT IGNORE INTO t1 (c1) VALUES(1999);
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 TIMESTAMP NULL UNIQUE);
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'));
INSERT IGNORE INTO t1 (c1) VALUES(NOW());
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 YEAR NULL UNIQUE);
INSERT INTO t1 (c1) VALUES(1999);
INSERT INTO t1 (c1) VALUES(2000);
INSERT IGNORE INTO t1 (c1) VALUES(1999);
SELECT * FROM t1;
DROP TABLE t1;
#restore timezone to default
SET TIME_ZONE= @@global.time_zone;
SET sql_mode=default;
