diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-09-28 14:01:17 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-09-28 14:01:17 +0400 |
commit | ad8e02ac452dc94d64b65cb9855b6dba97b651d4 (patch) | |
tree | 7c355aab42a911476eaa10520d1adbabb7091243 /sql/item_vers.cc | |
parent | 492998c0d80aa7d5c4804ac7792a38333e3b83dd (diff) | |
download | mariadb-git-ad8e02ac452dc94d64b65cb9855b6dba97b651d4.tar.gz |
MDEV-17317 Add THD* parameter into Item::get_date() and stricter data type control to "fuzzydate"
Diffstat (limited to 'sql/item_vers.cc')
-rw-r--r-- | sql/item_vers.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/item_vers.cc b/sql/item_vers.cc index d7361f687f9..6946ae0e1e5 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,7 @@ Item_func_trt_id::val_int() else { MYSQL_TIME commit_ts; - if (args[0]->get_date(&commit_ts, 0)) + if (args[0]->get_date(current_thd, &commit_ts, date_mode_t(0))) { null_value= true; return 0; |