[MDEV-31301] sql/opt_split.cc:1043:5: warning: ‘best_param_tables’ may be used uninitialized Created: 2023-05-18  Updated: 2023-06-27  Resolved: 2023-06-27

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.4.28
Fix Version/s: 10.8.8, 10.4.31, 10.5.22, 10.6.15, 10.9.8, 10.10.6, 10.11.5

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-26301 Split optimization refills temporary ... Closed

 Description   

sql/opt_split.cc: In member function ‘SplM_plan_info* st_join_table::choose_best_splitting(uint, table_map, table_map*)’:
sql/opt_split.cc:1043:5: warning: ‘best_param_tables’ may be used uninitialized [-Wmaybe-uninitialized]
 1043 |     if (!best_param_tables)
      |     ^~
sql/opt_split.cc:966:13: note: ‘best_param_tables’ was declared here
  966 |   table_map best_param_tables;
      |             ^~~~~~~~~~~~~~~~~

best_param_tables isn't initialized to 0 anyway, The only changes add bits to it.



 Comments   
Comment by Daniel Black [ 2023-05-18 ]

https://github.com/MariaDB/server/pull/2642

Comment by Michael Widenius [ 2023-06-27 ]

This is already in the 10.4 source tree

Comment by Michael Widenius [ 2023-06-27 ]

Pushed to 10.4

Generated at Thu Feb 08 10:22:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.