Fix gcc 7.3 compiler warnings.
This commit is contained in:
parent
9d42eb5e28
commit
701f0b8e36
@ -7307,7 +7307,8 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param,
|
|||||||
param->current_table);
|
param->current_table);
|
||||||
#ifdef HAVE_SPATIAL
|
#ifdef HAVE_SPATIAL
|
||||||
Field::geometry_type sav_geom_type;
|
Field::geometry_type sav_geom_type;
|
||||||
if (field_item->field->type() == MYSQL_TYPE_GEOMETRY)
|
const bool geometry= field_item->field->type() == MYSQL_TYPE_GEOMETRY;
|
||||||
|
if (geometry)
|
||||||
{
|
{
|
||||||
sav_geom_type= ((Field_geom*) field_item->field)->geom_type;
|
sav_geom_type= ((Field_geom*) field_item->field)->geom_type;
|
||||||
/* We have to be able to store all sorts of spatial features here */
|
/* We have to be able to store all sorts of spatial features here */
|
||||||
@ -7342,7 +7343,7 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SPATIAL
|
#ifdef HAVE_SPATIAL
|
||||||
if (field_item->field->type() == MYSQL_TYPE_GEOMETRY)
|
if (geometry)
|
||||||
{
|
{
|
||||||
((Field_geom*) field_item->field)->geom_type= sav_geom_type;
|
((Field_geom*) field_item->field)->geom_type= sav_geom_type;
|
||||||
}
|
}
|
||||||
|
@ -2776,8 +2776,8 @@ void advance_sj_state(JOIN *join, table_map remaining_tables, uint idx,
|
|||||||
LooseScan detector in best_access_path)
|
LooseScan detector in best_access_path)
|
||||||
*/
|
*/
|
||||||
remaining_tables &= ~new_join_tab->table->map;
|
remaining_tables &= ~new_join_tab->table->map;
|
||||||
table_map dups_producing_tables, prev_dups_producing_tables,
|
table_map dups_producing_tables, prev_dups_producing_tables= 0,
|
||||||
prev_sjm_lookup_tables;
|
prev_sjm_lookup_tables= 0;
|
||||||
|
|
||||||
if (idx == join->const_tables)
|
if (idx == join->const_tables)
|
||||||
dups_producing_tables= 0;
|
dups_producing_tables= 0;
|
||||||
@ -2788,7 +2788,7 @@ void advance_sj_state(JOIN *join, table_map remaining_tables, uint idx,
|
|||||||
if ((emb_sj_nest= new_join_tab->emb_sj_nest))
|
if ((emb_sj_nest= new_join_tab->emb_sj_nest))
|
||||||
dups_producing_tables |= emb_sj_nest->sj_inner_tables;
|
dups_producing_tables |= emb_sj_nest->sj_inner_tables;
|
||||||
|
|
||||||
Semi_join_strategy_picker **strategy, **prev_strategy;
|
Semi_join_strategy_picker **strategy, **prev_strategy= NULL;
|
||||||
if (idx == join->const_tables)
|
if (idx == join->const_tables)
|
||||||
{
|
{
|
||||||
/* First table, initialize pickers */
|
/* First table, initialize pickers */
|
||||||
|
@ -2891,7 +2891,8 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
|
|||||||
ulong query_length= 0;
|
ulong query_length= 0;
|
||||||
bool clear_role= FALSE;
|
bool clear_role= FALSE;
|
||||||
char buff[512];
|
char buff[512];
|
||||||
enum_binlog_format save_binlog_format;
|
enum_binlog_format save_binlog_format=
|
||||||
|
thd->get_current_stmt_binlog_format();
|
||||||
const CSET_STRING query_save __attribute__((unused)) = thd->query_string;
|
const CSET_STRING query_save __attribute__((unused)) = thd->query_string;
|
||||||
|
|
||||||
DBUG_ENTER("acl_set_default_role");
|
DBUG_ENTER("acl_set_default_role");
|
||||||
@ -2922,6 +2923,7 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
|
|||||||
if (WSREP(thd) && !IF_WSREP(thd->wsrep_applier, 0))
|
if (WSREP(thd) && !IF_WSREP(thd->wsrep_applier, 0))
|
||||||
{
|
{
|
||||||
thd->set_query(buff, query_length, system_charset_info);
|
thd->set_query(buff, query_length, system_charset_info);
|
||||||
|
// Attention!!! here is implicit goto error;
|
||||||
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL);
|
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3562,6 +3562,10 @@ public:
|
|||||||
*format= (enum_binlog_format) variables.binlog_format;
|
*format= (enum_binlog_format) variables.binlog_format;
|
||||||
*current_format= current_stmt_binlog_format;
|
*current_format= current_stmt_binlog_format;
|
||||||
}
|
}
|
||||||
|
inline enum_binlog_format get_current_stmt_binlog_format()
|
||||||
|
{
|
||||||
|
return current_stmt_binlog_format;
|
||||||
|
}
|
||||||
inline void set_binlog_format(enum_binlog_format format,
|
inline void set_binlog_format(enum_binlog_format format,
|
||||||
enum_binlog_format current_format)
|
enum_binlog_format current_format)
|
||||||
{
|
{
|
||||||
|
@ -895,7 +895,7 @@ void Explain_select::print_explain_json(Explain_query *query,
|
|||||||
{
|
{
|
||||||
Sort_and_group_tracker::Iterator iter(&ops_tracker);
|
Sort_and_group_tracker::Iterator iter(&ops_tracker);
|
||||||
enum_qep_action action;
|
enum_qep_action action;
|
||||||
Filesort_tracker *fs_tracker;
|
Filesort_tracker *fs_tracker= NULL;
|
||||||
|
|
||||||
while ((action= iter.get_next(&fs_tracker)) != EXPL_ACTION_EOF)
|
while ((action= iter.get_next(&fs_tracker)) != EXPL_ACTION_EOF)
|
||||||
{
|
{
|
||||||
|
@ -8313,6 +8313,12 @@ int create_partition_name(char *out, size_t outlen, const char *in1,
|
|||||||
end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#TMP#", NullS);
|
end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#TMP#", NullS);
|
||||||
else if (name_variant == RENAMED_PART_NAME)
|
else if (name_variant == RENAMED_PART_NAME)
|
||||||
end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#REN#", NullS);
|
end= strxnmov(out, outlen-1, in1, "#P#", transl_part, "#REN#", NullS);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBUG_ASSERT(0);
|
||||||
|
out[0]= 0;
|
||||||
|
end= out + (outlen-1);
|
||||||
|
}
|
||||||
if (end - out == static_cast<ptrdiff_t>(outlen-1))
|
if (end - out == static_cast<ptrdiff_t>(outlen-1))
|
||||||
{
|
{
|
||||||
my_error(ER_PATH_LENGTH, MYF(0), longest_str(in1, transl_part));
|
my_error(ER_PATH_LENGTH, MYF(0), longest_str(in1, transl_part));
|
||||||
@ -8355,6 +8361,12 @@ int create_subpartition_name(char *out, size_t outlen,
|
|||||||
else if (name_variant == RENAMED_PART_NAME)
|
else if (name_variant == RENAMED_PART_NAME)
|
||||||
end= strxnmov(out, outlen-1, in1, "#P#", transl_part_name,
|
end= strxnmov(out, outlen-1, in1, "#P#", transl_part_name,
|
||||||
"#SP#", transl_subpart_name, "#REN#", NullS);
|
"#SP#", transl_subpart_name, "#REN#", NullS);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBUG_ASSERT(0);
|
||||||
|
out[0]= 0;
|
||||||
|
end= out + (outlen-1);
|
||||||
|
}
|
||||||
if (end - out == static_cast<ptrdiff_t>(outlen-1))
|
if (end - out == static_cast<ptrdiff_t>(outlen-1))
|
||||||
{
|
{
|
||||||
my_error(ER_PATH_LENGTH, MYF(0),
|
my_error(ER_PATH_LENGTH, MYF(0),
|
||||||
|
@ -1723,7 +1723,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
|
|||||||
keyinfo= share->key_info;
|
keyinfo= share->key_info;
|
||||||
uint primary_key= my_strcasecmp(system_charset_info, share->keynames.type_names[0],
|
uint primary_key= my_strcasecmp(system_charset_info, share->keynames.type_names[0],
|
||||||
primary_key_name) ? MAX_KEY : 0;
|
primary_key_name) ? MAX_KEY : 0;
|
||||||
KEY* key_first_info;
|
KEY* key_first_info= NULL;
|
||||||
|
|
||||||
if (primary_key >= MAX_KEY && keyinfo->flags & HA_NOSAME)
|
if (primary_key >= MAX_KEY && keyinfo->flags & HA_NOSAME)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user