Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
This commit is contained in:
commit
8b829fb1ae
@ -346,3 +346,9 @@ call test27759();
|
|||||||
a b a_then_b b_then_a c_then_a
|
a b a_then_b b_then_a c_then_a
|
||||||
2007-04-10 2007-04-11 2007-04-10 2007-04-10 2004-04-09 00:00:00
|
2007-04-10 2007-04-11 2007-04-10 2007-04-10 2004-04-09 00:00:00
|
||||||
drop procedure test27759;
|
drop procedure test27759;
|
||||||
|
create table t1 (f1 date);
|
||||||
|
insert into t1 values (curdate());
|
||||||
|
select left(f1,10) = curdate() from t1;
|
||||||
|
left(f1,10) = curdate()
|
||||||
|
1
|
||||||
|
drop table t1;
|
||||||
|
@ -225,3 +225,12 @@ END;|
|
|||||||
DELIMITER ;|
|
DELIMITER ;|
|
||||||
call test27759();
|
call test27759();
|
||||||
drop procedure test27759;
|
drop procedure test27759;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#28208: Wrong result of a non-const STRING function with a const
|
||||||
|
# DATETIME function.
|
||||||
|
#
|
||||||
|
create table t1 (f1 date);
|
||||||
|
insert into t1 values (curdate());
|
||||||
|
select left(f1,10) = curdate() from t1;
|
||||||
|
drop table t1;
|
||||||
|
@ -661,7 +661,7 @@ int Arg_comparator::set_cmp_func(Item_bool_func2 *owner_arg,
|
|||||||
Item_result type)
|
Item_result type)
|
||||||
{
|
{
|
||||||
enum enum_date_cmp_type cmp_type;
|
enum enum_date_cmp_type cmp_type;
|
||||||
ulonglong const_value;
|
ulonglong const_value= (ulonglong)-1;
|
||||||
a= a1;
|
a= a1;
|
||||||
b= a2;
|
b= a2;
|
||||||
|
|
||||||
@ -674,8 +674,7 @@ int Arg_comparator::set_cmp_func(Item_bool_func2 *owner_arg,
|
|||||||
a_cache= 0;
|
a_cache= 0;
|
||||||
b_cache= 0;
|
b_cache= 0;
|
||||||
|
|
||||||
if (cmp_type != CMP_DATE_WITH_DATE &&
|
if (const_value != (ulonglong)-1)
|
||||||
((*b)->const_item() || (*a)->const_item()))
|
|
||||||
{
|
{
|
||||||
Item_cache_int *cache= new Item_cache_int();
|
Item_cache_int *cache= new Item_cache_int();
|
||||||
/* Mark the cache as non-const to prevent re-caching. */
|
/* Mark the cache as non-const to prevent re-caching. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user