5.3 doesn't convert SP call to constant because of this piece of code in item_cmpfunc.cc:convert_const_to_int() :
/*
We don't need to convert an integer to an integer,
pretend it's already converted.
But we still convert it if it is compared with a Field_year,
as YEAR(2) may change the value of an integer when converting it
to an integer (say, 0 to 70).
*/
if ((*item)->cmp_type() == INT_RESULT &&
field_item->field_type() != MYSQL_TYPE_YEAR)
return 1;
it was added by the cset: <email address hidden>, "merge with 5.1-micro".
5.3 doesn't convert SP call to constant because of this piece of code in item_cmpfunc. cc:convert_ const_to_ int() :
/*
We don't need to convert an integer to an integer,
pretend it's already converted.
But we still convert it if it is compared with a Field_year, ->cmp_type( ) == INT_RESULT && item->field_ type() != MYSQL_TYPE_YEAR)
as YEAR(2) may change the value of an integer when converting it
to an integer (say, 0 to 70).
*/
if ((*item)
field_
return 1;
it was added by the cset: <email address hidden>, "merge with 5.1-micro".