2 DROP TABLE IF EXISTS t1;
4 # Set Correct timezone to match result
5 SET TIME_ZONE="+03:00";
6 CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
7 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
8 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
9 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
10 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW());
11 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW());
12 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
13 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
17 CREATE TABLE t1(c1 YEAR NULL, c2 YEAR NULL, c3 YEAR NULL, UNIQUE(c1,c2,c3));
18 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
19 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
20 INSERT INTO t1 (c1,c2,c3) VALUES(1999,2000,1999);
21 INSERT INTO t1 (c1,c2,c3) VALUES(2000,1999,1999);
22 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
23 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
27 CREATE TABLE t1(c1 TIME NULL, c2 TIME NULL, c3 TIME NULL, UNIQUE(c1,c2,c3));
28 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
29 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
30 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
31 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW());
32 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW());
33 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
34 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
38 CREATE TABLE t1(c1 YEAR NULL, c2 YEAR NULL, c3 YEAR NULL, UNIQUE(c1,c2,c3));
39 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
40 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
41 INSERT INTO t1 (c1,c2,c3) VALUES(1999,2000,1999);
42 INSERT INTO t1 (c1,c2,c3) VALUES(2000,1999,1999);
43 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
44 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
48 CREATE TABLE t1(c1 DATETIME NULL, c2 DATETIME NULL, c3 DATETIME NULL, UNIQUE(c1,c2,c3));
49 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
50 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
51 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
52 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW());
53 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW());
54 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
55 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
59 CREATE TABLE t1(c1 YEAR NULL, c2 YEAR NULL, c3 YEAR NULL, UNIQUE(c1,c2,c3));
60 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
61 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
62 INSERT INTO t1 (c1,c2,c3) VALUES(1999,2000,1999);
63 INSERT INTO t1 (c1,c2,c3) VALUES(2000,1999,1999);
64 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
65 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
69 CREATE TABLE t1(c1 TIMESTAMP NULL, c2 TIMESTAMP NULL, c3 TIMESTAMP NULL, UNIQUE(c1,c2,c3));
70 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
71 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
72 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
73 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW());
74 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW());
75 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
76 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01'));
80 CREATE TABLE t1(c1 YEAR NULL, c2 YEAR NULL, c3 YEAR NULL, UNIQUE(c1,c2,c3));
81 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
82 INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
83 INSERT INTO t1 (c1,c2,c3) VALUES(1999,2000,1999);
84 INSERT INTO t1 (c1,c2,c3) VALUES(2000,1999,1999);
85 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
86 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
90 # Restore timezone to default
91 SET TIME_ZONE= @@global.time_zone;