2009
void Item_func_convert_tz::fix_length_and_dec()
2011
collation.set(&my_charset_bin);
2013
max_length= MAX_DATETIME_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
2018
String *Item_func_convert_tz::val_str(String *str)
2020
MYSQL_TIME time_tmp;
2022
if (get_date(&time_tmp, 0))
2025
if (str->alloc(MAX_DATE_STRING_REP_LENGTH))
2031
make_datetime((DATE_TIME_FORMAT *) 0, &time_tmp, str);
2037
longlong Item_func_convert_tz::val_int()
2039
MYSQL_TIME time_tmp;
2041
if (get_date(&time_tmp, 0))
2044
return (longlong)TIME_to_ulonglong_datetime(&time_tmp);
2048
bool Item_func_convert_tz::get_date(MYSQL_TIME *ltime,
2049
uint fuzzy_date __attribute__((unused)))
2051
my_time_t my_time_tmp;
2053
THD *thd= current_thd;
2055
if (!from_tz_cached)
2057
from_tz= my_tz_find(thd, args[1]->val_str(&str));
2058
from_tz_cached= args[1]->const_item();
2063
to_tz= my_tz_find(thd, args[2]->val_str(&str));
2064
to_tz_cached= args[2]->const_item();
2067
if (from_tz==0 || to_tz==0 || get_arg0_date(ltime, TIME_NO_ZERO_DATE))
2075
my_time_tmp= from_tz->TIME_to_gmt_sec(ltime, ¬_used);
2076
/* my_time_tmp is guranteed to be in the allowed range */
2078
to_tz->gmt_sec_to_TIME(ltime, my_time_tmp);
2086
void Item_func_convert_tz::cleanup()
2088
from_tz_cached= to_tz_cached= 0;
2089
Item_date_func::cleanup();
2093
2009
void Item_date_add_interval::fix_length_and_dec()
2095
2011
enum_field_types arg0_field_type;