diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-03-23 22:36:46 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-03-23 22:36:46 +0100 |
commit | f67a2211ec48b1b1502a7095c50cd9195d8235f8 (patch) | |
tree | 93e5d158a4a2a1dca4be915f8cf9dc79b3b6d96c /sql/set_var.h | |
parent | a75d26946423d2142921411bf7bdc731eba4df1a (diff) | |
parent | 2783fc7d14bc8ad16acfeb509d3b19615023f47a (diff) | |
download | mariadb-git-f67a2211ec48b1b1502a7095c50cd9195d8235f8.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index b8192e67ca9..cf86ecf18fa 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -137,8 +137,9 @@ public: bool is_set_stmt_ok() const { return !(flags & NO_SET_STATEMENT); } bool is_written_to_binlog(enum_var_type type) { return type != OPT_GLOBAL && binlog_status == SESSION_VARIABLE_IN_BINLOG; } - bool check_update_type(Item_result type) + bool check_update_type(const Item *item) { + Item_result type= item->result_type(); switch (option.var_type & GET_TYPE_MASK) { case GET_INT: case GET_UINT: @@ -146,7 +147,8 @@ public: case GET_ULONG: case GET_LL: case GET_ULL: - return type != INT_RESULT; + return type != INT_RESULT && + (type != DECIMAL_RESULT || item->decimals != 0); case GET_STR: case GET_STR_ALLOC: return type != STRING_RESULT; |