Commit b8c2349c authored by Vinay Fisrekar's avatar Vinay Fisrekar

merge 5.1 -> 5.5

adjust/modify tests as they were failing if system time zone is set differently.
parents d4b0897c da604543
DROP TABLE IF EXISTS t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -89,3 +90,4 @@ c1 ...@@ -89,3 +90,4 @@ c1
2007-02-16 12:10:34 2007-02-16 12:10:34
2007-02-17 13:10:34 2007-02-17 13:10:34
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NULL, c3 DATE NULL, PRIMARY KEY(c1), UNIQUE(c2)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NULL, c3 DATE NULL, PRIMARY KEY(c1), UNIQUE(c2));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'4 04:01:01'),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'4 04:01:01'),NOW());
...@@ -128,3 +129,4 @@ c1 c2 c3 ...@@ -128,3 +129,4 @@ c1 c2 c3
2003 2001 2000 2003 2001 2000
2004 2000 2000 2004 2000 2000
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -82,3 +83,4 @@ c1 ...@@ -82,3 +83,4 @@ c1
2000 2000
2011 2011
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -87,3 +88,4 @@ c1 ...@@ -87,3 +88,4 @@ c1
1999 1999
2000 2000
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -87,3 +88,4 @@ c1 ...@@ -87,3 +88,4 @@ c1
1999 1999
2000 2000
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL UNIQUE); CREATE TABLE t1(c1 DATE NULL UNIQUE);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -82,3 +83,4 @@ c1 ...@@ -82,3 +83,4 @@ c1
2000 2000
2011 2011
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL UNIQUE); CREATE TABLE t1(c1 DATE NULL UNIQUE);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -87,3 +88,4 @@ c1 ...@@ -87,3 +88,4 @@ c1
1999 1999
2000 2000
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL UNIQUE); CREATE TABLE t1(c1 DATE NULL UNIQUE);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -81,3 +82,4 @@ c1 ...@@ -81,3 +82,4 @@ c1
1999 1999
2000 2000
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -144,3 +145,4 @@ c1 c2 c3 ...@@ -144,3 +145,4 @@ c1 c2 c3
2011 2011 2000 2011 2011 2000
2011 2011 2011 2011 2011 2011
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -147,3 +148,4 @@ c1 c2 c3 ...@@ -147,3 +148,4 @@ c1 c2 c3
1999 2000 1999 1999 2000 1999
2000 1999 1999 2000 1999 1999
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -147,3 +148,4 @@ c1 c2 c3 ...@@ -147,3 +148,4 @@ c1 c2 c3
1999 2000 1999 1999 2000 1999
2000 1999 1999 2000 1999 1999
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3)); CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -144,3 +145,4 @@ c1 c2 c3 ...@@ -144,3 +145,4 @@ c1 c2 c3
2011 2011 2000 2011 2011 2000
2011 2011 2011 2011 2011 2011
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3)); CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -147,3 +148,4 @@ c1 c2 c3 ...@@ -147,3 +148,4 @@ c1 c2 c3
1999 2000 1999 1999 2000 1999
2000 1999 1999 2000 1999 1999
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3)); CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -139,3 +140,4 @@ c1 c2 c3 ...@@ -139,3 +140,4 @@ c1 c2 c3
1999 2000 1999 1999 2000 1999
2000 1999 1999 2000 1999 1999
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -144,3 +145,4 @@ c1 c2 c3 ...@@ -144,3 +145,4 @@ c1 c2 c3
2011 2011 2000 2011 2011 2000
2011 2011 2011 2011 2011 2011
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
DROP TABLE IF EXISTS t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3;
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL); CREATE TABLE t1(c1 DATE NOT NULL);
SET TIMESTAMP=1171346973; SET TIMESTAMP=1171346973;
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -104,3 +105,4 @@ c1 ...@@ -104,3 +105,4 @@ c1
2007-02-13 09:09:33 2007-02-13 09:09:33
2007-02-14 10:10:34 2007-02-14 10:10:34
DROP TABLE t1; DROP TABLE t1;
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -45,4 +47,5 @@ SELECT * FROM t1 ORDER BY c1; ...@@ -45,4 +47,5 @@ SELECT * FROM t1 ORDER BY c1;
DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01'); DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01');
SELECT * FROM t1 ORDER BY c1; SELECT * FROM t1 ORDER BY c1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NULL, c3 DATE NULL, PRIMARY KEY(c1), UNIQUE(c2)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NULL, c3 DATE NULL, PRIMARY KEY(c1), UNIQUE(c2));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'4 04:01:01'),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'4 04:01:01'),NOW());
...@@ -70,4 +72,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(2000,2000,2000) ON DUPLICATE KEY UPDATE c3=2011 ...@@ -70,4 +72,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(2000,2000,2000) ON DUPLICATE KEY UPDATE c3=2011
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(1999) ON DUPLICATE KEY UPDATE c1=2011; ...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(1999) ON DUPLICATE KEY UPDATE c1=2011;
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(2000); ...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(2000);
INSERT INTO t1 (c1) VALUES(1999); INSERT INTO t1 (c1) VALUES(1999);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY); CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -61,4 +63,6 @@ INSERT INTO t1 (c1) VALUES(2000); ...@@ -61,4 +63,6 @@ INSERT INTO t1 (c1) VALUES(2000);
INSERT INTO t1 (c1) VALUES(1999); INSERT INTO t1 (c1) VALUES(1999);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL UNIQUE); CREATE TABLE t1(c1 DATE NULL UNIQUE);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(1999) ON DUPLICATE KEY UPDATE c1=2011; ...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(1999) ON DUPLICATE KEY UPDATE c1=2011;
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL UNIQUE); CREATE TABLE t1(c1 DATE NULL UNIQUE);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(2000); ...@@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(2000);
INSERT INTO t1 (c1) VALUES(1999); INSERT INTO t1 (c1) VALUES(1999);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL UNIQUE); CREATE TABLE t1(c1 DATE NULL UNIQUE);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -53,4 +55,5 @@ INSERT INTO t1 (c1) VALUES(2000); ...@@ -53,4 +55,5 @@ INSERT INTO t1 (c1) VALUES(2000);
INSERT IGNORE INTO t1 (c1) VALUES(1999); INSERT IGNORE INTO t1 (c1) VALUES(1999);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
#restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -85,4 +87,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011 ...@@ -85,4 +87,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999); ...@@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000); INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999); ...@@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000); INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3)); CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -85,4 +87,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011 ...@@ -85,4 +87,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3)); CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999); ...@@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000); INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3)); CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -85,4 +87,6 @@ INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,2000); ...@@ -85,4 +87,6 @@ INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3)); CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
...@@ -93,4 +95,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011 ...@@ -93,4 +95,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3;
--enable_warnings --enable_warnings
# Set Correct timezone to match result
SET TIME_ZONE="+03:00";
CREATE TABLE t1(c1 DATE NOT NULL); CREATE TABLE t1(c1 DATE NOT NULL);
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33 SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
INSERT INTO t1 (c1) VALUES(NOW()); INSERT INTO t1 (c1) VALUES(NOW());
...@@ -53,4 +55,5 @@ UPDATE t1 SET c1 = NOW() WHERE c1 >= ADDTIME(NOW(),'2 02:01:01'); ...@@ -53,4 +55,5 @@ UPDATE t1 SET c1 = NOW() WHERE c1 >= ADDTIME(NOW(),'2 02:01:01');
--sorted_result --sorted_result
SELECT * FROM t1 ORDER BY c1; SELECT * FROM t1 ORDER BY c1;
DROP TABLE t1; DROP TABLE t1;
# Restore timezone to default
SET TIME_ZONE= @@global.time_zone;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment