Skip to content

Commit

Permalink
MDEV-19351 statistics_for_command_is_needed: Conditional jump or move
Browse files Browse the repository at this point in the history
           depends on uninitialised value

Initialized THD::force_read_stats introduced in the patch for MDEV-17605.
Leaving this field uninitialized in the constructor of the THD class may
trigger reading statistical data that is not needed.
  • Loading branch information
igorbabaev committed Apr 28, 2019
1 parent d88dfd8 commit d3534d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sql/sql_class.cc
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ THD::THD(bool is_wsrep_applier)
memset(&invoker_host, 0, sizeof(invoker_host));
prepare_derived_at_open= FALSE;
create_tmp_table_for_derived= FALSE;
force_read_stats= FALSE;
save_prep_leaf_list= FALSE;
/* Restore THR_THD */
set_current_thd(old_THR_THD);
Expand Down

0 comments on commit d3534d5

Please sign in to comment.