Below is the list of changes that have just been committed into a local
5.0 repository of mleich. When mleich does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-31 17:21:29+01:00, mleich@stripped +1 -0
Fix for
Bug#29290 type_datetime.test failure in 5.1
mysql-test/t/type_datetime.test@stripped, 2007-10-31 17:21:27+01:00, mleich@stripped
+17 -3
- If we are too close to midnight
sleep till we reach midnight + 1 second.
- Replace error numbers with error names.
diff -Nrup a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
--- a/mysql-test/t/type_datetime.test 2007-10-09 19:40:20 +02:00
+++ b/mysql-test/t/type_datetime.test 2007-10-31 17:21:27 +01:00
@@ -155,13 +155,13 @@ set @@sql_mode='ansi,traditional';
insert into t1 values ('2007-03-23 13:49:38','2007-03-23 13:49:38');
insert into t1 set dt='2007-03-23 13:49:38',da=dt;
# Test error handling
---error 1292
+--error ER_TRUNCATED_WRONG_VALUE
insert into t1 values ('2007-03-32','2007-03-23 13:49:38');
select * from t1;
drop table t1;
---error 1067
+--error ER_INVALID_DEFAULT
create table t1 (da date default '1962-03-32 23:33:34', dt datetime default
'1962-03-03');
---error 1067
+--error ER_INVALID_DEFAULT
create table t1 (t time default '916:00:00 a');
set @@sql_mode= @org_mode;
@@ -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;
| Thread |
|---|
| • bk commit into 5.0 tree (mleich:1.2545) BUG#29290 | mleich | 31 Oct |