[MDEV-18763] mi_rrnd: Conditional jump or move depends on uninitialised value upon inserting into blob with long key Created: 2019-02-27  Updated: 2019-02-28  Resolved: 2019-02-28

Status: Closed
Project: MariaDB Server
Component/s: Data types, Storage Engine - MyISAM
Affects Version/s: 10.4
Fix Version/s: 10.4.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

bb-10.4-serg 561f0c88


Issue Links:
Duplicate
is duplicated by MDEV-18748 REPLACE doesn't work with unique blob... Closed
Problem/Incident
is caused by MDEV-371 Unique indexes for blobs Closed

 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.


Generated at Thu Feb 08 08:46:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.