Details
Description
When compiling Spider with 10.6, I got these errors:
/mariadb/10.6m/storage/spider/spd_sys_table.cc: In function 'int spider_get_sys_link_mon_key(TABLE*, SPIDER_MON_KEY*, MEM_ROOT*, int*)':
|
/mariadb/10.6m/storage/spider/spd_sys_table.cc:3110:12: error: 'link_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
3110 | !memcmp(link_id, mon_key->link_id, link_id_length)
|
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
/mariadb/10.6m/storage/spider/spd_sys_table.cc:3109:12: error: 'table_name' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
3109 | !memcmp(table_name, mon_key->table_name, table_name_length) &&
|
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
That is with GCC 11, CMAKE_BUILD_TYPE=Debug and CMAKE_CXX_FLAGS=-Og.
—
On 10.3, I got the following:
/home/nayuta_mariadb/repo/mariadb-server/storage/spider/ha_spider.cc:428:47: error: ‘hash_value’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
428 | partition_handler_share->table_hash_value = hash_value;
|