1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-19740: Fix GCC 9.2.1 -Wmaybe-uninitialized on AMD64

For CMAKE_BUILD_TYPE=Debug, the default MYSQL_MAINTAINER_MODE=AUTO
implies -Werror along with other flags in cmake/maintainer.cmake,
which would break the debug builds when CMAKE_CXX_FLAGS include -O2.

This fix includes a backport of 6dd3f24090
from MariaDB 10.3.
This commit is contained in:
Marko Mäkelä
2019-09-27 10:43:23 +03:00
parent 2d6719d7ee
commit ca9e0089d5
6 changed files with 13 additions and 22 deletions

View File

@ -1814,16 +1814,13 @@ public:
bool is_partial_fields_present;
Index_prefix_calc(THD *thd, TABLE *table, KEY *key_info)
: index_table(table), index_info(key_info)
: index_table(table), index_info(key_info), prefixes(0), empty(true),
calc_state(NULL), is_single_comp_pk(false), is_partial_fields_present(false)
{
uint i;
Prefix_calc_state *state;
uint key_parts= table->actual_n_key_parts(key_info);
empty= TRUE;
prefixes= 0;
LINT_INIT_STRUCT(calc_state);
is_partial_fields_present= is_single_comp_pk= FALSE;
uint pk= table->s->primary_key;
if ((uint) (table->key_info - key_info) == pk &&
table->key_info[pk].user_defined_key_parts == 1)