You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Removing Item_typecast, as it's not needed any more.
Before WL#946 it was a common parent for Item_char_typecast,
Item_date_typecast, Item_time_typecast and Item_datetime_typecast.
Now casts to the temporal types descend from the corresponding
Item_{date|time|datetime}_func.
Making Item_char_typecast descend from Item_str_func directly
- Moving Item_char_typecast
from item_timefunc.cc and item_timefunc.h
to item_strfunc.cc and item_strfunc.h (finally!!!).
These methods have been moved AS IS (cut and paste):
Item_char_typecast::eq()
Item_char_typecast::print()
Item_char_typecast::val_str()
The method Item_char_typecast::fix_length_and_dec()
has had some slight changes:
a. in how "from_cs" variable is initialized.
Now we check args[0]->collation.repertoire instead of
args[0]->result_type(). This helps to avoid character set conversion
in more cases.
b. in how max_length is calculated. Instead of direct access to max_length,
now we use methods max_char_length() and fix_char_length() introduced
by WL#2649 Number-to-string conversions.
- Fixing that Item_sp_varianble and Item_named_const did not
initialize their collation.repertoire properly
(only collation.collation and collation.derivation were initialized).
This flaws were found by adding this code into
Item_char_typecast::fix_length_and_dec() temporary and running mtr:
if (args[0]->result_type() == INT_RESULT ||
args[0]->result_type() == DECIMAL_RESULT ||
args[0]->result_type() == REAL_RESULT)
{
DBUG_ASSERT(args[0]->collation.collation == &my_charset_numeric);
DBUG_ASSERT(args[0]->collation.repertoire == MY_REPERTOIRE_ASCII);
}
- Recording ctype_cp1251.result and ctype_utf8.result,
caused by initializing Item_sp_variable::collation.repertoire properly.
0 commit comments