Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3763

LP:684144 - Various Valgrind warnings around index intersection in maria-5.1-wl21

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Resolution: Not a Bug
    • None
    • None
    • None

    Description

      The following query

      SELECT DISTINCT * FROM `table10000_aria_int_autoinc`
      FORCE KEY ( PRIMARY , `col_smallint_key` , `col_bigint_key` , `col_varchar_10_key` , `col_varchar_64_key` )
      WHERE ( ( `col_smallint_key` <> 53 ) AND `col_smallint_key` IN ( 255 , 2 , 1 , 1 ) )
      AND ( `col_varchar_10_key` IS NULL OR `col_varchar_10_key` BETWEEN 'Arkansas' AND 'hq' )

      caused the following Valgrind warnings:

      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x837FEFB: check_index_intersect_extension(st_partial_index_intersection_info*, st_index_scan_info*, st_partial_index_intersection_info*) (opt
      _range.cc:5232)
      ==25046== by 0x8380088: find_index_intersect_best_extension(st_partial_index_intersection_info*) (opt_range.cc:5291)
      ==25046== by 0x8380098: find_index_intersect_best_extension(st_partial_index_intersection_info*) (opt_range.cc:5292)
      ==25046== by 0x838019D: get_best_index_intersect(PARAM*, SEL_TREE*, double) (opt_range.cc:5343)
      ==25046== by 0x837BB8E: SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool) (opt_range.cc:3067)
      ==25046== by 0x82E7B1A: get_quick_record_count(THD*, SQL_SELECT*, st_table*, Bitmap<64u> const*, unsigned long long) (sql_select.cc:2600)
      ==25046== by 0x82E98D8: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3037)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x837FFB7: find_index_intersect_best_extension(st_partial_index_intersection_info*) (opt_range.cc:5269)
      ==25046== by 0x8380098: find_index_intersect_best_extension(st_partial_index_intersection_info*) (opt_range.cc:5292)
      ==25046== by 0x8380098: find_index_intersect_best_extension(st_partial_index_intersection_info*) (opt_range.cc:5292)
      ==25046== by 0x838019D: get_best_index_intersect(PARAM*, SEL_TREE*, double) (opt_range.cc:5343)
      ==25046== by 0x837BB8E: SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool) (opt_range.cc:3067)
      ==25046== by 0x82E7B1A: get_quick_record_count(THD*, SQL_SELECT*, st_table*, Bitmap<64u> const*, unsigned long long) (sql_select.cc:2600)
      ==25046== by 0x82E98D8: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3037)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x837FB9D: check_index_intersect_extension(st_partial_index_intersection_info*, st_index_scan_info*, st_partial_index_intersection_info*) (opt
      _range.cc:5173)
      ==25046== by 0x8380088: find_index_intersect_best_extension(st_partial_index_intersection_info*) (opt_range.cc:5291)
      ==25046== by 0x838019D: get_best_index_intersect(PARAM*, SEL_TREE*, double) (opt_range.cc:5343)
      ==25046== by 0x837BB8E: SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool) (opt_range.cc:3067)
      ==25046== by 0x82E7B1A: get_quick_record_count(THD*, SQL_SELECT*, st_table*, Bitmap<64u> const*, unsigned long long) (sql_select.cc:2600)
      ==25046== by 0x82E98D8: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3037)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046== by 0x821918: start_thread (in /lib/libpthread-2.12.1.so)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x8382A6A: get_key_scans_params(PARAM*, SEL_TREE*, bool, bool, double) (opt_range.cc:6377)
      ==25046== by 0x837DEE0: get_best_disjunct_quick(PARAM*, SEL_IMERGE*, double) (opt_range.cc:4416)
      ==25046== by 0x837BC5A: SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool) (opt_range.cc:3087)
      ==25046== by 0x82E7B1A: get_quick_record_count(THD*, SQL_SELECT*, st_table*, Bitmap<64u> const*, unsigned long long) (sql_select.cc:2600)
      ==25046== by 0x82E98D8: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3037)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046== by 0x821918: start_thread (in /lib/libpthread-2.12.1.so)
      ==25046== by 0x40FACCD: clone (in /lib/libc-2.12.1.so)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x82EDF91: best_access_path(JOIN*, st_join_table*, THD*, unsigned long long, unsigned int, double, double) (sql_select.cc:4778)
      ==25046== by 0x82EEDE0: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int) (sql_select.c
      c:5386)
      ==25046== by 0x82EE7E6: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int) (sql_select.cc:5162)
      ==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.cc:4876)
      ==25046== by 0x82E9BFA: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3080)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046== by 0x821918: start_thread (in /lib/libpthread-2.12.1.so)
      ==25046== by 0x40FACCD: clone (in /lib/libc-2.12.1.so)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x82EEE41: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int) (sql_select.c
      c:5392)
      ==25046== by 0x82EE7E6: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int) (sql_select.cc:5162)
      ==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.cc:4876)
      ==25046== by 0x82E9BFA: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3080)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046== by 0x821918: start_thread (in /lib/libpthread-2.12.1.so)
      ==25046== by 0x40FACCD: clone (in /lib/libc-2.12.1.so)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x82EEF66: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int) (sql_select.c
      c:5417)
      ==25046== by 0x82EE7E6: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int) (sql_select.cc:5162)
      ==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.cc:4876)
      ==25046== by 0x82E9BFA: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3080)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046== by 0x821918: start_thread (in /lib/libpthread-2.12.1.so)
      ==25046== by 0x40FACCD: clone (in /lib/libc-2.12.1.so)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x82EF25D: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int) (sql_select.c
      c:5463)
      ==25046== by 0x82EE7E6: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int) (sql_select.cc:5162)
      ==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.cc:4876)
      ==25046== by 0x82E9BFA: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3080)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046== by 0x821918: start_thread (in /lib/libpthread-2.12.1.so)
      ==25046== by 0x40FACCD: clone (in /lib/libc-2.12.1.so)
      ==25046==
      ==25046== Conditional jump or move depends on uninitialised value(s)
      ==25046== at 0x82EE82B: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int) (sql_select.cc:5169)
      ==25046== by 0x82EE2EF: choose_plan(JOIN*, unsigned long long) (sql_select.cc:4876)
      ==25046== by 0x82E9BFA: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:3080)
      ==25046== by 0x82E2066: JOIN::optimize() (sql_select.cc:1029)
      ==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_lex_unit*, st_select_lex*) (sql_select.cc:2538)
      ==25046== by 0x830CD07: mysql_explain_union(THD*, st_select_lex_unit*, select_result*) (sql_select.cc:17200)
      ==25046== by 0x8286C4B: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5144)
      ==25046== by 0x827D735: mysql_execute_command(THD*) (sql_parse.cc:2340)
      ==25046== by 0x8288E45: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6092)
      ==25046== by 0x827B221: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1269)
      ==25046== by 0x827A47E: do_command(THD*) (sql_parse.cc:895)
      ==25046== by 0x827748F: handle_one_connection (sql_connect.cc:1138)
      ==25046== by 0x821918: start_thread (in /lib/libpthread-2.12.1.so)
      ==25046== by 0x40FACCD: clone (in /lib/libc-2.12.1.so)
      ==25046==

      Simplification is not available for Valgrind warnings, so an unsimplified test case will be attached shortly.

      Attachments

        Activity

          People

            igor Igor Babaev
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.