Evgeny Potemkin skrev:
> Hi Martin,
>
> In addition to previous mail, your test doesn't trigger the bug
> (valgrind doesn't show warning on a clean server).
> The fix is correct.
This is what I get on my machine (5.1 from last night, 32-bit Linux, the
file contains just the test case):
./mtr bug48459 --valgrind 2>&1| grep Conditional -A10
==18289== Conditional jump or move depends on uninitialised value(s)
==18289== at 0x83E53AA: count_key_part_usage(SEL_ARG*, SEL_ARG*)
(opt_range.cc:7317)
==18289== by 0x83F249C: SEL_ARG::test_use_count(SEL_ARG*)
(opt_range.cc:7354)
==18289== by 0x83F4CCA: tree_and(RANGE_OPT_PARAM*, SEL_TREE*,
SEL_TREE*) (opt_range.cc:6141)
==18289== by 0x83F6FA4: get_mm_tree(RANGE_OPT_PARAM*, Item*)
(opt_range.cc:5452)
==18289== by 0x83FDE86: SQL_SELECT::test_quick_select(THD*,
Bitmap<64u>, unsigned long long, unsigned long long, bool)
(opt_range.cc:2331)
==18289== by 0x8355464: make_join_select(JOIN*, SQL_SELECT*, Item*)
(sql_select.cc:6316)
==18289== by 0x8361F11: JOIN::optimize() (sql_select.cc:1081)
==18289== by 0x83651F2: mysql_select(THD*, Item***, TABLE_LIST*,
unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*,
Item*, st_order*, unsigned long long, select_result*,
st_select_lex_unit*, st_select_lex*) (sql_select.cc:2426)
==18289== by 0x836AC06: handle_select(THD*, st_lex*, select_result*,
unsigned long) (sql_select.cc:269)
==18289== by 0x82D836C: execute_sqlcom_select(THD*, TABLE_LIST*)
(sql_parse.cc:5051)
--
==18289== Conditional jump or move depends on uninitialised value(s)
==18289== at 0x83F0515: check_quick_keys(PARAM*, unsigned int,
SEL_ARG*, unsigned char*, unsigned int, int, unsigned char*, unsigned
int, int) (opt_range.cc:7559)
==18289== by 0x83F0D7C: check_quick_select(PARAM*, unsigned int,
SEL_ARG*, bool) (opt_range.cc:7439)
==18289== by 0x83F7CC1: get_key_scans_params(PARAM*, SEL_TREE*, bool,
bool, double) (opt_range.cc:4870)
==18289== by 0x83FE07A: SQL_SELECT::test_quick_select(THD*,
Bitmap<64u>, unsigned long long, unsigned long long, bool)
(opt_range.cc:2377)
==18289== by 0x8355464: make_join_select(JOIN*, SQL_SELECT*, Item*)
(sql_select.cc:6316)
==18289== by 0x8361F11: JOIN::optimize() (sql_select.cc:1081)
==18289== by 0x83651F2: mysql_select(THD*, Item***, TABLE_LIST*,
unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*,
Item*, st_order*, unsigned long long, select_result*,
st_select_lex_unit*, st_select_lex*) (sql_select.cc:2426)
==18289== by 0x836AC06: handle_select(THD*, st_lex*, select_result*,
unsigned long) (sql_select.cc:269)
==18289== by 0x82D836C: execute_sqlcom_select(THD*, TABLE_LIST*)
(sql_parse.cc:5051)
==18289== by 0x82DA624: mysql_execute_command(THD*) (sql_parse.cc:2246)
I didn't see the first error yesterday, so I'll have to fix that too.
New patch coming up!
Best Regards
Martin