summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 74427da4cf2..c36f177223b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2015, MariaDB
+ Copyright (c) 2009, 2017, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1729,6 +1729,7 @@ my_decimal *Item_func_mod::decimal_op(my_decimal *decimal_value)
return decimal_value;
case E_DEC_DIV_ZERO:
signal_divide_by_null();
+ /* fall through */
default:
null_value= 1;
return 0;
@@ -3648,6 +3649,7 @@ longlong Item_master_gtid_wait::val_int()
{
DBUG_ASSERT(fixed == 1);
longlong result= 0;
+ String *gtid_pos = args[0]->val_str(&value);
if (args[0]->null_value)
{
@@ -3659,7 +3661,6 @@ longlong Item_master_gtid_wait::val_int()
#ifdef HAVE_REPLICATION
THD* thd= current_thd;
longlong timeout_us;
- String *gtid_pos = args[0]->val_str(&value);
if (arg_count==2 && !args[1]->null_value)
timeout_us= (longlong)(1e6*args[1]->val_real());