[MDEV-18713] Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed in test_if_reopen upon REPLACE into table with key on blob Created: 2019-02-24  Updated: 2019-02-28  Resolved: 2019-02-28

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Data Manipulation - Insert, Data types
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

Issue Links:
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 ( 
  pk INT,
  b BLOB,
  c CHAR(255),
  PRIMARY KEY(pk),
  KEY(b)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,'foo','');
REPLACE INTO t1 (pk,c) VALUES (1,'bar');
ALTER TABLE t1 ADD KEY (c);
REPLACE INTO t1 (pk,c) VALUES (1,'qux');
 
# Cleanup
DROP TABLE t1;

10.4 fb01193c

mysqld: /data/src/10.4/storage/myisam/mi_open.c:67: test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed.
190224 15:27:22 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f12f8efdee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00005586bccab5ad in test_if_reopen (filename=0x7f12ef0554b0 "/dev/shm/var_auto_9G3Z/mysqld.1/data/test/t1.MYI") at /data/src/10.4/storage/myisam/mi_open.c:66
#9  0x00005586bccab7c6 in mi_open (name=0x7f12d81396f8 "./test/t1", mode=2, open_flags=82) at /data/src/10.4/storage/myisam/mi_open.c:122
#10 0x00005586bcc7e149 in ha_myisam::open (this=0x7f12d8009428, name=0x7f12d81396f8 "./test/t1", mode=2, test_if_locked=18) at /data/src/10.4/storage/myisam/ha_myisam.cc:806
#11 0x00005586bc57b205 in handler::ha_open (this=0x7f12d8009428, table_arg=0x7f12d8149e00, name=0x7f12d81396f8 "./test/t1", mode=2, test_if_locked=18, mem_root=0x0, partitions_to_open=0x0) at /data/src/10.4/sql/handler.cc:2901
#12 0x00005586bc3554fe in open_table_from_share (thd=0x7f12d8000b00, share=0x7f12d8139168, alias=0x7f12d80155e8, db_stat=33, prgflag=8, ha_open_flags=18, outparam=0x7f12d8149e00, is_create_table=false, partitions_to_open=0x0) at /data/src/10.4/sql/table.cc:3895
#13 0x00005586bc194ad5 in open_table (thd=0x7f12d8000b00, table_list=0x7f12d80155a0, ot_ctx=0x7f12ef0571c0) at /data/src/10.4/sql/sql_base.cc:2035
#14 0x00005586bc197dbc in open_and_process_table (thd=0x7f12d8000b00, lex=0x7f12d8004950, tables=0x7f12d80155a0, counter=0x7f12ef057254, flags=0, prelocking_strategy=0x7f12ef0572d0, has_prelocking_list=false, ot_ctx=0x7f12ef0571c0) at /data/src/10.4/sql/sql_base.cc:3728
#15 0x00005586bc199219 in open_tables (thd=0x7f12d8000b00, options=..., start=0x7f12ef057238, counter=0x7f12ef057254, flags=0, prelocking_strategy=0x7f12ef0572d0) at /data/src/10.4/sql/sql_base.cc:4261
#16 0x00005586bc19b069 in open_and_lock_tables (thd=0x7f12d8000b00, options=..., tables=0x7f12d80155a0, derived=true, flags=0, prelocking_strategy=0x7f12ef0572d0) at /data/src/10.4/sql/sql_base.cc:5143
#17 0x00005586bc157b24 in open_and_lock_tables (thd=0x7f12d8000b00, tables=0x7f12d80155a0, derived=true, flags=0) at /data/src/10.4/sql/sql_base.h:509
#18 0x00005586bc1ea221 in mysql_insert (thd=0x7f12d8000b00, table_list=0x7f12d80155a0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_REPLACE, ignore=false) at /data/src/10.4/sql/sql_insert.cc:764
#19 0x00005586bc235ef4 in mysql_execute_command (thd=0x7f12d8000b00) at /data/src/10.4/sql/sql_parse.cc:4791
#20 0x00005586bc241c72 in mysql_parse (thd=0x7f12d8000b00, rawbuf=0x7f12d80154a8 "REPLACE INTO t1 (pk,c) VALUES (1,'qux')", length=39, parser_state=0x7f12ef058180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8157
#21 0x00005586bc22d360 in dispatch_command (command=COM_QUERY, thd=0x7f12d8000b00, packet=0x7f12d800a761 "REPLACE INTO t1 (pk,c) VALUES (1,'qux')", packet_length=39, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
#22 0x00005586bc22bb34 in do_command (thd=0x7f12d8000b00) at /data/src/10.4/sql/sql_parse.cc:1358
#23 0x00005586bc3a5837 in do_handle_one_connection (connect=0x5586bf45bc70) at /data/src/10.4/sql/sql_connect.cc:1399
#24 0x00005586bc3a55a8 in handle_one_connection (arg=0x5586bf45bc70) at /data/src/10.4/sql/sql_connect.cc:1302
#25 0x00005586bc89c979 in pfs_spawn_thread (arg=0x5586bf54e2e0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
#26 0x00007f12fabd4494 in start_thread (arg=0x7f12ef059700) at pthread_create.c:333
#27 0x00007f12f8fba93f in clone () from /lib/x86_64-linux-gnu/libc.so.6


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