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

Json_writer::add_bool: Conditional jump or move depends on uninitialised value upon fulltext search under optimizer trace

    Details

      Description

      CREATE TABLE t1 (f VARCHAR(255), FULLTEXT(f));
      CREATE VIEW v1 AS SELECT * FROM t1;
       
      # Optional, fails either way
      INSERT INTO t1 VALUES ('foo'),('bar');
       
      SET optimizer_trace = 'enabled=on';
      SELECT COUNT(*) FROM v1 WHERE MATCH (f) AGAINST ('scenario' IN NATURAL LANGUAGE MODE);
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      10.4 7b33a6a1 Valgrind

      ==27879== Thread 6:
      ==27879== Conditional jump or move depends on uninitialised value(s)
      ==27879==    at 0xA88543: Json_writer::add_bool(bool) (my_json_writer.cc:163)
      ==27879==    by 0x92ED1B: Json_value_helper::add_bool(bool) (my_json_writer.h:298)
      ==27879==    by 0x92EDFF: Json_writer_object::add(char const*, bool) (my_json_writer.h:362)
      ==27879==    by 0x989B72: print_keyuse_array_for_trace(THD*, st_dynamic_array*) (sql_test.cc:676)
      ==27879==    by 0x8E84F6: make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*) (sql_select.cc:4985)
      ==27879==    by 0x8DE571: JOIN::optimize_inner() (sql_select.cc:2174)
      ==27879==    by 0x8DC057: JOIN::optimize() (sql_select.cc:1551)
      ==27879==    by 0x8E70E3: mysql_select(THD*, 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:4571)
      ==27879==    by 0x8D7567: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:424)
      ==27879==    by 0x89FCC2: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6652)
      ==27879==    by 0x894E7D: mysql_execute_command(THD*) (sql_parse.cc:3889)
      ==27879==    by 0x8A3C02: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8205)
      ==27879==    by 0x88F0E6: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==27879==    by 0x88D8CC: do_command(THD*) (sql_parse.cc:1358)
      ==27879==    by 0xA0D6C0: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==27879==    by 0xA0D431: handle_one_connection (sql_connect.cc:1302)
      

        Attachments

          Activity

            People

            • Assignee:
              varun Varun Gupta
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: