summaryrefslogtreecommitdiff
path: root/sql
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
parent2f07709aed863ea1852a78a0d6ab718e49df8cca (diff)
downloadmariadb-git-da2a838628796453c6ab93d51eca9e5aae45791d.tar.gz
MDEV-12824 GCC 7 warning: this statement may fall through [-Wimplicit-fallthrough=]
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc5
-rw-r--r--sql/log.cc2
-rw-r--r--sql/sql_repl.cc1
3 files changed, 5 insertions, 3 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;
diff --git a/sql/log.cc b/sql/log.cc
index 3cad1716ca4..ee92f22adb8 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -9405,8 +9405,8 @@ int TC_LOG_BINLOG::recover(LOG_INFO *linfo, const char *last_log_name,
sizeof(xev->xid));
if (!x || my_hash_insert(&xids, x))
goto err2;
- break;
}
+ break;
}
case BINLOG_CHECKPOINT_EVENT:
if (first_round && do_xa)
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index ebe89e2b4a0..0ddeeaa0266 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -2665,6 +2665,7 @@ impossible position";
loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK);
break;
}
+ /* fall through */
default:
errmsg = "could not find next log";
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;