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

Valgrind warnings (Conditional jump or move depends on uninitialised value) with static_cond_pushdown=on, FROM subquery

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.5
    • Component/s: None
    • Labels:
      None

      Description

      ==4852== Thread 5:
      ==4852== Conditional jump or move depends on uninitialised value(s)
      ==4852==    at 0x66C0AA: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int, unsigned int) (sql_select.cc:7698)
      ==4852==    by 0x66BDC2: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int, unsigned int) (sql_select.cc:7629)
      ==4852==    by 0x66A33D: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int, unsigned int) (sql_select.cc:6884)
      ==4852==    by 0x66997B: choose_plan(JOIN*, unsigned long long) (sql_select.cc:6461)
      ==4852==    by 0x663415: make_join_statistics(JOIN*, List<TABLE_LIST>&, Item*, st_dynamic_array*) (sql_select.cc:4041)
      ==4852==    by 0x659D93: JOIN::optimize_inner() (sql_select.cc:1380)
      ==4852==    by 0x658C2B: JOIN::optimize() (sql_select.cc:1059)
      ==4852==    by 0x660D74: 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:3338)
      ==4852==    by 0x657091: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:427)
      ==4852==    by 0x62AB09: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4894)
      ==4852==    by 0x622F48: mysql_execute_command(THD*) (sql_parse.cc:2293)
      ==4852==    by 0x62D376: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6018)
      ==4852==    by 0x6201A5: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1097)
      ==4852==    by 0x61F66E: do_command(THD*) (sql_parse.cc:812)
      ==4852==    by 0x73DF0C: do_handle_one_connection(THD*) (sql_connect.cc:1266)
      ==4852==    by 0x73DC7A: handle_one_connection (sql_connect.cc:1181)
      ==4852== Conditional jump or move depends on uninitialised value(s)
      ==4852==    at 0x66B9ED: best_extension_by_limited_search(JOIN*, unsigned long long, unsigned int, double, double, unsigned int, unsigned int, unsigned int) (sql_select.cc:7572)
      ==4852==    by 0x66A33D: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int, unsigned int) (sql_select.cc:6884)
      ==4852==    by 0x66997B: choose_plan(JOIN*, unsigned long long) (sql_select.cc:6461)
      ==4852==    by 0x663415: make_join_statistics(JOIN*, List<TABLE_LIST>&, Item*, st_dynamic_array*) (sql_select.cc:4041)
      ==4852==    by 0x659D93: JOIN::optimize_inner() (sql_select.cc:1380)
      ==4852==    by 0x658C2B: JOIN::optimize() (sql_select.cc:1059)
      ==4852==    by 0x660D74: 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:3338)
      ==4852==    by 0x657091: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:427)
      ==4852==    by 0x62AB09: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4894)
      ==4852==    by 0x622F48: mysql_execute_command(THD*) (sql_parse.cc:2293)
      ==4852==    by 0x62D376: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6018)
      ==4852==    by 0x6201A5: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1097)
      ==4852==    by 0x61F66E: do_command(THD*) (sql_parse.cc:812)
      ==4852==    by 0x73DF0C: do_handle_one_connection(THD*) (sql_connect.cc:1266)
      ==4852==    by 0x73DC7A: handle_one_connection (sql_connect.cc:1181)
      ==4852==    by 0x9A6C79: pfs_spawn_thread (pfs.cc:1015)
      ==4852== Conditional jump or move depends on uninitialised value(s)
      ==4852==    at 0x66A37D: greedy_search(JOIN*, unsigned long long, unsigned int, unsigned int, unsigned int) (sql_select.cc:6892)
      ==4852==    by 0x66997B: choose_plan(JOIN*, unsigned long long) (sql_select.cc:6461)
      ==4852==    by 0x663415: make_join_statistics(JOIN*, List<TABLE_LIST>&, Item*, st_dynamic_array*) (sql_select.cc:4041)
      ==4852==    by 0x659D93: JOIN::optimize_inner() (sql_select.cc:1380)
      ==4852==    by 0x658C2B: JOIN::optimize() (sql_select.cc:1059)
      ==4852==    by 0x660D74: 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:3338)
      ==4852==    by 0x657091: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:427)
      ==4852==    by 0x62AB09: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4894)
      ==4852==    by 0x622F48: mysql_execute_command(THD*) (sql_parse.cc:2293)
      ==4852==    by 0x62D376: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6018)
      ==4852==    by 0x6201A5: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1097)
      ==4852==    by 0x61F66E: do_command(THD*) (sql_parse.cc:812)
      ==4852==    by 0x73DF0C: do_handle_one_connection(THD*) (sql_connect.cc:1266)
      ==4852==    by 0x73DC7A: handle_one_connection (sql_connect.cc:1181)
      ==4852==    by 0x9A6C79: pfs_spawn_thread (pfs.cc:1015)
      ==4852==    by 0x5897E99: start_thread (pthread_create.c:308)

      revision-id: timour@askmonty.org-20131022131141-28p67jesfk9n6ynq
      revno: 3751
      branch-nick: 10.0-mdev83
      BUILD/compile-pentium-debug-max-no-ndb

      Test case:

      SET optimizer_switch='static_cond_pushdown=on';
       
      CREATE TABLE t1 (x INT, y INT) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (1, 9),(2, 3);
       
      SELECT * FROM t1 t1a, ( SELECT * FROM t1 ) AS t1b 
      WHERE t1a.x = ( SELECT SUM(x) FROM t1 ) OR t1a.x <= t1a.y;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timour Timour Katchaounov (Inactive)
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: