Various Valgrind warnings around index intersection in maria-5.1-wl21
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Invalid
|
Undecided
|
Igor Babaev |
Bug Description
The following query
SELECT DISTINCT * FROM `table10000_
FORCE KEY ( PRIMARY , `col_smallint_key` , `col_bigint_key` , `col_varchar_
WHERE ( ( `col_smallint_key` <> 53 ) AND `col_smallint_key` IN ( 255 , 2 , 1 , 1 ) )
AND ( `col_varchar_
caused the following Valgrind warnings:
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x837FEFB: check_index_
_range.cc:5232)
==25046== by 0x8380088: find_index_
==25046== by 0x8380098: find_index_
==25046== by 0x838019D: get_best_
==25046== by 0x837BB8E: SQL_SELECT:
==25046== by 0x82E7B1A: get_quick_
==25046== by 0x82E98D8: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x837FFB7: find_index_
==25046== by 0x8380098: find_index_
==25046== by 0x8380098: find_index_
==25046== by 0x838019D: get_best_
==25046== by 0x837BB8E: SQL_SELECT:
==25046== by 0x82E7B1A: get_quick_
==25046== by 0x82E98D8: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x837FB9D: check_index_
_range.cc:5173)
==25046== by 0x8380088: find_index_
==25046== by 0x838019D: get_best_
==25046== by 0x837BB8E: SQL_SELECT:
==25046== by 0x82E7B1A: get_quick_
==25046== by 0x82E98D8: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046== by 0x821918: start_thread (in /lib/libpthread
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x8382A6A: get_key_
==25046== by 0x837DEE0: get_best_
==25046== by 0x837BC5A: SQL_SELECT:
==25046== by 0x82E7B1A: get_quick_
==25046== by 0x82E98D8: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046== by 0x821918: start_thread (in /lib/libpthread
==25046== by 0x40FACCD: clone (in /lib/libc-
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x82EDF91: best_access_
==25046== by 0x82EEDE0: best_extension_
c:5386)
==25046== by 0x82EE7E6: greedy_
==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.
==25046== by 0x82E9BFA: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046== by 0x821918: start_thread (in /lib/libpthread
==25046== by 0x40FACCD: clone (in /lib/libc-
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x82EEE41: best_extension_
c:5392)
==25046== by 0x82EE7E6: greedy_
==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.
==25046== by 0x82E9BFA: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046== by 0x821918: start_thread (in /lib/libpthread
==25046== by 0x40FACCD: clone (in /lib/libc-
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x82EEF66: best_extension_
c:5417)
==25046== by 0x82EE7E6: greedy_
==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.
==25046== by 0x82E9BFA: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046== by 0x821918: start_thread (in /lib/libpthread
==25046== by 0x40FACCD: clone (in /lib/libc-
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x82EF25D: best_extension_
c:5463)
==25046== by 0x82EE7E6: greedy_
==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.
==25046== by 0x82E9BFA: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046== by 0x821918: start_thread (in /lib/libpthread
==25046== by 0x40FACCD: clone (in /lib/libc-
==25046==
==25046== Conditional jump or move depends on uninitialised value(s)
==25046== at 0x82EE82B: greedy_
==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.
==25046== by 0x82E9BFA: make_join_
==25046== by 0x82E2066: JOIN::optimize() (sql_select.
==25046== by 0x82E7842: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, un
signed long long, select_result*, st_select_
==25046== by 0x830CD07: mysql_explain_
==25046== by 0x8286C4B: execute_
==25046== by 0x827D735: mysql_execute_
==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
==25046== by 0x827B221: dispatch_
==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
==25046== by 0x827748F: handle_
==25046== by 0x821918: start_thread (in /lib/libpthread
==25046== by 0x40FACCD: clone (in /lib/libc-
==25046==
Simplification is not available for Valgrind warnings, so an unsimplified test case will be attached shortly.
See also bug 684086