Browse Source

Silence bogus GCC 7 warnings -Wimplicit-fallthrough

Do not silence uncertain cases, or fix any bugs.

The only functional change should be that ha_federated::extra()
is not calling DBUG_PRINT to report an unhandled case for
HA_EXTRA_PREPARE_FOR_DROP.
pull/322/merge
Marko Mäkelä 9 years ago
parent
commit
7972da8aa1
  1. 1
      client/mysqldump.c
  2. 1
      extra/replace.c
  3. 2
      sql/events.cc
  4. 2
      sql/field.cc
  5. 4
      sql/item.cc
  6. 3
      sql/item_func.cc
  7. 4
      sql/item_strfunc.cc
  8. 7
      sql/log.cc
  9. 3
      sql/mysqld.cc
  10. 3
      sql/opt_sum.cc
  11. 5
      sql/slave.cc
  12. 3
      sql/sp_head.cc
  13. 4
      sql/sql_digest.cc
  14. 5
      sql/sql_lex.cc
  15. 6
      sql/sql_parse.cc
  16. 5
      sql/sql_plugin.cc
  17. 4
      sql/sql_prepare.cc
  18. 3
      sql/sql_show.cc
  19. 3
      sql/sql_table.cc
  20. 2
      sql/sql_yacc.yy
  21. 2
      storage/connect/array.cpp
  22. 4
      storage/connect/filamdbf.cpp
  23. 3
      storage/connect/filamfix.cpp
  24. 1
      storage/connect/filamtxt.cpp
  25. 3
      storage/connect/filamvct.cpp
  26. 3
      storage/connect/filter.cpp
  27. 8
      storage/connect/ha_connect.cc
  28. 4
      storage/connect/json.cpp
  29. 2
      storage/connect/plgdbutl.cpp
  30. 1
      storage/connect/reldef.cpp
  31. 1
      storage/connect/tabdos.cpp
  32. 2
      storage/connect/tabjson.cpp
  33. 2
      storage/connect/value.cpp
  34. 2
      storage/connect/xindex.cpp
  35. 2
      storage/connect/xobject.cpp
  36. 2
      storage/federated/ha_federated.cc
  37. 4
      storage/heap/hp_create.c
  38. 11
      storage/innobase/handler/ha_innodb.cc
  39. 4
      storage/innobase/include/data0type.ic
  40. 15
      storage/innobase/include/mach0data.ic
  41. 7
      storage/innobase/include/ut0rnd.ic
  42. 1
      storage/innobase/row/row0import.cc
  43. 2
      storage/innobase/row/row0log.cc
  44. 3
      storage/innobase/row/row0mysql.cc
  45. 4
      storage/innobase/row/row0purge.cc
  46. 1
      storage/innobase/sync/sync0sync.cc
  47. 3
      storage/maria/ma_extra.c
  48. 2
      storage/maria/ma_recovery.c
  49. 3
      storage/myisam/mi_extra.c
  50. 2
      storage/spider/spd_db_conn.cc
  51. 11
      storage/xtradb/handler/ha_innodb.cc
  52. 3
      storage/xtradb/include/data0type.ic
  53. 15
      storage/xtradb/include/mach0data.ic
  54. 7
      storage/xtradb/include/ut0rnd.ic
  55. 1
      storage/xtradb/row/row0import.cc
  56. 2
      storage/xtradb/row/row0log.cc
  57. 3
      storage/xtradb/row/row0mysql.cc
  58. 4
      storage/xtradb/row/row0purge.cc
  59. 5
      storage/xtradb/sync/sync0sync.cc
  60. 10
      strings/ctype-utf8.c
  61. 8
      strings/dtoa.c

1
client/mysqldump.c

@ -2142,6 +2142,7 @@ static void print_xml_comment(FILE *xml_file, size_t len,
case '-':
if (*(comment_string + 1) == '-') /* Only one hyphen allowed. */
break;
/* fall through */
default:
fputc(*comment_string, xml_file);
break;

1
extra/replace.c

@ -174,6 +174,7 @@ register char **argv[];
break;
case 'V':
version=1;
/* fall through */
case 'I':
case '?':
help=1; /* Help text written */

2
sql/events.cc

@ -1,5 +1,6 @@
/*
Copyright (c) 2005, 2013, Oracle and/or its affiliates.
Copyright (c) 2017, 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
@ -242,6 +243,7 @@ common_1_lev_code:
break;
case INTERVAL_WEEK:
expr/= 7;
/* fall through */
default:
close_quote= FALSE;
break;

2
sql/field.cc

@ -9464,7 +9464,7 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
case MYSQL_TYPE_DATE:
/* We don't support creation of MYSQL_TYPE_DATE anymore */
sql_type= MYSQL_TYPE_NEWDATE;
/* fall trough */
/* fall through */
case MYSQL_TYPE_NEWDATE:
length= MAX_DATE_WIDTH;
break;

4
sql/item.cc

@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
Copyright (c) 2010, 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
@ -5925,7 +5925,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
collation.collation);
break;
}
/* Fall through to make_string_field() */
/* Fall through */
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_SET:
case MYSQL_TYPE_VAR_STRING:

3
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
@ -2034,6 +2034,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;

4
sql/item_strfunc.cc

@ -5090,7 +5090,7 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
goto null;
case DYN_COL_INT:
signed_value= 1; // For error message
/* fall_trough */
/* fall through */
case DYN_COL_UINT:
if (signed_value || val.x.ulong_value <= LONGLONG_MAX)
{
@ -5103,7 +5103,7 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
}
/* let double_to_datetime_with_warn() issue the warning message */
val.x.double_value= static_cast<double>(ULONGLONG_MAX);
/* fall_trough */
/* fall through */
case DYN_COL_DOUBLE:
if (double_to_datetime_with_warn(val.x.double_value, ltime, fuzzy_date,
0 /* TODO */))

7
sql/log.cc

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, 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
@ -8822,8 +8822,10 @@ void TC_LOG_MMAP::close()
mysql_cond_destroy(&COND_pool);
mysql_cond_destroy(&COND_active);
mysql_cond_destroy(&COND_queue_busy);
/* fall through */
case 5:
data[0]='A'; // garble the first (signature) byte, in case mysql_file_delete fails
/* fall through */
case 4:
for (i=0; i < npages; i++)
{
@ -8832,10 +8834,13 @@ void TC_LOG_MMAP::close()
mysql_mutex_destroy(&pages[i].lock);
mysql_cond_destroy(&pages[i].cond);
}
/* fall through */
case 3:
my_free(pages);
/* fall through */
case 2:
my_munmap((char*)data, (size_t)file_length);
/* fall through */
case 1:
mysql_file_close(fd, MYF(0));
}

3
sql/mysqld.cc

@ -8724,6 +8724,9 @@ mysql_getopt_value(const char *name, uint length,
return (uchar**) &key_cache->changed_blocks_hash_size;
}
}
/* We return in all cases above. Let us silence -Wimplicit-fallthrough */
DBUG_ASSERT(0);
/* fall through */
case OPT_REPLICATE_DO_DB:
case OPT_REPLICATE_DO_TABLE:
case OPT_REPLICATE_IGNORE_DB:

3
sql/opt_sum.cc

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
Copyright (c) 2008-2011 Monty Program Ab
Copyright (c) 2008, 2017, 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
@ -1041,6 +1041,7 @@ static int maxmin_in_range(bool max_fl, Field* field, COND *cond)
case Item_func::LT_FUNC:
case Item_func::LE_FUNC:
less_fl= 1;
/* fall through */
case Item_func::GT_FUNC:
case Item_func::GE_FUNC:
{

5
sql/slave.cc

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, 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
@ -5798,9 +5798,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
mi->last_queued_gtid.seq_no == 1000)
goto skip_relay_logging;
});
/* Fall through to default case ... */
#endif
/* fall through */
default:
default_action:
if (mi->using_gtid != Master_info::USE_GTID_NO && mi->gtid_event_seen)

3
sql/sp_head.cc

@ -1,6 +1,6 @@
/*
Copyright (c) 2002, 2016, Oracle and/or its affiliates.
Copyright (c) 2011, 2016, MariaDB
Copyright (c) 2011, 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
@ -142,6 +142,7 @@ sp_get_item_value(THD *thd, Item *item, String *str)
if (item->field_type() != MYSQL_TYPE_BIT)
return item->val_str(str);
else {/* Bit type is handled as binary string */}
/* fall through */
case STRING_RESULT:
{
String *result= item->val_str(str);

4
sql/sql_digest.cc

@ -1,4 +1,5 @@
/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2017, 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
@ -453,7 +454,8 @@ sql_digest_state* digest_add_token(sql_digest_state *state,
}
} while (found_unary);
}
/* fall through, for case NULL_SYM below */
/* for case NULL_SYM below */
/* fall through */
case LEX_HOSTNAME:
case TEXT_STRING:
case NCHAR_STRING:

5
sql/sql_lex.cc

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, 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
@ -1174,12 +1174,14 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
state= MY_LEX_HEX_NUMBER;
break;
}
/* fall through */
case MY_LEX_IDENT_OR_BIN:
if (lip->yyPeek() == '\'')
{ // Found b'bin-number'
state= MY_LEX_BIN_NUMBER;
break;
}
/* fall through */
case MY_LEX_IDENT:
const char *start;
#if defined(USE_MB) && defined(USE_MB_IDENT)
@ -1527,6 +1529,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
break;
}
/* " used for strings */
/* fall through */
case MY_LEX_STRING: // Incomplete text string
if (!(yylval->lex_str.str = get_text(lip, 1, 1)))
{

6
sql/sql_parse.cc

@ -2518,8 +2518,8 @@ mysql_execute_command(THD *thd)
MYF(0));
goto error;
}
/* no break; fall through */
}
/* fall through */
case SQLCOM_SHOW_STATUS_PROC:
case SQLCOM_SHOW_STATUS_FUNC:
case SQLCOM_SHOW_DATABASES:
@ -3323,8 +3323,8 @@ end_with_restore_list:
/* mysql_update return 2 if we need to switch to multi-update */
if (up_result != 2)
break;
/* Fall through */
}
/* Fall through */
case SQLCOM_UPDATE_MULTI:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
@ -3434,6 +3434,7 @@ end_with_restore_list:
DBUG_PRINT("debug", ("Just after generate_incident()"));
}
#endif
/* fall through */
case SQLCOM_INSERT:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
@ -4273,6 +4274,7 @@ end_with_restore_list:
initialize this variable because RESET shares the same code as FLUSH
*/
lex->no_write_to_binlog= 1;
/* fall through */
case SQLCOM_FLUSH:
{
int write_to_binlog;

5
sql/sql_plugin.cc

@ -1,6 +1,6 @@
/*
Copyright (c) 2005, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 2014, SkySQL Ab.
Copyright (c) 2010, 2017, 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
@ -1816,8 +1816,8 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
switch ((*(p++)= *(list++))) {
case '\0':
list= NULL; /* terminate the loop */
/* fall through */
#ifndef __WIN__
/* fall through */
case ':': /* can't use this as delimiter as it may be drive letter */
#endif
case ';':
@ -1858,6 +1858,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
str->str= p;
continue;
}
/* fall through */
default:
str->length++;
continue;

4
sql/sql_prepare.cc

@ -1,5 +1,5 @@
/* Copyright (c) 2002, 2015, Oracle and/or its affiliates.
Copyright (c) 2008, 2015, MariaDB
Copyright (c) 2008, 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
@ -2108,7 +2108,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
/* mysql_test_update returns 2 if we need to switch to multi-update */
if (res != 2)
break;
/* fall through */
case SQLCOM_UPDATE_MULTI:
res= mysql_test_multiupdate(stmt, tables, res == 2);
break;

3
sql/sql_show.cc

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, 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
@ -983,6 +983,7 @@ public:
is_handled= FALSE;
break;
}
/* fall through */
case ER_COLUMNACCESS_DENIED_ERROR:
case ER_VIEW_NO_EXPLAIN: /* Error was anonymized, ignore all the same. */
case ER_PROCACCESS_DENIED_ERROR:

3
sql/sql_table.cc

@ -6851,7 +6851,8 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
case Alter_info::LEAVE_AS_IS:
if (!indexes_were_disabled)
break;
/* fall-through: disabled indexes */
/* disabled indexes */
/* fall through */
case Alter_info::DISABLE:
error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
}

2
sql/sql_yacc.yy

@ -4681,9 +4681,11 @@ size_number:
case 'g':
case 'G':
text_shift_number+=10;
/* fall through */
case 'm':
case 'M':
text_shift_number+=10;
/* fall through */
case 'k':
case 'K':
text_shift_number+=10;

2
storage/connect/array.cpp

@ -155,6 +155,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec)
switch (type) {
case TYPE_STRING:
Len = length;
/* fall through */
case TYPE_SHORT:
case TYPE_INT:
case TYPE_DOUBLE:
@ -592,6 +593,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
switch (Type) {
case TYPE_DOUBLE:
prec = 2;
/* fall through */
case TYPE_SHORT:
case TYPE_INT:
case TYPE_DATE:

4
storage/connect/filamdbf.cpp

@ -503,7 +503,8 @@ bool DBFFAM::OpenTableFile(PGLOBAL g)
break;
} // endif
// Selective delete, pass thru
// Selective delete
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
@ -623,6 +624,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
case 'L': // Large (big) integer
case 'T': // Tiny integer
c = 'N'; // Numeric
/* fall through */
case 'N': // Numeric (integer)
case 'F': // Float (double)
descp->Decimals = (uchar)cdp->F.Prec;

3
storage/connect/filamfix.cpp

@ -919,7 +919,8 @@ bool BGXFAM::OpenTableFile(PGLOBAL g)
break;
} // endif
// Selective delete, pass thru
// Selective delete
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
oflag |= (UseTemp) ? O_RDONLY : O_RDWR;

1
storage/connect/filamtxt.cpp

@ -561,6 +561,7 @@ bool DOSFAM::OpenTableFile(PGLOBAL g)
// Selective delete, pass thru
Bin = true;
/* fall through */
case MODE_UPDATE:
if ((UseTemp = Tdbp->IsUsingTemp(g))) {
strcpy(opmode, "r");

3
storage/connect/filamvct.cpp

@ -440,6 +440,7 @@ bool VCTFAM::OpenTableFile(PGLOBAL g)
} // endif
// Selective delete, pass thru
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
@ -1918,6 +1919,7 @@ bool VECFAM::OpenTableFile(PGLOBAL g)
} // endif filter
// Selective delete, pass thru
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb": "r+b");
@ -3584,6 +3586,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g)
} // endif
// Selective delete, pass thru
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
oflag = (UseTemp) ? O_RDONLY : O_RDWR;

3
storage/connect/filter.cpp

@ -1193,7 +1193,7 @@ bool FILTER::Convert(PGLOBAL g, bool having)
Arg(0) = pXVOID;
} // endif void
// pass thru
// fall through
case OP_IN:
// For IN operator do optimize if operand is an array
if (GetArgType(1) != TYPE_ARRAY)
@ -1260,6 +1260,7 @@ bool FILTER::Eval(PGLOBAL g)
} // endif Opm
// For modified operators, pass thru
/* fall through */
case OP_IN:
case OP_EXIST:
// For IN operations, special processing is done here

8
storage/connect/ha_connect.cc

@ -1427,7 +1427,7 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf)
case MYSQL_TYPE_VARCHAR:
case MYSQL_TYPE_VAR_STRING:
pcf->Flags |= U_VAR;
/* no break */
/* fall through */
default:
pcf->Type= MYSQLtoPLG(fp->type(), &v);
break;
@ -2801,6 +2801,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
case Item_func::LIKE_FUNC: vop= OP_LIKE; break;
case Item_func::ISNOTNULL_FUNC:
neg = true;
/* fall through */
case Item_func::ISNULL_FUNC: vop= OP_NULL; break;
case Item_func::IN_FUNC: vop= OP_IN;
case Item_func::BETWEEN:
@ -4220,7 +4221,8 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick)
} else
return false;
/* Fall through to check FILE_ACL */
/* check FILE_ACL */
/* fall through */
case TAB_ODBC:
case TAB_JDBC:
case TAB_MYSQL:
@ -5454,7 +5456,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
#endif // JDBC_SUPPORT
case TAB_DBF:
dbf= true;
// Passthru
// fall through
case TAB_CSV:
if (!fn && fnc != FNC_NO)
sprintf(g->Message, "Missing %s file name", topt->type);

4
storage/connect/json.cpp

@ -533,7 +533,7 @@ PVAL ParseNumeric(PGLOBAL g, int& i, STRG& src)
if (!has_e)
goto err;
// passthru
// fall through
case '-':
if (found_digit)
goto err;
@ -826,7 +826,7 @@ bool JOUTSTR::Escape(const char *s)
case '\r':
case '\b':
case '\f': WriteChr('\\');
// passthru
// fall through
default:
WriteChr(s[i]);
break;

2
storage/connect/plgdbutl.cpp

@ -917,7 +917,7 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all)
fp->Memory = NULL;
fp->Mode = MODE_ANY;
// Passthru
// fall through
case TYPE_FB_HANDLE:
if (fp->Handle && fp->Handle != INVALID_HANDLE_VALUE)
if (CloseFileHandle(fp->Handle))

1
storage/connect/reldef.cpp

@ -128,6 +128,7 @@ int RELDEF::GetSizeCatInfo(PSZ what, PSZ sdef)
switch (toupper(c)) {
case 'M':
n *= 1024;
// fall through
case 'K':
n *= 1024;
} // endswitch c

1
storage/connect/tabdos.cpp

@ -1307,6 +1307,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
} // endif !opm
// if opm, pass thru
/* fall through */
case OP_IN:
if (filp->GetArgType(0) == TYPE_COLBLK &&
filp->GetArgType(1) == TYPE_ARRAY) {

2
storage/connect/tabjson.cpp

@ -1530,7 +1530,7 @@ void JSONCOL::WriteColumn(PGLOBAL g)
break;
} // endif Op
// Passthru
// fall through
case TYPE_DATE:
case TYPE_INT:
case TYPE_SHORT:

2
storage/connect/value.cpp

@ -118,7 +118,7 @@ ulonglong CharToNumber(char *p, int n, ulonglong maxval,
maxval++;
if (minus) *minus = true;
} // endif Unsigned
/* fall through */
case '+':
p++;
break;

2
storage/connect/xindex.cpp

@ -464,7 +464,7 @@ bool XINDEX::Make(PGLOBAL g, PIXDEF sxp)
if (ApplyFilter(g, filp))
break;
// passthru
// fall through
case RC_NF:
continue;
case RC_EF:

2
storage/connect/xobject.cpp

@ -405,7 +405,7 @@ bool STRING::Append_quoted(PSZ s)
case '\r':
case '\b':
case '\f': b |= Append('\\');
// passthru
// fall through
default:
b |= Append(*p);
break;

2
storage/federated/ha_federated.cc

@ -1,4 +1,5 @@
/* Copyright (c) 2004, 2015, Oracle and/or its affiliates.
Copyright (c) 2017, 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
@ -2952,6 +2953,7 @@ int ha_federated::extra(ha_extra_function operation)
break;
case HA_EXTRA_PREPARE_FOR_DROP:
table_will_be_deleted = TRUE;
break;
default:
/* do nothing */
DBUG_PRINT("info",("unhandled operation: %d", (uint) operation));

4
storage/heap/hp_create.c

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
Copyright (c) 2010, 2014, SkySQL Ab.
Copyright (c) 2010, 2017, 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
@ -94,7 +94,7 @@ int heap_create(const char *name, HP_CREATE_INFO *create_info,
case HA_KEYTYPE_VARBINARY1:
/* Case-insensitiveness is handled in coll->hash_sort */
keyinfo->seg[j].type= HA_KEYTYPE_VARTEXT1;
/* fall_through */
/* fall through */
case HA_KEYTYPE_VARTEXT1:
keyinfo->flag|= HA_VAR_LENGTH_KEY;
length+= 2;

11
storage/innobase/handler/ha_innodb.cc

@ -7063,8 +7063,8 @@ ha_innobase::innobase_lock_autoinc(void)
break;
}
}
/* Fall through to old style locking. */
/* Use old style locking. */
/* fall through */
case AUTOINC_OLD_STYLE_LOCKING:
DBUG_EXECUTE_IF("die_if_autoinc_old_lock_style_used",
ut_ad(0););
@ -9725,7 +9725,8 @@ create_options_are_invalid(
case ROW_TYPE_DYNAMIC:
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE(use_tablespace);
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
/* fall through since dynamic also shuns KBS */
/* ROW_FORMAT=DYNAMIC also shuns KEY_BLOCK_SIZE */
/* fall through */
case ROW_TYPE_COMPACT:
case ROW_TYPE_REDUNDANT:
if (kbs_specified) {
@ -10111,7 +10112,8 @@ index_bad:
break;
}
zip_allowed = FALSE;
/* fall through to set row_format = COMPACT */
/* Set ROW_FORMAT = COMPACT */
/* fall through */
case ROW_TYPE_NOT_USED:
case ROW_TYPE_FIXED:
case ROW_TYPE_PAGE:
@ -10119,6 +10121,7 @@ index_bad:
thd, Sql_condition::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: assuming ROW_FORMAT=COMPACT.");
/* fall through */
case ROW_TYPE_DEFAULT:
/* If we fell through, set row format to Compact. */
row_format = ROW_TYPE_COMPACT;

4
storage/innobase/include/data0type.ic

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -574,7 +575,8 @@ dtype_get_fixed_size_low(
#else /* !UNIV_HOTBACKUP */
return(len);
#endif /* !UNIV_HOTBACKUP */
/* fall through for variable-length charsets */
/* Treat as variable-length. */
/* Fall through */
case DATA_VARCHAR:
case DATA_BINARY:
case DATA_DECIMAL:

15
storage/innobase/include/mach0data.ic

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -787,13 +788,13 @@ mach_swap_byte_order(
dest += len;
switch (len & 0x7) {
case 0: *--dest = *from++;
case 7: *--dest = *from++;
case 6: *--dest = *from++;
case 5: *--dest = *from++;
case 4: *--dest = *from++;
case 3: *--dest = *from++;
case 2: *--dest = *from++;
case 0: *--dest = *from++; /* fall through */
case 7: *--dest = *from++; /* fall through */
case 6: *--dest = *from++; /* fall through */
case 5: *--dest = *from++; /* fall through */
case 4: *--dest = *from++; /* fall through */
case 3: *--dest = *from++; /* fall through */
case 2: *--dest = *from++; /* fall through */
case 1: *--dest = *from;
}
}

7
storage/innobase/include/ut0rnd.ic

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -237,16 +238,22 @@ ut_fold_binary(
switch (len & 0x7) {
case 7:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 6:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 5:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 4:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 3:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 2:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 1:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
}

1
storage/innobase/row/row0import.cc

@ -2018,6 +2018,7 @@ PageConverter::update_page(
case FIL_PAGE_TYPE_XDES:
err = set_current_xdes(
buf_block_get_page_no(block), get_frame(block));
/* fall through */
case FIL_PAGE_INODE:
case FIL_PAGE_TYPE_TRX_SYS:
case FIL_PAGE_IBUF_FREE_LIST:

2
storage/innobase/row/row0log.cc

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -1872,6 +1873,7 @@ row_log_table_apply_update(
When applying the subsequent ROW_T_DELETE, no matching
record will be found. */
/* fall through */
case DB_SUCCESS:
ut_ad(row != NULL);
break;

3
storage/innobase/row/row0mysql.cc

@ -5407,7 +5407,8 @@ loop:
fputs(" InnoDB: Warning: CHECK TABLE on ", stderr);
dict_index_name_print(stderr, prebuilt->trx, index);
fprintf(stderr, " returned %lu\n", ret);
/* fall through (this error is ignored by CHECK TABLE) */
/* (this error is ignored by CHECK TABLE) */
/* fall through */
case DB_END_OF_INDEX:
func_exit:
mem_free(buf);

4
storage/innobase/row/row0purge.cc

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -488,8 +489,9 @@ row_purge_remove_sec_if_poss_leaf(
success = false;
}
}
/* fall through (the index entry is still needed,
/* (The index entry is still needed,
or the deletion succeeded) */
/* fall through */
case ROW_NOT_DELETED_REF:
/* The index entry is still needed. */
case ROW_BUFFERED:

1
storage/innobase/sync/sync0sync.cc

@ -1123,6 +1123,7 @@ sync_thread_add_level(
upgrading in innobase_start_or_create_for_mysql(). */
break;
}
/* fall through */
case SYNC_MEM_POOL:
case SYNC_MEM_HASH:
case SYNC_RECV:

3
storage/maria/ma_extra.c

@ -157,6 +157,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
if (info->s->data_file_type != DYNAMIC_RECORD)
break;
/* Remove read/write cache if dynamic rows */
/* fall through */
case HA_EXTRA_NO_CACHE:
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
@ -313,7 +314,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
share->state.open_count= 1;
share->changed= 1;
_ma_mark_file_changed_now(share);
/* Fall trough */
/* Fall through */
case HA_EXTRA_PREPARE_FOR_RENAME:
{
my_bool do_flush= MY_TEST(function != HA_EXTRA_PREPARE_FOR_DROP);

2
storage/maria/ma_recovery.c

@ -3061,7 +3061,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const
case LOGREC_REDO_INDEX:
case LOGREC_REDO_INDEX_FREE_PAGE:
index_page_redo_entry= 1;
/* Fall trough*/
/* Fall through */
case LOGREC_REDO_INSERT_ROW_HEAD:
case LOGREC_REDO_INSERT_ROW_TAIL:
case LOGREC_REDO_PURGE_ROW_HEAD:

3
storage/myisam/mi_extra.c

@ -150,6 +150,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
if (info->s->data_file_type != DYNAMIC_RECORD)
break;
/* Remove read/write cache if dynamic rows */
/* fall through */
case HA_EXTRA_NO_CACHE:
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
@ -262,7 +263,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
//share->deleting= TRUE;
share->global_changed= FALSE; /* force writing changed flag */
_mi_mark_file_changed(info);
/* Fall trough */
/* Fall through */
case HA_EXTRA_PREPARE_FOR_RENAME:
mysql_mutex_lock(&THR_LOCK_myisam);
share->last_version= 0L; /* Impossible version */

2
storage/spider/spd_db_conn.cc

@ -1844,8 +1844,8 @@ int spider_db_append_key_where_internal(
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
case HA_READ_PREFIX_LAST:
result_list->desc_flg = TRUE;
/* fall through */
#endif
/* fall through */
case HA_READ_KEY_EXACT:
if (sql_kind == SPIDER_SQL_KIND_SQL)
{

11
storage/xtradb/handler/ha_innodb.cc

@ -7749,8 +7749,8 @@ ha_innobase::innobase_lock_autoinc(void)
break;
}
}
/* Fall through to old style locking. */
/* Use old style locking. */
/* fall through */
case AUTOINC_OLD_STYLE_LOCKING:
DBUG_EXECUTE_IF("die_if_autoinc_old_lock_style_used",
ut_ad(0););
@ -10473,7 +10473,8 @@ create_options_are_invalid(
case ROW_TYPE_DYNAMIC:
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE(use_tablespace);
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
/* fall through since dynamic also shuns KBS */
/* ROW_FORMAT=DYNAMIC also shuns KEY_BLOCK_SIZE */
/* fall through */
case ROW_TYPE_COMPACT:
case ROW_TYPE_REDUNDANT:
if (kbs_specified) {
@ -10855,7 +10856,8 @@ index_bad:
break;
}
zip_allowed = FALSE;
/* fall through to set row_format = COMPACT */
/* Set ROW_FORMAT = COMPACT */
/* fall through */
case ROW_TYPE_NOT_USED:
case ROW_TYPE_FIXED:
case ROW_TYPE_PAGE:
@ -10864,6 +10866,7 @@ index_bad:
thd, Sql_condition::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: assuming ROW_FORMAT=COMPACT.");
/* fall through */
case ROW_TYPE_DEFAULT:
/* If we fell through, set row format to Compact. */
row_format = ROW_TYPE_COMPACT;

3
storage/xtradb/include/data0type.ic

@ -576,7 +576,8 @@ dtype_get_fixed_size_low(
#else /* !UNIV_HOTBACKUP */
return(len);
#endif /* !UNIV_HOTBACKUP */
/* fall through for variable-length charsets */
/* Treat as variable-length. */
/* Fall through */
case DATA_VARCHAR:
case DATA_BINARY:
case DATA_DECIMAL:

15
storage/xtradb/include/mach0data.ic

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -779,13 +780,13 @@ mach_swap_byte_order(
dest += len;
switch (len & 0x7) {
case 0: *--dest = *from++;
case 7: *--dest = *from++;
case 6: *--dest = *from++;
case 5: *--dest = *from++;
case 4: *--dest = *from++;
case 3: *--dest = *from++;
case 2: *--dest = *from++;
case 0: *--dest = *from++; /* fall through */
case 7: *--dest = *from++; /* fall through */
case 6: *--dest = *from++; /* fall through */
case 5: *--dest = *from++; /* fall through */
case 4: *--dest = *from++; /* fall through */
case 3: *--dest = *from++; /* fall through */
case 2: *--dest = *from++; /* fall through */
case 1: *--dest = *from;
}
}

7
storage/xtradb/include/ut0rnd.ic

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -237,16 +238,22 @@ ut_fold_binary(
switch (len & 0x7) {
case 7:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 6:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 5:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 4:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 3:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 2:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
/* fall through */
case 1:
fold = ut_fold_ulint_pair(fold, (ulint)(*str++));
}

1
storage/xtradb/row/row0import.cc

@ -2018,6 +2018,7 @@ PageConverter::update_page(
case FIL_PAGE_TYPE_XDES:
err = set_current_xdes(
buf_block_get_page_no(block), get_frame(block));
/* fall through */
case FIL_PAGE_INODE:
case FIL_PAGE_TYPE_TRX_SYS:
case FIL_PAGE_IBUF_FREE_LIST:

2
storage/xtradb/row/row0log.cc

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -1872,6 +1873,7 @@ row_log_table_apply_update(
When applying the subsequent ROW_T_DELETE, no matching
record will be found. */
/* fall through */
case DB_SUCCESS:
ut_ad(row != NULL);
break;

3
storage/xtradb/row/row0mysql.cc

@ -5421,7 +5421,8 @@ loop:
fputs(" InnoDB: Warning: CHECK TABLE on ", stderr);
dict_index_name_print(stderr, prebuilt->trx, index);
fprintf(stderr, " returned %lu\n", ret);
/* fall through (this error is ignored by CHECK TABLE) */
/* (this error is ignored by CHECK TABLE) */
/* fall through */
case DB_END_OF_INDEX:
func_exit:
mem_free(buf);

4
storage/xtradb/row/row0purge.cc

@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 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
@ -488,8 +489,9 @@ row_purge_remove_sec_if_poss_leaf(
success = false;
}
}
/* fall through (the index entry is still needed,
/* (The index entry is still needed,
or the deletion succeeded) */
/* fall through */
case ROW_NOT_DELETED_REF:
/* The index entry is still needed. */
case ROW_BUFFERED:

5
storage/xtradb/sync/sync0sync.cc

@ -1220,6 +1220,7 @@ sync_thread_add_level(
upgrading in innobase_start_or_create_for_mysql(). */
break;
}
/* fall through */
case SYNC_MEM_POOL:
case SYNC_MEM_HASH:
case SYNC_RECV:
@ -1282,9 +1283,9 @@ sync_thread_add_level(
}
}
ut_ad(found_current);
/* fallthrough */
}
/* fall through */
case SYNC_BUF_FLUSH_LIST:
case SYNC_BUF_LRU_LIST:
case SYNC_BUF_FREE_LIST:

10
strings/ctype-utf8.c

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, MariaDB
Copyright (c) 2009, 2017, MariaDB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@ -5031,7 +5031,9 @@ static int my_uni_utf8_no_range(CHARSET_INFO *cs __attribute__((unused)),
{
/* Fall through all cases!!! */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
@ -7509,8 +7511,11 @@ my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
switch (count) {
/* Fall through all cases!!! */
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
@ -7541,8 +7546,11 @@ my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
{
/* Fall through all cases!!! */
case 4: r[3]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;

8
strings/dtoa.c

@ -1,4 +1,5 @@
/* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2017, MariaDB Corporation.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@ -1377,7 +1378,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
switch (*s) {
case '-':
sign= 1;
/* no break */
/* fall through */
case '+':
s++;
goto break2;
@ -1467,6 +1468,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
switch (c= *s) {
case '-':
esign= 1;
/* fall through */
case '+':
c= *++s;
}
@ -2360,7 +2362,7 @@ static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
break;
case 2:
leftright= 0;
/* no break */
/* fall through */
case 4:
if (ndigits <= 0)
ndigits= 1;
@ -2368,7 +2370,7 @@ static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
break;
case 3:
leftright= 0;
/* no break */
/* fall through */
case 5:
i= ndigits + k + 1;
ilim= i;

Loading…
Cancel
Save