summaryrefslogtreecommitdiff
path: root/sql/item_vers.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-11-23 19:04:42 +0400
committerAlexander Barkov <bar@mariadb.com>2018-11-26 08:10:47 +0400
commit4447a02cf13a49876001a40ca7db8fdedb731fd5 (patch)
tree1ccf39024e26a1efa68237e5d44a2296a990441d /sql/item_vers.cc
parent27f3329ff6cb755b600d536347669bef1a7d98b5 (diff)
downloadmariadb-git-4447a02cf13a49876001a40ca7db8fdedb731fd5.tar.gz
MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMPbb-10.4-mdev16991
Diffstat (limited to 'sql/item_vers.cc')
-rw-r--r--sql/item_vers.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_vers.cc b/sql/item_vers.cc
index 6946ae0e1e5..c4bb734096f 100644
--- a/sql/item_vers.cc
+++ b/sql/item_vers.cc
@@ -142,7 +142,9 @@ Item_func_trt_id::val_int()
else
{
MYSQL_TIME commit_ts;
- if (args[0]->get_date(current_thd, &commit_ts, date_mode_t(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;