diff options
Diffstat (limited to 'sql/item_vers.cc')
-rw-r--r-- | sql/item_vers.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/item_vers.cc b/sql/item_vers.cc index d7361f687f9..c4bb734096f 100644 --- a/sql/item_vers.cc +++ b/sql/item_vers.cc @@ -37,9 +37,8 @@ Item_func_trt_ts::Item_func_trt_ts(THD *thd, Item* a, TR_table::field_id_t _trt_ bool -Item_func_trt_ts::get_date(MYSQL_TIME *res, ulonglong fuzzy_date) +Item_func_trt_ts::get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) { - THD *thd= current_thd; // can it differ from constructor's? DBUG_ASSERT(thd); DBUG_ASSERT(args[0]); if (args[0]->result_type() != INT_RESULT) @@ -67,7 +66,7 @@ Item_func_trt_ts::get_date(MYSQL_TIME *res, ulonglong fuzzy_date) return true; } - return trt[trt_field]->get_date(res, fuzzy_date); + return trt[trt_field]->get_date(res, fuzzydate); } @@ -143,7 +142,9 @@ Item_func_trt_id::val_int() else { MYSQL_TIME commit_ts; - if (args[0]->get_date(&commit_ts, 0)) + THD *thd= current_thd; + Datetime::Options opt(TIME_CONV_NONE, thd); + if (args[0]->get_date(thd, &commit_ts, opt)) { null_value= true; return 0; |