diff options
author | unknown <tnurnberg@mysql.com/sin.mysql.com> | 2007-03-05 14:02:29 +0100 |
---|---|---|
committer | unknown <tnurnberg@mysql.com/sin.mysql.com> | 2007-03-05 14:02:29 +0100 |
commit | 85c3f6df4516dd8799169db64fe6d4a2748d80c0 (patch) | |
tree | cc468bd4f493c78e4e7a65fc928e983b2194a288 | |
parent | fed9bb9820fe89a47f355a9027166ccaf58bf336 (diff) | |
download | mariadb-git-85c3f6df4516dd8799169db64fe6d4a2748d80c0.tar.gz |
Bug#21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Fix BDB queries to still work.
-rw-r--r-- | mysql-test/r/ps_6bdb.result | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index 49e3f9d9bb7..e83a3944d4e 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -3029,25 +3029,25 @@ test_sequence -- select .. where date/time column = .. -- set @arg00= '1991-01-01 01:01:01' ; select 'true' as found from t9 -where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and +where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and c17= '1991-01-01 01:01:01' ; found true select 'true' as found from t9 -where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00 +where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 and c17= @arg00 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and +where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and c17= '1991-01-01 01:01:01'" ; execute stmt1 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ; +where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; found true @@ -3061,7 +3061,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ; found true select 'true' as found from t9 -where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00 +where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 and c17= @arg00 ; found true @@ -3075,7 +3075,7 @@ execute stmt1 ; found true prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ; +where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; found true |