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

mi_rrnd: Conditional jump or move depends on uninitialised value upon inserting into blob with long key

    XMLWordPrintable

    Details

      Description

      Note: The failure became possible after MDEV-371, without it the key without a length in the table definition is rejected.

      CREATE TABLE t1 (b BLOB, UNIQUE(b)) ENGINE=MyISAM;
      REPLACE INTO t1 VALUES (0),(3);
      --error 0,1062
      REPLACE INTO t1 VALUES (0),(3);
       
      # Cleanup
      DROP TABLE t1;
      

      bb-10.4-serg 561f0c88

      ==16800== Conditional jump or move depends on uninitialised value(s)
      ==16800==    at 0x1372E5B: mi_rrnd (mi_rrnd.c:40)
      ==16800==    by 0x13361B9: ha_myisam::rnd_pos(unsigned char*, unsigned char*) (ha_myisam.cc:2010)
      ==16800==    by 0xBE9F51: handler::ha_rnd_pos(unsigned char*, unsigned char*) (handler.cc:3014)
      ==16800==    by 0x84AB5E: write_record(THD*, TABLE*, st_copy_info*) (sql_insert.cc:1754)
      ==16800==    by 0x848DD0: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:1067)
      ==16800==    by 0x894749: mysql_execute_command(THD*) (sql_parse.cc:4791)
      ==16800==    by 0x8A05C7: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8157)
      ==16800==    by 0x88BB69: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==16800==    by 0x88A33D: do_command(THD*) (sql_parse.cc:1358)
      ==16800==    by 0xA09F42: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==16800==    by 0xA09CB3: handle_one_connection (sql_connect.cc:1302)
      ==16800==    by 0xF24948: pfs_spawn_thread (pfs.cc:1862)
      ==16800==    by 0x4E3F493: start_thread (pthread_create.c:333)
      ==16800==    by 0x6A9A93E: clone (clone.S:97)
      ==16800== Conditional jump or move depends on uninitialised value(s)
      ==16800==    at 0x1358562: _mi_read_rnd_dynamic_record (mi_dynrec.c:1746)
      ==16800==    by 0x1372F45: mi_rrnd (mi_rrnd.c:59)
      ==16800==    by 0x13361B9: ha_myisam::rnd_pos(unsigned char*, unsigned char*) (ha_myisam.cc:2010)
      ==16800==    by 0xBE9F51: handler::ha_rnd_pos(unsigned char*, unsigned char*) (handler.cc:3014)
      ==16800==    by 0x84AB5E: write_record(THD*, TABLE*, st_copy_info*) (sql_insert.cc:1754)
      ==16800==    by 0x848DD0: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:1067)
      ==16800==    by 0x894749: mysql_execute_command(THD*) (sql_parse.cc:4791)
      ==16800==    by 0x8A05C7: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8157)
      ==16800==    by 0x88BB69: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==16800==    by 0x88A33D: do_command(THD*) (sql_parse.cc:1358)
      ==16800==    by 0xA09F42: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==16800==    by 0xA09CB3: handle_one_connection (sql_connect.cc:1302)
      ==16800==    by 0xF24948: pfs_spawn_thread (pfs.cc:1862)
      ==16800==    by 0x4E3F493: start_thread (pthread_create.c:333)
      ==16800==    by 0x6A9A93E: clone (clone.S:97)
      ==16800== Conditional jump or move depends on uninitialised value(s)
      ==16800==    at 0x13585C6: _mi_read_rnd_dynamic_record (mi_dynrec.c:1755)
      ==16800==    by 0x1372F45: mi_rrnd (mi_rrnd.c:59)
      ==16800==    by 0x13361B9: ha_myisam::rnd_pos(unsigned char*, unsigned char*) (ha_myisam.cc:2010)
      ==16800==    by 0xBE9F51: handler::ha_rnd_pos(unsigned char*, unsigned char*) (handler.cc:3014)
      ==16800==    by 0x84AB5E: write_record(THD*, TABLE*, st_copy_info*) (sql_insert.cc:1754)
      ==16800==    by 0x848DD0: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:1067)
      ==16800==    by 0x894749: mysql_execute_command(THD*) (sql_parse.cc:4791)
      ==16800==    by 0x8A05C7: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8157)
      ==16800==    by 0x88BB69: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==16800==    by 0x88A33D: do_command(THD*) (sql_parse.cc:1358)
      ==16800==    by 0xA09F42: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==16800==    by 0xA09CB3: handle_one_connection (sql_connect.cc:1302)
      ==16800==    by 0xF24948: pfs_spawn_thread (pfs.cc:1862)
      ==16800==    by 0x4E3F493: start_thread (pthread_create.c:333)
      ==16800==    by 0x6A9A93E: clone (clone.S:97)
      

      10.4 main (9bd47835) also fails.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: