mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fix GCC 10.2.0 -Og -fsanitize=undefined -Wmaybe-uninitialized
For some reason, adding -fsanitize=undefined (cmake -DWITH_UBSAN=ON) to the compilation flags will cause even more warnings to be emitted. The warnings do look bogus, but the code can be simplified.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010, 2019, MariaDB
|
||||
Copyright (c) 2010, 2020, 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
|
||||
@@ -2634,16 +2634,11 @@ bool find_eq_ref_candidate(TABLE *table, table_map sj_inner_tables)
|
||||
do
|
||||
{
|
||||
uint key= keyuse->key;
|
||||
KEY *keyinfo;
|
||||
key_part_map bound_parts= 0;
|
||||
bool is_excluded_key= keyuse->is_for_hash_join();
|
||||
if (!is_excluded_key)
|
||||
{
|
||||
keyinfo= table->key_info + key;
|
||||
is_excluded_key= !MY_TEST(keyinfo->flags & HA_NOSAME);
|
||||
}
|
||||
if (!is_excluded_key)
|
||||
if (!keyuse->is_for_hash_join() &&
|
||||
(table->key_info[key].flags & HA_NOSAME))
|
||||
{
|
||||
KEY *keyinfo= table->key_info + key;
|
||||
do /* For all equalities on all key parts */
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user