1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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

@@ -1,5 +1,5 @@
/*
Copyright (c) 2010, 2015, MariaDB
Copyright (c) 2010, 2019, 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
@@ -92,19 +92,15 @@ class Loose_scan_opt
public:
Loose_scan_opt():
try_loosescan(FALSE),
try_loosescan(false),
bound_sj_equalities(0),
quick_uses_applicable_index(FALSE)
quick_uses_applicable_index(FALSE), quick_max_loose_keypart(0),
best_loose_scan_key(0), best_loose_scan_records(0.0),
best_loose_scan_start_key(NULL),
best_max_loose_keypart(0), best_ref_depend_map(0)
{
/* Protected by quick_uses_applicable_index */
LINT_INIT(quick_max_loose_keypart);
/* The following are protected by best_loose_scan_cost!= DBL_MAX */
LINT_INIT(best_loose_scan_key);
LINT_INIT(best_loose_scan_records);
LINT_INIT(best_max_loose_keypart);
LINT_INIT(best_loose_scan_start_key);
}
void init(JOIN *join, JOIN_TAB *s, table_map remaining_tables)
{
/*