|
|||||||||||
|
bk commit into 5.0 tree (mleich:1.2545) BUG#29290
From: <mleich(at)mysql.com>
Date: Wed Oct 31 2007 - 12:21:32 EDT
ChangeSet@1.2545, 2007-10-31 17:21:29+01:00, mleich@four.local.lan +1 -0 Fix for Bug#29290 type_datetime.test failure in 5.1 mysql-test/t/type_datetime.test@1.36, 2007-10-31 17:21:27+01:00, mleich@four.local.lan +17 -3
diff -Nrup a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
@@ -169,6 +169,20 @@ set @@sql_mode= @org_mode;
#
# Bug#27590: Wrong DATE/DATETIME comparison.
#
+## The following sub test will fail (difference to expected result) if the
+## select curdate() < now(), f1 < now(), cast(f1 as date) < now() from t1;
+## runs exact at midnight ('00:00:00').
+## ( 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.
+let $time_distance= 5;
+if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - $time_distance)`)
+{
+ # Sleep till we reach '00:00:00' + 1 second
+ --real_sleep $time_distance
+ --real_sleep 1 +} create table t1 (f1 date, f2 datetime, f3 timestamp); insert into t1(f1) values(curdate()); select curdate() < now(), f1 < now(), cast(f1 as date) < now() from t1; -- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Wed Oct 31 13:22:05 2007 This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 11:13:05 EDT |
||||||||||
|
|||||||||||