diff options
Diffstat (limited to 'mysql-test/main/type_datetime.test')
-rw-r--r-- | mysql-test/main/type_datetime.test | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test index 3c8287f8793..7bd7883f469 100644 --- a/mysql-test/main/type_datetime.test +++ b/mysql-test/main/type_datetime.test @@ -175,12 +175,12 @@ set @@sql_mode= @org_mode; ## ( Bug#29290 type_datetime.test failure in 5.1 ) ## Therefore we sleep a bit if we are too close to midnight. ## The complete test itself needs around 1 second. -## Therefore a time_distance to midnight of 5 seconds should be sufficient. -if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`) +## Therefore a time_distance to midnight of 10 seconds should be sufficient. +if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 10)`) { - # We are here when CURTIME() is between '23:59:56' and '23:59:59'. - # So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'. - --real_sleep 5 + # We are here when CURTIME() is between '23:59:51' and '23:59:59'. + # So a sleep time of 10 seconds brings us between '00:00:01' and '00:00:09'. + --real_sleep 10 } create table t1 (f1 date, f2 datetime, f3 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); insert into t1(f1) values(curdate()); @@ -899,5 +899,34 @@ DROP TABLE t1; --echo # +--echo # MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning +--echo # + +CREATE TABLE t1 (b BIT(20)); +CREATE TABLE t2 (t DATETIME); +INSERT IGNORE INTO t1 VALUES (b'000001001100000'); +INSERT INTO t2 SELECT * FROM t1; +DROP TABLE t1, t2; + +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED); +DROP TABLE t1; + + +--echo # +--echo # MDEV-17563 Different results using table or view when comparing values of time type +--echo # + +CREATE TABLE t1 (pk int, x1 datetime, x2 varchar(1)); +INSERT INTO t1 VALUES (17,'2001-01-01 09:16:37',''); +INSERT INTO t1 VALUES (18,'2001-01-01 09:16:37','k'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT pk FROM t1 WHERE x1 >x2; +SELECT pk FROM v1 WHERE x1 >x2; +DROP VIEW v1; +DROP TABLE t1; + + +--echo # --echo # End of 10.4 tests --echo # |