diff --git a/sql/create_options.cc b/sql/create_options.cc index 5adcb2f1e9e..a8d997efaf4 100644 --- a/sql/create_options.cc +++ b/sql/create_options.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2010, 2017, MariaDB Corporation Ab +/* Copyright (C) 2010, 2019, MariaDB Corporation. 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 @@ -132,7 +132,8 @@ static bool set_one_value(ha_create_table_option *opt, switch (opt->type) { case HA_OPTION_TYPE_SYSVAR: - DBUG_ASSERT(0); // HA_OPTION_TYPE_SYSVAR's are replaced in resolve_sysvars() + // HA_OPTION_TYPE_SYSVAR's are replaced in resolve_sysvars() + break; // to DBUG_ASSERT(0) case HA_OPTION_TYPE_ULL: { ulonglong *val= (ulonglong*)value_ptr(base, opt); diff --git a/sql/field.h b/sql/field.h index 67e20c5a1b4..3228d51b748 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2008, 2017, MariaDB Corporation. + Copyright (c) 2008, 2019, MariaDB Corporation. 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 @@ -461,6 +461,7 @@ inline bool is_temporal_type_with_date(enum_field_types type) case MYSQL_TYPE_DATETIME2: case MYSQL_TYPE_TIMESTAMP2: DBUG_ASSERT(0); // field->real_type() should not get to here. + /* fall through */ default: return false; } diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 35fc14a0744..8d8ef73fcd1 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2911,6 +2911,7 @@ void st_select_lex_unit::print(String *str, enum_query_type query_type) { default: DBUG_ASSERT(0); + /* fall through */ case UNION_TYPE: str->append(STRING_WITH_LEN(" union ")); if (union_all) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 022c6519a8a..86def348125 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3579,6 +3579,7 @@ mysql_execute_command(THD *thd) case GET_NO_ARG: case GET_DISABLED: DBUG_ASSERT(0); + /* fall through */ case 0: case GET_FLAGSET: case GET_ENUM: diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 77eb51f6368..d551ae4761e 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2569,6 +2569,7 @@ static const LEX_CSTRING *view_algorithm(TABLE_LIST *table) return &merge; default: DBUG_ASSERT(0); // never should happen + /* fall through */ case VIEW_ALGORITHM_UNDEFINED: return &undefined; } diff --git a/sql/table.cc b/sql/table.cc index b75107ab489..4e11ce26658 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -9114,7 +9114,7 @@ bool vers_select_conds_t::eq(const vers_select_conds_t &conds) const case SYSTEM_TIME_ALL: return true; case SYSTEM_TIME_BEFORE: - DBUG_ASSERT(0); + break; case SYSTEM_TIME_AS_OF: return start.eq(conds.start); case SYSTEM_TIME_FROM_TO: diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 5bf7fb9df58..e22b1c4e314 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -826,6 +826,7 @@ static void fil_flush_low(fil_space_t* space, bool metadata = false) switch (space->purpose) { case FIL_TYPE_TEMPORARY: ut_ad(0); // we already checked for this + /* fall through */ case FIL_TYPE_TABLESPACE: case FIL_TYPE_IMPORT: fil_n_pending_tablespace_flushes++; diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index d119fca82b6..a4ba9651dbe 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -2135,7 +2135,7 @@ innobase_col_to_mysql( case DATA_SYS: /* These column types should never be shipped to MySQL. */ ut_ad(0); - + /* fall through */ case DATA_FLOAT: case DATA_DOUBLE: case DATA_DECIMAL: diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index 751b7ec36ec..5504eb618fe 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -754,7 +754,7 @@ mtr_t::Command::prepare_write() switch (m_impl->m_log_mode) { case MTR_LOG_SHORT_INSERTS: ut_ad(0); - /* fall through (write no redo log) */ + /* fall through */ case MTR_LOG_NO_REDO: case MTR_LOG_NONE: ut_ad(m_impl->m_log.size() == 0); diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 71fb7fc5f7f..2b1c2d9e0be 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1790,6 +1790,7 @@ row_log_table_apply_insert( break; default: ut_ad(0); + /* fall through */ case DB_INVALID_NULL: ut_ad(row == NULL); return(error); @@ -2078,6 +2079,7 @@ row_log_table_apply_update( break; default: ut_ad(0); + /* fall through */ case DB_INVALID_NULL: ut_ad(row == NULL); return(error); diff --git a/storage/innobase/row/row0uins.cc b/storage/innobase/row/row0uins.cc index 173233f1cd5..77c54aade87 100644 --- a/storage/innobase/row/row0uins.cc +++ b/storage/innobase/row/row0uins.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2018, MariaDB Corporation. +Copyright (c) 2017, 2019, MariaDB Corporation. 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 the Free Software @@ -583,6 +583,7 @@ row_undo_ins( switch (node->rec_type) { default: ut_ad(!"wrong undo record type"); + /* fall through */ case TRX_UNDO_INSERT_REC: /* Skip the clustered index (the first index) */ node->index = dict_table_get_next_index(node->index);