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

ha_key_cmp: Conditional jump or move depends on uninitialised value

    XMLWordPrintable

    Details

      Description

      Before MDEV-371 creation of the table was not possible.

      Run with --valgrind-mysqld

      --let $datadir= `SELECT @@datadir`
      --write_file $datadir/test/load.data
      1
      2
      EOF
       
      CREATE TABLE t1 (a VARCHAR(16356), UNIQUE(a));
      --error ER_ALTER_OPERATION_NOT_SUPPORTED
      ALTER TABLE t1 ADD COLUMN b VARCHAR(8), LOCK=NONE;
       
      LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1 (a);
       
      # Cleanup
      DROP TABLE t1;
      --remove_file $datadir/test/load.data
      

      10.4 5a796f1f Valgrind

      ==6938== Thread 6:
      ==6938== Conditional jump or move depends on uninitialised value(s)
      ==6938==    at 0x14036E5: ha_key_cmp (my_compare.c:439)
      ==6938==    by 0x13481DB: sort_key_cmp (mi_check.c:3800)
      ==6938==    by 0x13F21D4: my_qsort2 (mf_qsort.c:131)
      ==6938==    by 0x13954C8: write_index (sort.c:790)
      ==6938==    by 0x13937E1: _create_index_by_sort (sort.c:234)
      ==6938==    by 0x134370C: mi_repair_by_sort (mi_check.c:2406)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938== Conditional jump or move depends on uninitialised value(s)
      ==6938==    at 0x1403709: ha_key_cmp (my_compare.c:439)
      ==6938==    by 0x13481DB: sort_key_cmp (mi_check.c:3800)
      ==6938==    by 0x13F21D4: my_qsort2 (mf_qsort.c:131)
      ==6938==    by 0x13954C8: write_index (sort.c:790)
      ==6938==    by 0x13937E1: _create_index_by_sort (sort.c:234)
      ==6938==    by 0x134370C: mi_repair_by_sort (mi_check.c:2406)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938== Conditional jump or move depends on uninitialised value(s)
      ==6938==    at 0x14036E5: ha_key_cmp (my_compare.c:439)
      ==6938==    by 0x134827E: sort_key_write (mi_check.c:3815)
      ==6938==    by 0x13954EB: write_index (sort.c:794)
      ==6938==    by 0x13937E1: _create_index_by_sort (sort.c:234)
      ==6938==    by 0x134370C: mi_repair_by_sort (mi_check.c:2406)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938==    by 0xA0CA09: handle_one_connection (sql_connect.cc:1302)
      ==6938== Conditional jump or move depends on uninitialised value(s)
      ==6938==    at 0x1403709: ha_key_cmp (my_compare.c:439)
      ==6938==    by 0x134827E: sort_key_write (mi_check.c:3815)
      ==6938==    by 0x13954EB: write_index (sort.c:794)
      ==6938==    by 0x13937E1: _create_index_by_sort (sort.c:234)
      ==6938==    by 0x134370C: mi_repair_by_sort (mi_check.c:2406)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938==    by 0xA0CA09: handle_one_connection (sql_connect.cc:1302)
      ==6938== Conditional jump or move depends on uninitialised value(s)
      ==6938==    at 0x14036E5: ha_key_cmp (my_compare.c:439)
      ==6938==    by 0x13482CD: sort_key_write (mi_check.c:3820)
      ==6938==    by 0x13954EB: write_index (sort.c:794)
      ==6938==    by 0x13937E1: _create_index_by_sort (sort.c:234)
      ==6938==    by 0x134370C: mi_repair_by_sort (mi_check.c:2406)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938==    by 0xA0CA09: handle_one_connection (sql_connect.cc:1302)
      ==6938== Conditional jump or move depends on uninitialised value(s)
      ==6938==    at 0x1403709: ha_key_cmp (my_compare.c:439)
      ==6938==    by 0x13482CD: sort_key_write (mi_check.c:3820)
      ==6938==    by 0x13954EB: write_index (sort.c:794)
      ==6938==    by 0x13937E1: _create_index_by_sort (sort.c:234)
      ==6938==    by 0x134370C: mi_repair_by_sort (mi_check.c:2406)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938==    by 0xA0CA09: handle_one_connection (sql_connect.cc:1302)
      ==6938== Syscall param pwrite64(buf) points to uninitialised byte(s)
      ==6938==    at 0x4E48963: ??? (syscall-template.S:84)
      ==6938==    by 0x1407E46: my_pwrite (my_pread.c:157)
      ==6938==    by 0x133AF15: inline_mysql_file_pwrite (mysql_file.h:1239)
      ==6938==    by 0x134974F: flush_pending_blocks (mi_check.c:4192)
      ==6938==    by 0x1393952: _create_index_by_sort (sort.c:259)
      ==6938==    by 0x134370C: mi_repair_by_sort (mi_check.c:2406)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938==  Address 0xdd1250b is 17,035 bytes inside a block of size 98,952 alloc'd
      ==6938==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
      ==6938==    by 0x14059F3: my_malloc (my_malloc.c:101)
      ==6938==    by 0x1349840: alloc_key_blocks (mi_check.c:4211)
      ==6938==    by 0x1342CEB: mi_repair_by_sort (mi_check.c:2228)
      ==6938==    by 0x1335709: ha_myisam::repair(THD*, st_handler_check_param&, bool) (ha_myisam.cc:1306)
      ==6938==    by 0x13367F0: ha_myisam::enable_indexes(unsigned int) (ha_myisam.cc:1644)
      ==6938==    by 0x1336CED: ha_myisam::end_bulk_insert() (ha_myisam.cc:1805)
      ==6938==    by 0x855E66: handler::ha_end_bulk_insert() (handler.h:3281)
      ==6938==    by 0x881C1B: mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) (sql_load.cc:673)
      ==6938==    by 0x899033: mysql_execute_command(THD*) (sql_parse.cc:5232)
      ==6938==    by 0x8A330C: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8204)
      ==6938==    by 0x88E802: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1829)
      ==6938==    by 0x88CFE8: do_command(THD*) (sql_parse.cc:1358)
      ==6938==    by 0xA0CC98: do_handle_one_connection(CONNECT*) (sql_connect.cc:1399)
      ==6938==    by 0xA0CA09: handle_one_connection (sql_connect.cc:1302)
      ==6938==    by 0xF26124: pfs_spawn_thread (pfs.cc:1862)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sachin.setiya.007 Sachin Setiya (Inactive)
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration