diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-03-07 21:57:17 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-03-07 21:57:17 +0100 |
commit | 30e5b4d7196eb56ef3032f016823ecaae2207680 (patch) | |
tree | 34869702a2436da52d3bb42ec26b9e7a284525dd /mysql-test/r/func_time.result | |
parent | 19a3c29d64e050a4ab99621856455361ffe56eb0 (diff) | |
download | mariadb-git-30e5b4d7196eb56ef3032f016823ecaae2207680.tar.gz |
lp:730637 - Valgrind warnings in 5.1-micro
sql/field.cc:
initialize ltime completely
sql/filesort.cc:
don't pack MYSQL_TIME if it's not initialized
(safe here, but valgrind complains)
sql/item_cmpfunc.cc:
don't pack MYSQL_TIME if it's not initialized
(safe here, but valgrind complains)
sql/item_timefunc.cc:
don't check MYSQL_TIME members if it's uninitialized
(safe here, but valgrind complains)
sql/time.cc:
use c_ptr_safe() instead of c_ptr()
(make valgrind happy)
Diffstat (limited to 'mysql-test/r/func_time.result')
-rw-r--r-- | mysql-test/r/func_time.result | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index bfbc33b6cab..bc0fc98cd54 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1427,6 +1427,22 @@ Warning 1292 Incorrect datetime value: '2010-40-50' select subtime('0000-00-10 10:10:10', '30 10:00:00'); subtime('0000-00-10 10:10:10', '30 10:00:00') NULL +select cast(str_to_date(NULL, '%H:%i:%s') as time); +cast(str_to_date(NULL, '%H:%i:%s') as time) +NULL +create table t1 (a timestamp,key(a)); +insert t1 values ('2010-01-01 02:03:04'); +insert t1 select a + interval 1 day from t1; +insert t1 select a + interval 2 day from t1; +insert t1 select a + interval 4 day from t1; +insert t1 select a + interval 8 day from t1; +insert t1 select a + interval 16 day from t1; +explain select * from t1 where a > cast('2010-10-00 01:02:03' as datetime); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index a a 4 NULL 32 Using where; Using index +Warnings: +Warning 1292 Incorrect datetime value: '2010-10-00 01:02:03' for column 'a' at row 1 +drop table t1; select maketime(20,61,10)+0; maketime(20,61,10)+0 NULL |