summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-19 19:46:07 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-20 20:13:28 +0200
commitda2a838628796453c6ab93d51eca9e5aae45791d (patch)
treee9e0c52cdea910774cfcdd4f1c72980be340ed0d /sql/item_func.cc
parent2f07709aed863ea1852a78a0d6ab718e49df8cca (diff)
downloadmariadb-git-da2a838628796453c6ab93d51eca9e5aae45791d.tar.gz
MDEV-12824 GCC 7 warning: this statement may fall through [-Wimplicit-fallthrough=]
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 13ea5291edc..0ca8f700bfc 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -848,8 +848,9 @@ void Item_func_num1::fix_length_and_dec()
{
DBUG_ENTER("Item_func_num1::fix_length_and_dec");
DBUG_PRINT("info", ("name %s", func_name()));
- switch (cached_result_type= args[0]->cast_to_int_type()) {
+ switch (args[0]->cast_to_int_type()) {
case INT_RESULT:
+ cached_result_type= INT_RESULT;
max_length= args[0]->max_length;
unsigned_flag= args[0]->unsigned_flag;
break;
@@ -860,8 +861,8 @@ void Item_func_num1::fix_length_and_dec()
max_length= float_length(decimals);
break;
case TIME_RESULT:
- cached_result_type= DECIMAL_RESULT;
case DECIMAL_RESULT:
+ cached_result_type= DECIMAL_RESULT;
decimals= args[0]->decimal_scale(); // Do not preserve NOT_FIXED_DEC
max_length= args[0]->max_length;
break;