MDEV-13459 Warnings, when compiling with gcc-7.x
mostly caused by -Wimplicit-fallthrough
This commit is contained in:
parent
3b7aa3017b
commit
d76f5774fe
@ -1080,7 +1080,7 @@ static ulong start_timer(void);
|
||||
static void end_timer(ulong start_time,char *buff);
|
||||
static void mysql_end_timer(ulong start_time,char *buff);
|
||||
static void nice_time(double sec,char *buff,bool part_second);
|
||||
extern "C" sig_handler mysql_end(int sig);
|
||||
extern "C" sig_handler mysql_end(int sig) __attribute__ ((noreturn));
|
||||
extern "C" sig_handler handle_sigint(int sig);
|
||||
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
|
||||
static sig_handler window_resize(int sig);
|
||||
|
@ -2012,6 +2012,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;
|
||||
|
@ -97,12 +97,16 @@ static struct my_option my_long_options[] =
|
||||
};
|
||||
|
||||
|
||||
static void usage(my_bool version)
|
||||
static void version()
|
||||
{
|
||||
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
|
||||
MACHINE_TYPE);
|
||||
if (version)
|
||||
return;
|
||||
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
|
||||
}
|
||||
|
||||
|
||||
static void usage() __attribute__ ((noreturn));
|
||||
static void usage()
|
||||
{
|
||||
version();
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("Prints all arguments that is give to some program using the default files");
|
||||
printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
|
||||
@ -126,12 +130,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
exit(0);
|
||||
case 'I':
|
||||
case '?':
|
||||
usage(0);
|
||||
usage();
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
case 'V':
|
||||
usage(1);
|
||||
version();
|
||||
/* fall through */
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
break;
|
||||
@ -179,7 +184,7 @@ int main(int argc, char **argv)
|
||||
nargs+= array_elements(mysqld_groups);
|
||||
|
||||
if (nargs < 2)
|
||||
usage(0);
|
||||
usage();
|
||||
|
||||
load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME));
|
||||
if (!load_default_groups)
|
||||
|
@ -174,6 +174,7 @@ register char **argv[];
|
||||
break;
|
||||
case 'V':
|
||||
version=1;
|
||||
/* fall through */
|
||||
case 'I':
|
||||
case '?':
|
||||
help=1; /* Help text written */
|
||||
|
@ -47,6 +47,11 @@ void* operator new[](std::size_t sz, const std::nothrow_t&) throw()
|
||||
return (void *) my_malloc (sz ? sz : 1, MYF(0));
|
||||
}
|
||||
|
||||
void operator delete (void *ptr, std::size_t)
|
||||
{
|
||||
my_free(ptr);
|
||||
}
|
||||
|
||||
void operator delete (void *ptr)
|
||||
{
|
||||
my_free(ptr);
|
||||
@ -57,6 +62,11 @@ void operator delete[] (void *ptr) throw ()
|
||||
my_free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[] (void *ptr, std::size_t) throw ()
|
||||
{
|
||||
my_free(ptr);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr, const std::nothrow_t&) throw()
|
||||
{
|
||||
my_free(ptr);
|
||||
|
@ -10,6 +10,12 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
ENDIF()
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag(" -Wdeprecated-declarations" HAVE_CXX_WDEPRECATED_DECLARATIONS)
|
||||
IF (HAVE_CXX_WDEPRECATED_DECLARATIONS)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(libhsclient)
|
||||
|
||||
# Handlersocket client library. We do not distribute it,
|
||||
|
@ -1276,6 +1276,7 @@ void mysql_read_default_options(struct st_mysql_options *options,
|
||||
break;
|
||||
case OPT_pipe:
|
||||
options->protocol = MYSQL_PROTOCOL_PIPE;
|
||||
break;
|
||||
case OPT_connect_timeout:
|
||||
case OPT_timeout:
|
||||
if (opt_arg)
|
||||
|
@ -185,8 +185,8 @@ common_1_lev_code:
|
||||
|
||||
expr= tmp_expr - (tmp_expr/60)*60;
|
||||
/* the code after the switch will finish */
|
||||
}
|
||||
break;
|
||||
}
|
||||
case INTERVAL_HOUR_SECOND:
|
||||
{
|
||||
ulonglong tmp_expr= expr;
|
||||
@ -202,8 +202,8 @@ common_1_lev_code:
|
||||
|
||||
expr= tmp_expr - (tmp_expr/60)*60;
|
||||
/* the code after the switch will finish */
|
||||
}
|
||||
break;
|
||||
}
|
||||
case INTERVAL_DAY_SECOND:
|
||||
{
|
||||
ulonglong tmp_expr= expr;
|
||||
@ -225,8 +225,8 @@ common_1_lev_code:
|
||||
|
||||
expr= tmp_expr - (tmp_expr/60)*60;
|
||||
/* the code after the switch will finish */
|
||||
}
|
||||
break;
|
||||
}
|
||||
case INTERVAL_DAY_MICROSECOND:
|
||||
case INTERVAL_HOUR_MICROSECOND:
|
||||
case INTERVAL_MINUTE_MICROSECOND:
|
||||
@ -240,6 +240,8 @@ common_1_lev_code:
|
||||
break;
|
||||
case INTERVAL_WEEK:
|
||||
expr/= 7;
|
||||
close_quote= FALSE;
|
||||
break;
|
||||
default:
|
||||
close_quote= FALSE;
|
||||
break;
|
||||
|
@ -9218,7 +9218,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;
|
||||
|
@ -7331,6 +7331,7 @@ void ha_partition::print_error(int error, myf errflag)
|
||||
m_err_rec= NULL;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
/* fall through */
|
||||
default:
|
||||
{
|
||||
if (!(thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION))
|
||||
|
@ -6004,7 +6004,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:
|
||||
|
@ -863,6 +863,7 @@ void Item_func_num1::fix_length_and_dec()
|
||||
break;
|
||||
case TIME_RESULT:
|
||||
cached_result_type= DECIMAL_RESULT;
|
||||
/* fall through */
|
||||
case DECIMAL_RESULT:
|
||||
decimals= args[0]->decimal_scale(); // Do not preserve NOT_FIXED_DEC
|
||||
max_length= args[0]->max_length;
|
||||
@ -2038,6 +2039,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;
|
||||
|
@ -4430,7 +4430,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)
|
||||
{
|
||||
@ -4443,7 +4443,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 */))
|
||||
|
@ -7261,8 +7261,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++)
|
||||
{
|
||||
@ -7271,10 +7273,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));
|
||||
}
|
||||
|
@ -6437,21 +6437,6 @@ User_var_log_event(const char* buf, uint event_len,
|
||||
we keep the flags set to UNDEF_F.
|
||||
*/
|
||||
uint bytes_read= ((val + val_len) - start);
|
||||
#ifndef DBUG_OFF
|
||||
bool old_pre_checksum_fd= description_event->is_version_before_checksum(
|
||||
&description_event->server_version_split);
|
||||
#endif
|
||||
DBUG_ASSERT((bytes_read == data_written -
|
||||
(old_pre_checksum_fd ||
|
||||
(description_event->checksum_alg ==
|
||||
BINLOG_CHECKSUM_ALG_OFF)) ?
|
||||
0 : BINLOG_CHECKSUM_LEN)
|
||||
||
|
||||
(bytes_read == data_written -1 -
|
||||
(old_pre_checksum_fd ||
|
||||
(description_event->checksum_alg ==
|
||||
BINLOG_CHECKSUM_ALG_OFF)) ?
|
||||
0 : BINLOG_CHECKSUM_LEN));
|
||||
if ((data_written - bytes_read) > 0)
|
||||
{
|
||||
flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
|
||||
|
@ -1047,6 +1047,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:
|
||||
{
|
||||
|
@ -34,8 +34,6 @@
|
||||
|
||||
partition_info *partition_info::get_clone()
|
||||
{
|
||||
if (!this)
|
||||
return 0;
|
||||
List_iterator<partition_element> part_it(partitions);
|
||||
partition_element *part;
|
||||
partition_info *clone= new partition_info();
|
||||
|
@ -139,7 +139,7 @@ sp_get_item_value(THD *thd, Item *item, String *str)
|
||||
case DECIMAL_RESULT:
|
||||
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);
|
||||
|
@ -54,7 +54,6 @@ static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list)
|
||||
if (thd->stmt_da->is_ok())
|
||||
thd->stmt_da->reset_diagnostics_area();
|
||||
table_list->table= NULL;
|
||||
result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK;
|
||||
DBUG_RETURN(result_code);
|
||||
}
|
||||
|
||||
|
@ -1147,12 +1147,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)
|
||||
@ -1499,7 +1501,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
|
||||
state= MY_LEX_USER_VARIABLE_DELIMITER;
|
||||
break;
|
||||
}
|
||||
/* " used for strings */
|
||||
/* fall through */ /* " used for strings */
|
||||
case MY_LEX_STRING: // Incomplete text string
|
||||
if (!(yylval->lex_str.str = get_text(lip, 1, 1)))
|
||||
{
|
||||
|
@ -2481,7 +2481,7 @@ case SQLCOM_PREPARE:
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
{
|
||||
partition_info *part_info= thd->lex->part_info;
|
||||
if (part_info && !(part_info= thd->lex->part_info->get_clone()))
|
||||
if (part_info && !(part_info= part_info->get_clone()))
|
||||
{
|
||||
res= -1;
|
||||
goto end_with_restore_list;
|
||||
@ -2850,8 +2850,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);
|
||||
@ -2961,6 +2961,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);
|
||||
@ -3698,6 +3699,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;
|
||||
|
@ -4640,7 +4640,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
|
||||
thd->work_part_info= thd->lex->part_info;
|
||||
|
||||
if (thd->work_part_info &&
|
||||
!(thd->work_part_info= thd->lex->part_info->get_clone()))
|
||||
!(thd->work_part_info= thd->work_part_info->get_clone()))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
/* ALTER_ADMIN_PARTITION is handled in mysql_admin_table */
|
||||
|
@ -1078,42 +1078,42 @@ static bool plugin_add(MEM_ROOT *tmp_root,
|
||||
if (!name->str && plugin_find_internal(&tmp.name, MYSQL_ANY_PLUGIN))
|
||||
continue; // already installed
|
||||
|
||||
struct st_plugin_int *tmp_plugin_ptr;
|
||||
if (*(int*)plugin->info <
|
||||
min_plugin_info_interface_version[plugin->type] ||
|
||||
((*(int*)plugin->info) >> 8) >
|
||||
(cur_plugin_info_interface_version[plugin->type] >> 8))
|
||||
{
|
||||
char buf[256];
|
||||
strxnmov(buf, sizeof(buf) - 1, "API version for ",
|
||||
plugin_type_names[plugin->type].str,
|
||||
" plugin ", tmp.name.str,
|
||||
" not supported by this version of the server", NullS);
|
||||
report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, ENOEXEC, buf);
|
||||
goto err;
|
||||
}
|
||||
if (plugin_maturity_map[plugin->maturity] < plugin_maturity)
|
||||
{
|
||||
char buf[256];
|
||||
strxnmov(buf, sizeof(buf) - 1, "Loading of ",
|
||||
plugin_maturity_names[plugin->maturity],
|
||||
" plugin ", tmp.name.str,
|
||||
" is prohibited by --plugin-maturity=",
|
||||
plugin_maturity_names[plugin_maturity],
|
||||
NullS);
|
||||
report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, EPERM, buf);
|
||||
goto err;
|
||||
}
|
||||
tmp.plugin= plugin;
|
||||
tmp.ref_count= 0;
|
||||
tmp.state= PLUGIN_IS_UNINITIALIZED;
|
||||
tmp.load_option= PLUGIN_ON;
|
||||
struct st_plugin_int *tmp_plugin_ptr;
|
||||
if (*(int*)plugin->info <
|
||||
min_plugin_info_interface_version[plugin->type] ||
|
||||
((*(int*)plugin->info) >> 8) >
|
||||
(cur_plugin_info_interface_version[plugin->type] >> 8))
|
||||
{
|
||||
char buf[256];
|
||||
strxnmov(buf, sizeof(buf) - 1, "API version for ",
|
||||
plugin_type_names[plugin->type].str,
|
||||
" plugin ", tmp.name.str,
|
||||
" not supported by this version of the server", NullS);
|
||||
report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, ENOEXEC, buf);
|
||||
goto err;
|
||||
}
|
||||
if (plugin_maturity_map[plugin->maturity] < plugin_maturity)
|
||||
{
|
||||
char buf[256];
|
||||
strxnmov(buf, sizeof(buf) - 1, "Loading of ",
|
||||
plugin_maturity_names[plugin->maturity],
|
||||
" plugin ", tmp.name.str,
|
||||
" is prohibited by --plugin-maturity=",
|
||||
plugin_maturity_names[plugin_maturity],
|
||||
NullS);
|
||||
report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, EPERM, buf);
|
||||
goto err;
|
||||
}
|
||||
tmp.plugin= plugin;
|
||||
tmp.ref_count= 0;
|
||||
tmp.state= PLUGIN_IS_UNINITIALIZED;
|
||||
tmp.load_option= PLUGIN_ON;
|
||||
|
||||
if (!(tmp_plugin_ptr= plugin_insert_or_reuse(&tmp)))
|
||||
goto err;
|
||||
if (my_hash_insert(&plugin_hash[plugin->type], (uchar*)tmp_plugin_ptr))
|
||||
tmp_plugin_ptr->state= PLUGIN_IS_FREED;
|
||||
init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096);
|
||||
if (!(tmp_plugin_ptr= plugin_insert_or_reuse(&tmp)))
|
||||
goto err;
|
||||
if (my_hash_insert(&plugin_hash[plugin->type], (uchar*)tmp_plugin_ptr))
|
||||
tmp_plugin_ptr->state= PLUGIN_IS_FREED;
|
||||
init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096);
|
||||
|
||||
if (name->str)
|
||||
DBUG_RETURN(FALSE); // all done
|
||||
@ -1822,10 +1822,10 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
|
||||
case '\0':
|
||||
list= NULL; /* terminate the loop */
|
||||
/* fall through */
|
||||
case ';':
|
||||
#ifndef __WIN__
|
||||
case ':': /* can't use this as delimiter as it may be drive letter */
|
||||
#endif
|
||||
case ';':
|
||||
str->str[str->length]= '\0';
|
||||
if (str == &name) // load all plugins in named module
|
||||
{
|
||||
@ -1863,6 +1863,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
|
||||
str->str= p;
|
||||
continue;
|
||||
}
|
||||
/* fall through */
|
||||
default:
|
||||
str->length++;
|
||||
continue;
|
||||
@ -3947,4 +3948,3 @@ void add_plugin_options(DYNAMIC_ARRAY *options, MEM_ROOT *mem_root)
|
||||
insert_dynamic(options, (uchar*) opt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2075,6 +2075,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
|
||||
if (res != 2)
|
||||
break;
|
||||
|
||||
/* fall through */
|
||||
case SQLCOM_UPDATE_MULTI:
|
||||
res= mysql_test_multiupdate(stmt, tables, res == 2);
|
||||
break;
|
||||
|
@ -1139,6 +1139,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;
|
||||
|
@ -931,6 +931,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:
|
||||
|
@ -5504,7 +5504,7 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
|
||||
case LEAVE_AS_IS:
|
||||
if (!indexes_were_disabled)
|
||||
break;
|
||||
/* fall-through: disabled indexes */
|
||||
/* fall-through */
|
||||
case DISABLE:
|
||||
error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
|
||||
}
|
||||
|
@ -4212,15 +4212,11 @@ size_number:
|
||||
switch (end_ptr[0])
|
||||
{
|
||||
case 'g':
|
||||
case 'G':
|
||||
text_shift_number+=10;
|
||||
case 'G': text_shift_number+=30; break;
|
||||
case 'm':
|
||||
case 'M':
|
||||
text_shift_number+=10;
|
||||
case 'M': text_shift_number+=20; break;
|
||||
case 'k':
|
||||
case 'K':
|
||||
text_shift_number+=10;
|
||||
break;
|
||||
case 'K': text_shift_number+=10; break;
|
||||
default:
|
||||
{
|
||||
my_error(ER_WRONG_SIZE_NUMBER, MYF(0));
|
||||
|
@ -1421,6 +1421,7 @@ bool ha_federated::create_where_from_key(String *to,
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case HA_READ_KEY_OR_NEXT:
|
||||
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_NEXT %d", i));
|
||||
if (emit_key_part_name(&tmp, key_part) ||
|
||||
@ -1440,6 +1441,7 @@ bool ha_federated::create_where_from_key(String *to,
|
||||
goto err;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case HA_READ_KEY_OR_PREV:
|
||||
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_PREV %d", i));
|
||||
if (emit_key_part_name(&tmp, key_part) ||
|
||||
@ -2973,6 +2975,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));
|
||||
|
@ -263,9 +263,8 @@ ulong federatedx_io_mysql::savepoint_release(ulong sp)
|
||||
savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *);
|
||||
if (savept->level < sp)
|
||||
break;
|
||||
if ((savept->flags & (SAVEPOINT_REALIZED |
|
||||
SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED)
|
||||
last= savept;
|
||||
if ((savept->flags & (SAVEPOINT_REALIZED | SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED)
|
||||
last= savept;
|
||||
savepoints.elements--;
|
||||
}
|
||||
|
||||
@ -291,8 +290,8 @@ ulong federatedx_io_mysql::savepoint_rollback(ulong sp)
|
||||
while (savepoints.elements)
|
||||
{
|
||||
savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *);
|
||||
if (savept->level <= sp)
|
||||
break;
|
||||
if (savept->level <= sp)
|
||||
break;
|
||||
savepoints.elements--;
|
||||
}
|
||||
|
||||
|
@ -1340,6 +1340,7 @@ bool ha_federatedx::create_where_from_key(String *to,
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case HA_READ_KEY_OR_NEXT:
|
||||
DBUG_PRINT("info", ("federatedx HA_READ_KEY_OR_NEXT %d", i));
|
||||
if (emit_key_part_name(&tmp, key_part) ||
|
||||
@ -1359,6 +1360,7 @@ bool ha_federatedx::create_where_from_key(String *to,
|
||||
goto err;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case HA_READ_KEY_OR_PREV:
|
||||
DBUG_PRINT("info", ("federatedx HA_READ_KEY_OR_PREV %d", i));
|
||||
if (emit_key_part_name(&tmp, key_part) ||
|
||||
|
@ -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;
|
||||
|
@ -34,6 +34,7 @@ int heap_extra(register HP_INFO *info, enum ha_extra_function function)
|
||||
switch (function) {
|
||||
case HA_EXTRA_RESET_STATE:
|
||||
heap_reset(info);
|
||||
/* fall through */
|
||||
case HA_EXTRA_NO_READCHECK:
|
||||
info->opt_flag&= ~READ_CHECK_USED; /* No readcheck */
|
||||
break;
|
||||
|
@ -5129,7 +5129,7 @@ ha_innobase::innobase_lock_autoinc(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Fall through to old style locking. */
|
||||
/* fall through */
|
||||
|
||||
case AUTOINC_OLD_STYLE_LOCKING:
|
||||
error = row_lock_table_autoinc_for_mysql(prebuilt);
|
||||
@ -7080,7 +7080,7 @@ create_options_are_valid(
|
||||
case ROW_TYPE_DYNAMIC:
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE;
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
|
||||
/* fall through since dynamic also shuns KBS */
|
||||
/* fall through */ /* since dynamic also shuns KBS */
|
||||
case ROW_TYPE_COMPACT:
|
||||
case ROW_TYPE_REDUNDANT:
|
||||
if (kbs_specified) {
|
||||
@ -7326,6 +7326,7 @@ ha_innobase::create(
|
||||
thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: assuming ROW_FORMAT=COMPACT.");
|
||||
/* fall through */
|
||||
case ROW_TYPE_DEFAULT:
|
||||
case ROW_TYPE_COMPACT:
|
||||
flags = DICT_TF_COMPACT;
|
||||
|
@ -477,7 +477,7 @@ dtype_get_fixed_size_low(
|
||||
#else /* !UNIV_HOTBACKUP */
|
||||
return(len);
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
/* fall through for variable-length charsets */
|
||||
/* fall through */ /* for variable-length charsets */
|
||||
case DATA_VARCHAR:
|
||||
case DATA_BINARY:
|
||||
case DATA_DECIMAL:
|
||||
|
@ -170,7 +170,7 @@ page_zip_rec_needs_ext(
|
||||
ignored if zip_size == 0 */
|
||||
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
|
||||
{
|
||||
ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES);
|
||||
ut_ad(rec_size > (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
|
||||
ut_ad(ut_is_2pow(zip_size));
|
||||
ut_ad(comp || !zip_size);
|
||||
|
||||
|
@ -3495,7 +3495,7 @@ check_next_foreign:
|
||||
|
||||
row_mysql_handle_errors(&err, trx, NULL, NULL);
|
||||
|
||||
/* Fall through to raise error */
|
||||
/* fall through */
|
||||
|
||||
default:
|
||||
/* No other possible error returns */
|
||||
@ -4315,7 +4315,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);
|
||||
|
@ -407,8 +407,8 @@ row_purge_remove_sec_if_poss_leaf(
|
||||
goto func_exit;
|
||||
}
|
||||
}
|
||||
/* fall through (the index entry is still needed,
|
||||
or the deletion succeeded) */
|
||||
/* 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:
|
||||
|
@ -2675,6 +2675,7 @@ row_sel_field_store_in_mysql_format(
|
||||
case DATA_SYS:
|
||||
/* These column types should never be shipped to MySQL. */
|
||||
ut_ad(0);
|
||||
/* fall through */
|
||||
|
||||
case DATA_CHAR:
|
||||
case DATA_FIXBINARY:
|
||||
|
@ -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= test(function != HA_EXTRA_PREPARE_FOR_DROP);
|
||||
|
@ -1169,6 +1169,7 @@ uint _ma_apply_redo_index(MARIA_HA *info,
|
||||
goto err;
|
||||
}
|
||||
page_length= page.size;
|
||||
break;
|
||||
}
|
||||
case KEY_OP_NONE:
|
||||
default:
|
||||
|
@ -3059,7 +3059,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:
|
||||
|
@ -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 */
|
||||
|
@ -1661,13 +1661,16 @@ bool CSphSEQuery::ParseField ( char * sField )
|
||||
char * sLat = sValue;
|
||||
char * p = sValue;
|
||||
|
||||
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0';
|
||||
if (!( p = strchr ( p, ',' ) )) break;
|
||||
*p++ = '\0';
|
||||
char * sLong = p;
|
||||
|
||||
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0';
|
||||
if (!( p = strchr ( p, ',' ) )) break;
|
||||
*p++ = '\0';
|
||||
char * sLatVal = p;
|
||||
|
||||
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0';
|
||||
if (!( p = strchr ( p, ',' ) )) break;
|
||||
*p++ = '\0';
|
||||
char * sLongVal = p;
|
||||
|
||||
m_sGeoLatAttr = chop(sLat);
|
||||
@ -1736,7 +1739,8 @@ bool CSphSEQuery::ParseField ( char * sField )
|
||||
while ( sRest )
|
||||
{
|
||||
char * sId = sRest;
|
||||
if (!( sRest = strchr ( sRest, ':' ) )) break; *sRest++ = '\0';
|
||||
if (!( sRest = strchr ( sRest, ':' ) )) break;
|
||||
*sRest++ = '\0';
|
||||
if (!( sRest - sId )) break;
|
||||
|
||||
char * sValue = sRest;
|
||||
|
@ -100,6 +100,7 @@ endmacro(append_cflags_if_supported)
|
||||
|
||||
set_cflags_if_supported(-Wno-missing-field-initializers)
|
||||
append_cflags_if_supported(-Wno-vla)
|
||||
append_cflags_if_supported(-Wno-implicit-fallthrough)
|
||||
|
||||
ADD_SUBDIRECTORY(ft-index)
|
||||
|
||||
|
@ -6144,7 +6144,7 @@ ha_innobase::innobase_lock_autoinc(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Fall through to old style locking. */
|
||||
/* fall through */
|
||||
|
||||
case AUTOINC_OLD_STYLE_LOCKING:
|
||||
error = row_lock_table_autoinc_for_mysql(prebuilt);
|
||||
@ -8190,7 +8190,7 @@ create_options_are_valid(
|
||||
case ROW_TYPE_DYNAMIC:
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE;
|
||||
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
|
||||
/* fall through since dynamic also shuns KBS */
|
||||
/* fall through */ /* since dynamic also shuns KBS */
|
||||
case ROW_TYPE_COMPACT:
|
||||
case ROW_TYPE_REDUNDANT:
|
||||
if (kbs_specified) {
|
||||
@ -8436,6 +8436,7 @@ ha_innobase::create(
|
||||
thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: assuming ROW_FORMAT=COMPACT.");
|
||||
/* fall through */
|
||||
case ROW_TYPE_DEFAULT:
|
||||
case ROW_TYPE_COMPACT:
|
||||
flags = DICT_TF_COMPACT;
|
||||
|
@ -477,7 +477,7 @@ dtype_get_fixed_size_low(
|
||||
#else /* !UNIV_HOTBACKUP */
|
||||
return(len);
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
/* fall through for variable-length charsets */
|
||||
/* fall through */
|
||||
case DATA_VARCHAR:
|
||||
case DATA_BINARY:
|
||||
case DATA_DECIMAL:
|
||||
|
@ -170,7 +170,7 @@ page_zip_rec_needs_ext(
|
||||
ignored if zip_size == 0 */
|
||||
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
|
||||
{
|
||||
ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES);
|
||||
ut_ad(rec_size > (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
|
||||
ut_ad(ut_is_2pow(zip_size));
|
||||
ut_ad(comp || !zip_size);
|
||||
|
||||
|
@ -3635,7 +3635,7 @@ check_next_foreign:
|
||||
|
||||
row_mysql_handle_errors(&err, trx, NULL, NULL);
|
||||
|
||||
/* Fall through to raise error */
|
||||
/* fall through */ /* to raise error */
|
||||
|
||||
default:
|
||||
/* No other possible error returns */
|
||||
@ -4455,7 +4455,7 @@ 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) */
|
||||
/* fall through */ /* this error is ignored by CHECK TABLE */
|
||||
case DB_END_OF_INDEX:
|
||||
func_exit:
|
||||
mem_free(buf);
|
||||
|
@ -407,8 +407,8 @@ row_purge_remove_sec_if_poss_leaf(
|
||||
goto func_exit;
|
||||
}
|
||||
}
|
||||
/* fall through (the index entry is still needed,
|
||||
or the deletion succeeded) */
|
||||
/* 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:
|
||||
|
@ -2678,6 +2678,7 @@ row_sel_field_store_in_mysql_format(
|
||||
case DATA_SYS:
|
||||
/* These column types should never be shipped to MySQL. */
|
||||
ut_ad(0);
|
||||
/* fall through */
|
||||
|
||||
case DATA_CHAR:
|
||||
case DATA_FIXBINARY:
|
||||
|
@ -2488,14 +2488,18 @@ static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)),
|
||||
return MY_CS_TOOSMALLN(count);
|
||||
|
||||
switch (count) {
|
||||
/* Fall through all cases!!! */
|
||||
#ifdef UNICODE_32BIT
|
||||
case 6: r[5] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x4000000;
|
||||
/* fall through */
|
||||
case 5: r[4] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x200000;
|
||||
/* fall through */
|
||||
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
|
||||
/* fall through */
|
||||
#endif
|
||||
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;
|
||||
@ -2521,9 +2525,10 @@ static int my_uni_utf8_no_range(CHARSET_INFO *cs __attribute__((unused)),
|
||||
|
||||
switch (count)
|
||||
{
|
||||
/* 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;
|
||||
@ -4979,10 +4984,12 @@ my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
|
||||
return MY_CS_TOOSMALLN(count);
|
||||
|
||||
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;
|
||||
@ -5011,10 +5018,12 @@ my_wc_mb_utf8mb4_no_range(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;
|
||||
|
@ -1377,7 +1377,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;
|
||||
@ -1465,10 +1465,9 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
|
||||
esign= 0;
|
||||
if (++s < end)
|
||||
switch (c= *s) {
|
||||
case '-':
|
||||
esign= 1;
|
||||
case '+':
|
||||
c= *++s;
|
||||
case '-': esign= 1;
|
||||
/* fall through */
|
||||
case '+': c= *++s;
|
||||
}
|
||||
if (s < end && c >= '0' && c <= '9')
|
||||
{
|
||||
@ -2360,7 +2359,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 +2367,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…
x
Reference in New Issue
Block a user