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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user