1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Make suite/optimizer_unfixed_bugs/t/bug43618.test work in any timezone.

This commit is contained in:
Sergey Petrunya
2010-11-29 22:13:16 +03:00
parent f2abf5f6b1
commit acb9ba8a4f
2 changed files with 6 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
set @save_time_zone= @@time_zone;
set time_zone='+03:00';
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28');
Warnings:
@@ -52,3 +54,4 @@ Warnings:
Warning 1292 Incorrect datetime value: '2010-10-00 00:00:00' for column 'c2' at row 1
Warning 1292 Incorrect datetime value: '2010-10-00 00:00:00' for column 'c2' at row 1
DROP TABLE t1;
set time_zone= @save_time_zone;

View File

@@ -3,6 +3,8 @@
--source include/have_debug.inc
set @save_time_zone= @@time_zone;
set time_zone='+03:00';
# bug goes away with
#set session debug="+d,optimizer_no_icp";
@@ -43,4 +45,5 @@ SELECT * FROM t1;
SELECT * FROM t1 WHERE c1 BETWEEN '0000-00-00' AND '2010-00-01 00:00:00' ORDER BY c1 DESC LIMIT 2;
SELECT * FROM t1 WHERE c2 BETWEEN '1971-01-01 00:00:01' AND '2010-10-00 00:00:00' ORDER BY c2 DESC LIMIT 2;
DROP TABLE t1;
set time_zone= @save_time_zone;