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

Server crashes in mem_heap_dup / innobase_get_computed_value or InnoDB: Record in index was not found on update

Details

    Description

      Only reproducible on 10.3, not on 10.2 (neither current nor somewhat older builds) and not on 10.4.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
          pk INT,
          f1 INT,
          f2 TINYTEXT,
          f3 DATETIME,
          f4 TIMESTAMP,
          f5 DATETIME,
          vcol TEXT AS (f2) VIRTUAL,
          f7 VARCHAR(1),
          f8 YEAR,
          f9 DATE,
          f10 INT,
          PRIMARY KEY(pk),
          INDEX(vcol(64))
      ) ENGINE=InnoDB;
       
      CREATE TABLE t2 ( 
          pk INT,
          f1 INT,
          f2 VARCHAR(8),
          f3 DATETIME,
          f4 TIMESTAMP,
          f5 DATETIME,
          f6 VARCHAR(8),
          f7 VARCHAR(1),
          f8 YEAR,
          f9 DATE,
          f10 INT,
          f11 INT,
          PRIMARY KEY(pk)
      ) ENGINE=InnoDB;
       
      INSERT INTO t2 VALUES
          (1,1,'foobar','2012-12-12 12:12:12','2006-03-01 12:44:34','2029-10-10 21:27:53','','r',1975,'1989-12-24',9,NULL);
       
      ALTER TABLE t1 ADD COLUMN f11 INT;
      INSERT IGNORE INTO t1 SELECT * FROM t2;
      DELETE FROM t1;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      10.3 b0ff5a6a non-debug

      2019-09-04  1:08:35 9 [ERROR] InnoDB: Record in index `vcol` of table `test`.`t1` was not found on update: TUPLE (info_bits=0, 2 fields): {[0](0x),[4]    (0x80000001)} at: COMPACT RECORD(info_bits=0, 1 fields): {[8]infimum (0x696E66696D756D00)}
      

      10.3 b0ff5a6a debug

      #3  <signal handler called>
      #4  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:218
      #5  0x00005622c907d9cc in mem_heap_dup (heap=0x7f55f816f100, data=0xf8130f0000068f8f, len=64) at /data/src/10.3/storage/innobase/include/mem0mem.h:240
      #6  0x00005622c904de9b in dfield_dup (field=0x7f55f80458e0, heap=0x7f55f816f100) at /data/src/10.3/storage/innobase/include/data0data.ic:182
      #7  0x00005622c907a2ea in innobase_get_computed_value (row=0x7f55f8045748, col=0x7f55f80a5678, index=0x7f55f80a5b68, local_heap=0x7f5644f87318, heap=0x7f55f816f100, ifield=0x0, thd=0x7f55f8000b00, mysql_table=0x7f55f81715f0, mysql_rec=0x7f55f804c7a8 "\215\217\217\217\217\217\217\217\217\217\006\246\361\026\370U\177", old_table=0x0, parent_update=0x0, foreign=0x0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21017
      #8  0x00005622c927151b in row_upd_store_v_row (node=0x7f55f8038a78, update=0x0, thd=0x7f55f8000b00, mysql_table=0x7f55f81715f0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2198
      #9  0x00005622c92717cd in row_upd_store_row (node=0x7f55f8038a78, thd=0x7f55f8000b00, mysql_table=0x7f55f81715f0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2262
      #10 0x00005622c9274619 in row_upd_del_mark_clust_rec (node=0x7f55f8038a78, index=0x7f55f80a5b68, offsets=0x7f5644f87990, thr=0x7f55f803a178, referenced=0, foreign=false, mtr=0x7f5644f87cb0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2983
      #11 0x00005622c927516a in row_upd_clust_step (node=0x7f55f8038a78, thr=0x7f55f803a178) at /data/src/10.3/storage/innobase/row/row0upd.cc:3168
      #12 0x00005622c92756c4 in row_upd (node=0x7f55f8038a78, thr=0x7f55f803a178) at /data/src/10.3/storage/innobase/row/row0upd.cc:3295
      #13 0x00005622c9275cb3 in row_upd_step (thr=0x7f55f803a178) at /data/src/10.3/storage/innobase/row/row0upd.cc:3439
      #14 0x00005622c920332e in row_update_for_mysql (prebuilt=0x7f55f8037c98) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
      #15 0x00005622c9063a29 in ha_innobase::delete_row (this=0x7f55f8172238, record=0x7f55f8036460 "") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8983
      #16 0x00005622c8e3d24a in handler::ha_delete_row (this=0x7f55f8172238, buf=0x7f55f8036460 "") at /data/src/10.3/sql/handler.cc:6534
      #17 0x00005622c8fe8b0f in TABLE::delete_row (this=0x7f55f81715f0) at /data/src/10.3/sql/sql_delete.cc:253
      #18 0x00005622c8fe5d13 in mysql_delete (thd=0x7f55f8000b00, table_list=0x7f55f80128e0, conds=0x0, order_list=0x7f55f80053c8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:750
      #19 0x00005622c8b0fca8 in mysql_execute_command (thd=0x7f55f8000b00) at /data/src/10.3/sql/sql_parse.cc:4654
      #20 0x00005622c8b1a939 in mysql_parse (thd=0x7f55f8000b00, rawbuf=0x7f55f8012818 "DELETE FROM t1", length=14, parser_state=0x7f5644f895e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7830
      #21 0x00005622c8b07237 in dispatch_command (command=COM_QUERY, thd=0x7f55f8000b00, packet=0x7f55f815fe31 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #22 0x00005622c8b05b5e in do_command (thd=0x7f55f8000b00) at /data/src/10.3/sql/sql_parse.cc:1401
      #23 0x00005622c8c7e9f4 in do_handle_one_connection (connect=0x5622ccf91190) at /data/src/10.3/sql/sql_connect.cc:1403
      #24 0x00005622c8c7e756 in handle_one_connection (arg=0x5622ccf91190) at /data/src/10.3/sql/sql_connect.cc:1308
      #25 0x00005622c965fe72 in pfs_spawn_thread (arg=0x5622cced4730) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #26 0x00007f564d7604a4 in start_thread (arg=0x7f5644f8a700) at pthread_create.c:456
      #27 0x00007f564bca8d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.3 b0ff5a6a asan

      ==2728==ERROR: AddressSanitizer: unknown-crash on address 0x40a300006bebe at pc 0x7f91d2598f7f bp 0x7f91babe3660 sp 0x7f91babe2e10
      READ of size 64 at 0x40a300006bebe thread T27
          #0 0x7f91d2598f7e  (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cf7e)
          #1 0x559cf98c0460 in mem_heap_dup(mem_block_info_t*, void const*, unsigned long) /data/src/10.3/storage/innobase/include/mem0mem.h:240
          #2 0x559cf9854cc4 in dfield_dup /data/src/10.3/storage/innobase/include/data0data.ic:182
          #3 0x559cf98b8c4f in innobase_get_computed_value(dtuple_t*, dict_v_col_t const*, dict_index_t const*, mem_block_info_t**, mem_block_info_t*, dict_field_t const*, THD*, TABLE*, unsigned char*, dict_table_t const*, upd_t*, dict_foreign_t*) /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21017
          #4 0x559cf9cb740c in row_upd_store_v_row /data/src/10.3/storage/innobase/row/row0upd.cc:2198
          #5 0x559cf9cb7ae2 in row_upd_store_row(upd_node_t*, THD*, TABLE*) /data/src/10.3/storage/innobase/row/row0upd.cc:2262
          #6 0x559cf9cbcf36 in row_upd_del_mark_clust_rec /data/src/10.3/storage/innobase/row/row0upd.cc:2983
          #7 0x559cf9cbe194 in row_upd_clust_step /data/src/10.3/storage/innobase/row/row0upd.cc:3168
          #8 0x559cf9cbedb1 in row_upd /data/src/10.3/storage/innobase/row/row0upd.cc:3295
          #9 0x559cf9cbfd3b in row_upd_step(que_thr_t*) /data/src/10.3/storage/innobase/row/row0upd.cc:3439
          #10 0x559cf9bd6ba8 in row_update_for_mysql(row_prebuilt_t*) /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
          #11 0x559cf9884462 in ha_innobase::delete_row(unsigned char const*) /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8983
          #12 0x559cf933efcf in handler::ha_delete_row(unsigned char const*) /data/src/10.3/sql/handler.cc:6534
          #13 0x559cf9759743 in TABLE::delete_row() /data/src/10.3/sql/sql_delete.cc:253
          #14 0x559cf975225a in mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*) /data/src/10.3/sql/sql_delete.cc:750
          #15 0x559cf8c195c4 in mysql_execute_command(THD*) /data/src/10.3/sql/sql_parse.cc:4654
          #16 0x559cf8c2ed1d in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.3/sql/sql_parse.cc:7830
          #17 0x559cf8c07ed6 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.3/sql/sql_parse.cc:1856
          #18 0x559cf8c04c18 in do_command(THD*) /data/src/10.3/sql/sql_parse.cc:1401
          #19 0x559cf8f8f33c in do_handle_one_connection(CONNECT*) /data/src/10.3/sql/sql_connect.cc:1403
          #20 0x559cf8f8ed03 in handle_one_connection /data/src/10.3/sql/sql_connect.cc:1308
          #21 0x559cfa57666d in pfs_spawn_thread /data/src/10.3/storage/perfschema/pfs.cc:1862
          #22 0x7f91d23264a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)
          #23 0x7f91d086ed0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e)
       
      ==2728==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/asan/asan_report.cc:346 "((0 && "Address is not in memory and not in shadow?")) != (0)" (0x0, 0x0)
          #0 0x7f91d2606ebd  (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xcaebd)
          #1 0x7f91d260cb13 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xd0b13)
          #2 0x7f91d26021b7  (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc61b7)
          #3 0x7f91d2603118  (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc7118)
          #4 0x7f91d2606376  (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xca376)
          #5 0x7f91d2598f9d  (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cf9d)
          #6 0x559cf98c0460 in mem_heap_dup(mem_block_info_t*, void const*, unsigned long) /data/src/10.3/storage/innobase/include/mem0mem.h:240
          #7 0x559cf9854cc4 in dfield_dup /data/src/10.3/storage/innobase/include/data0data.ic:182
          #8 0x559cf98b8c4f in innobase_get_computed_value(dtuple_t*, dict_v_col_t const*, dict_index_t const*, mem_block_info_t**, mem_block_info_t*, dict_field_t const*, THD*, TABLE*, unsigned char*, dict_table_t const*, upd_t*, dict_foreign_t*) /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21017
          #9 0x559cf9cb740c in row_upd_store_v_row /data/src/10.3/storage/innobase/row/row0upd.cc:2198
          #10 0x559cf9cb7ae2 in row_upd_store_row(upd_node_t*, THD*, TABLE*) /data/src/10.3/storage/innobase/row/row0upd.cc:2262
          #11 0x559cf9cbcf36 in row_upd_del_mark_clust_rec /data/src/10.3/storage/innobase/row/row0upd.cc:2983
          #12 0x559cf9cbe194 in row_upd_clust_step /data/src/10.3/storage/innobase/row/row0upd.cc:3168
          #13 0x559cf9cbedb1 in row_upd /data/src/10.3/storage/innobase/row/row0upd.cc:3295
          #14 0x559cf9cbfd3b in row_upd_step(que_thr_t*) /data/src/10.3/storage/innobase/row/row0upd.cc:3439
          #15 0x559cf9bd6ba8 in row_update_for_mysql(row_prebuilt_t*) /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
          #16 0x559cf9884462 in ha_innobase::delete_row(unsigned char const*) /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8983
          #17 0x559cf933efcf in handler::ha_delete_row(unsigned char const*) /data/src/10.3/sql/handler.cc:6534
          #18 0x559cf9759743 in TABLE::delete_row() /data/src/10.3/sql/sql_delete.cc:253
          #19 0x559cf975225a in mysql_delete(THD*, TABLE_LIST*, Item*, SQL_I_List<st_order>*, unsigned long long, unsigned long long, select_result*) /data/src/10.3/sql/sql_delete.cc:750
          #20 0x559cf8c195c4 in mysql_execute_command(THD*) /data/src/10.3/sql/sql_parse.cc:4654
          #21 0x559cf8c2ed1d in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.3/sql/sql_parse.cc:7830
          #22 0x559cf8c07ed6 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.3/sql/sql_parse.cc:1856
          #23 0x559cf8c04c18 in do_command(THD*) /data/src/10.3/sql/sql_parse.cc:1401
          #24 0x559cf8f8f33c in do_handle_one_connection(CONNECT*) /data/src/10.3/sql/sql_connect.cc:1403
          #25 0x559cf8f8ed03 in handle_one_connection /data/src/10.3/sql/sql_connect.cc:1308
          #26 0x559cfa57666d in pfs_spawn_thread /data/src/10.3/storage/perfschema/pfs.cc:1862
          #27 0x7f91d23264a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)
          #28 0x7f91d086ed0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e)
      

      Slight modifications in the test case change the outcome. Here is the stack trace for the same test case, but without f10 column in both tables:

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
          pk INT,
          f1 INT,
          f2 TINYTEXT,
          f3 DATETIME,
          f4 TIMESTAMP,
          f5 DATETIME,
          vcol TEXT AS (f2) VIRTUAL,
          f7 VARCHAR(1),
          f8 YEAR,
          f9 DATE,
          PRIMARY KEY(pk),
          INDEX(vcol(64))
      ) ENGINE=InnoDB;
       
      CREATE TABLE t2 ( 
          pk INT,
          f1 INT,
          f2 VARCHAR(8),
          f3 DATETIME,
          f4 TIMESTAMP,
          f5 DATETIME,
          f6 VARCHAR(8),
          f7 VARCHAR(1),
          f8 YEAR,
          f9 DATE,
          f11 INT,
          PRIMARY KEY(pk)
      ) ENGINE=InnoDB;
       
      INSERT INTO t2 VALUES
          (1,1,'foobar','2012-12-12 12:12:12','2006-03-01 12:44:34','2029-10-10 21:27:53','','r',1975,'1989-12-24',NULL);
       
      ALTER TABLE t1 ADD COLUMN f11 INT;
      INSERT IGNORE INTO t1 SELECT * FROM t2;
      DELETE FROM t1;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      #3  <signal handler called>
      #4  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:325
      #5  0x0000564c3b59cfab in String::realloc_raw (this=0x7f49cc173598, alloc_length=181) at /data/src/10.3/sql/sql_string.cc:109
      #6  0x0000564c3b3afbd3 in String::realloc (this=0x7f49cc173598, arg_length=181) at /data/src/10.3/sql/sql_string.h:358
      #7  0x0000564c3b59d4b6 in String::copy (this=0x7f49cc173598) at /data/src/10.3/sql/sql_string.cc:212
      #8  0x0000564c3b7e346c in Field_blob::store_field (this=0x7f49cc1734a8, from=0x7f49cc173048) at /data/src/10.3/sql/field.h:3689
      #9  0x0000564c3b7e8379 in field_conv_incompatible (to=0x7f49cc1734a8, from=0x7f49cc173048) at /data/src/10.3/sql/field_conv.cc:836
      #10 0x0000564c3b7e83d5 in field_conv (to=0x7f49cc1734a8, from=0x7f49cc173048) at /data/src/10.3/sql/field_conv.cc:847
      #11 0x0000564c3b8219e6 in save_field_in_field (from=0x7f49cc173048, null_value=0x7f49cc173cc6, to=0x7f49cc1734a8, no_conversions=false) at /data/src/10.3/sql/item.cc:6730
      #12 0x0000564c3b821c28 in Item_field::save_in_field (this=0x7f49cc173c50, to=0x7f49cc1734a8, no_conversions=false) at /data/src/10.3/sql/item.cc:6781
      #13 0x0000564c3b60143f in TABLE::update_virtual_field (this=0x7f49cc171c50, vf=0x7f49cc1734a8) at /data/src/10.3/sql/table.cc:7885
      #14 0x0000564c3ba41060 in innobase_get_computed_value (row=0x7f49cc0453c8, col=0x7f49cc0a5378, index=0x7f49cc0a7978, local_heap=0x7f4a243e2318, heap=0x7f49cc16ff10, ifield=0x0, thd=0x7f49cc000b00, mysql_table=0x7f49cc171c50, mysql_rec=0x7f49cc04a2d8 "", old_table=0x0, parent_update=0x0, foreign=0x0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20968
      #15 0x0000564c3bc3851b in row_upd_store_v_row (node=0x7f49cc0389b8, update=0x0, thd=0x7f49cc000b00, mysql_table=0x7f49cc171c50) at /data/src/10.3/storage/innobase/row/row0upd.cc:2198
      #16 0x0000564c3bc387cd in row_upd_store_row (node=0x7f49cc0389b8, thd=0x7f49cc000b00, mysql_table=0x7f49cc171c50) at /data/src/10.3/storage/innobase/row/row0upd.cc:2262
      #17 0x0000564c3bc3b619 in row_upd_del_mark_clust_rec (node=0x7f49cc0389b8, index=0x7f49cc0a7978, offsets=0x7f4a243e2990, thr=0x7f49cc048308, referenced=0, foreign=false, mtr=0x7f4a243e2cb0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2983
      #18 0x0000564c3bc3c16a in row_upd_clust_step (node=0x7f49cc0389b8, thr=0x7f49cc048308) at /data/src/10.3/storage/innobase/row/row0upd.cc:3168
      #19 0x0000564c3bc3c6c4 in row_upd (node=0x7f49cc0389b8, thr=0x7f49cc048308) at /data/src/10.3/storage/innobase/row/row0upd.cc:3295
      #20 0x0000564c3bc3ccb3 in row_upd_step (thr=0x7f49cc048308) at /data/src/10.3/storage/innobase/row/row0upd.cc:3439
      #21 0x0000564c3bbca32e in row_update_for_mysql (prebuilt=0x7f49cc037c28) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
      #22 0x0000564c3ba2aa29 in ha_innobase::delete_row (this=0x7f49cc172898, record=0x7f49cc036410 "") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8983
      #23 0x0000564c3b80424a in handler::ha_delete_row (this=0x7f49cc172898, buf=0x7f49cc036410 "") at /data/src/10.3/sql/handler.cc:6534
      #24 0x0000564c3b9afb0f in TABLE::delete_row (this=0x7f49cc171c50) at /data/src/10.3/sql/sql_delete.cc:253
      #25 0x0000564c3b9acd13 in mysql_delete (thd=0x7f49cc000b00, table_list=0x7f49cc0128e0, conds=0x0, order_list=0x7f49cc0053c8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:750
      #26 0x0000564c3b4d6ca8 in mysql_execute_command (thd=0x7f49cc000b00) at /data/src/10.3/sql/sql_parse.cc:4654
      #27 0x0000564c3b4e1939 in mysql_parse (thd=0x7f49cc000b00, rawbuf=0x7f49cc012818 "DELETE FROM t1", length=14, parser_state=0x7f4a243e45e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7830
      #28 0x0000564c3b4ce237 in dispatch_command (command=COM_QUERY, thd=0x7f49cc000b00, packet=0x7f49cc15fe31 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #29 0x0000564c3b4ccb5e in do_command (thd=0x7f49cc000b00) at /data/src/10.3/sql/sql_parse.cc:1401
      #30 0x0000564c3b6459f4 in do_handle_one_connection (connect=0x564c3eb36190) at /data/src/10.3/sql/sql_connect.cc:1403
      #31 0x0000564c3b645756 in handle_one_connection (arg=0x564c3eb36190) at /data/src/10.3/sql/sql_connect.cc:1308
      #32 0x0000564c3c026e72 in pfs_spawn_thread (arg=0x564c3ea79730) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #33 0x00007f4a2c35b4a4 in start_thread (arg=0x7f4a243e5700) at pthread_create.c:456
      #34 0x00007f4a2a8a3d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      And if we also remove f9, we are getting an assertion failure instead:

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
          pk INT,
          f1 INT,
          f2 TINYTEXT,
          f3 DATETIME,
          f4 TIMESTAMP,
          f5 DATETIME,
          vcol TEXT AS (f2) VIRTUAL,
          f7 VARCHAR(1),
          f8 YEAR,
          PRIMARY KEY(pk),
          INDEX(vcol(64))
      ) ENGINE=InnoDB;
       
      CREATE TABLE t2 ( 
          pk INT,
          f1 INT,
          f2 VARCHAR(8),
          f3 DATETIME,
          f4 TIMESTAMP,
          f5 DATETIME,
          f6 VARCHAR(8),
          f7 VARCHAR(1),
          f8 YEAR,
          f11 INT,
          PRIMARY KEY(pk)
      ) ENGINE=InnoDB;
       
      INSERT INTO t2 VALUES
          (1,1,'foobar','2012-12-12 12:12:12','2006-03-01 12:44:34','2029-10-10 21:27:53','','r',1975,NULL);
       
      ALTER TABLE t1 ADD COLUMN f11 INT;
      INSERT IGNORE INTO t1 SELECT * FROM t2;
      DELETE FROM t1;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      2019-09-04  1:11:06 9 [ERROR] InnoDB: Record in index `vcol` of table `test`.`t1` was not found on update: TUPLE (info_bits=0, 2 fields): {[0](0x),[4]    (0x80000001)} at: COMPACT RECORD(info_bits=0, 1 fields): {[8]infimum (0x696E66696D756D00)}
      mysqld: /data/src/10.3/storage/innobase/row/row0upd.cc:2445: dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*): Assertion `btr_validate_index(index, 0, false)' failed.
      190904  1:11:06 [ERROR] mysqld got signal 6 ;
       
       
      #6  0x00007fcadb8cde67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55ed19329e30 "btr_validate_index(index, 0, false)", file=file@entry=0x55ed193297d8 "/data/src/10.3/storage/innobase/row/row0upd.cc", line=line@entry=2445, function=function@entry=0x55ed1932c720 <row_upd_sec_index_entry(upd_node_t*, que_thr_t*)::__PRETTY_FUNCTION__> "dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*)") at assert.c:92
      #7  0x00007fcadb8cdf12 in __GI___assert_fail (assertion=0x55ed19329e30 "btr_validate_index(index, 0, false)", file=0x55ed193297d8 "/data/src/10.3/storage/innobase/row/row0upd.cc", line=2445, function=0x55ed1932c720 <row_upd_sec_index_entry(upd_node_t*, que_thr_t*)::__PRETTY_FUNCTION__> "dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*)") at assert.c:101
      #8  0x000055ed18ba811b in row_upd_sec_index_entry (node=0x7fca84038960, thr=0x7fca84048238) at /data/src/10.3/storage/innobase/row/row0upd.cc:2445
      #9  0x000055ed18ba89a6 in row_upd_sec_step (node=0x7fca84038960, thr=0x7fca84048238) at /data/src/10.3/storage/innobase/row/row0upd.cc:2559
      #10 0x000055ed18bab845 in row_upd (node=0x7fca84038960, thr=0x7fca84048238) at /data/src/10.3/storage/innobase/row/row0upd.cc:3324
      #11 0x000055ed18babcb3 in row_upd_step (thr=0x7fca84048238) at /data/src/10.3/storage/innobase/row/row0upd.cc:3439
      #12 0x000055ed18b3932e in row_update_for_mysql (prebuilt=0x7fca84037c18) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
      #13 0x000055ed18999a29 in ha_innobase::delete_row (this=0x7fca84172878, record=0x7fca84036410 "\200\001") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8983
      #14 0x000055ed1877324a in handler::ha_delete_row (this=0x7fca84172878, buf=0x7fca84036410 "\200\001") at /data/src/10.3/sql/handler.cc:6534
      #15 0x000055ed1891eb0f in TABLE::delete_row (this=0x7fca84171c30) at /data/src/10.3/sql/sql_delete.cc:253
      #16 0x000055ed1891bd13 in mysql_delete (thd=0x7fca84000b00, table_list=0x7fca840128e0, conds=0x0, order_list=0x7fca840053c8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:750
      #17 0x000055ed18445ca8 in mysql_execute_command (thd=0x7fca84000b00) at /data/src/10.3/sql/sql_parse.cc:4654
      #18 0x000055ed18450939 in mysql_parse (thd=0x7fca84000b00, rawbuf=0x7fca84012818 "DELETE FROM t1", length=14, parser_state=0x7fcad4c6b5e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7830
      #19 0x000055ed1843d237 in dispatch_command (command=COM_QUERY, thd=0x7fca84000b00, packet=0x7fca8415fe31 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #20 0x000055ed1843bb5e in do_command (thd=0x7fca84000b00) at /data/src/10.3/sql/sql_parse.cc:1401
      #21 0x000055ed185b49f4 in do_handle_one_connection (connect=0x55ed1bc0a190) at /data/src/10.3/sql/sql_connect.cc:1403
      #22 0x000055ed185b4756 in handle_one_connection (arg=0x55ed1bc0a190) at /data/src/10.3/sql/sql_connect.cc:1308
      #23 0x000055ed18f95e72 in pfs_spawn_thread (arg=0x55ed1bb4d730) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #24 0x00007fcadd4424a4 in start_thread (arg=0x7fcad4c6c700) at pthread_create.c:456
      #25 0x00007fcadb98ad0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      We have several of these assertions filed, but I'm not sure either of them is quite the same case.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Assignee Marko Mäkelä [ marko ]

            Probably another variation of the same problem.

            10.3 a1454426

            mysqld: /data/src/10.3/storage/innobase/include/mem0mem.h:240: void* mem_heap_dup(mem_heap_t*, const void*, size_t): Assertion `data || !len' failed.
            191122 20:07:35 [ERROR] mysqld got signal 6 ;
             
            #7  0x00007f6459f37f12 in __GI___assert_fail (assertion=0x55c6ffb0fb08 "data || !len", file=0x55c6ffb0fb18 "/data/src/10.3/storage/innobase/include/mem0mem.h", line=240, function=0x55c6ffb21340 <mem_heap_dup(mem_block_info_t*, void const*, unsigned long)::__PRETTY_FUNCTION__> "void* mem_heap_dup(mem_heap_t*, const void*, size_t)") at assert.c:101
            #8  0x000055c6ff25aa26 in mem_heap_dup (heap=0x7f640406c290, data=0x0, len=64) at /data/src/10.3/storage/innobase/include/mem0mem.h:240
            #9  0x000055c6ff22b3d6 in dfield_dup (field=0x7f64040a7090, heap=0x7f640406c290) at /data/src/10.3/storage/innobase/include/data0data.ic:182
            #10 0x000055c6ff257431 in innobase_get_computed_value (row=0x7f64040a6fb8, col=0x7f640400c038, index=0x7f64040a33c8, local_heap=0x7f6454134328, heap=0x7f640406c290, ifield=0x0, thd=0x7f6404000af0, mysql_table=0x7f64040a45a0, mysql_rec=0x7f640403ded8 "\214", old_table=0x0, parent_update=0x0, foreign=0x0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21274
            #11 0x000055c6ff43e6f0 in row_upd_store_v_row (node=0x7f640406d120, update=0x0, thd=0x7f6404000af0, mysql_table=0x7f64040a45a0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2198
            #12 0x000055c6ff43e99b in row_upd_store_row (node=0x7f640406d120, thd=0x7f6404000af0, mysql_table=0x7f64040a45a0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2262
            #13 0x000055c6ff4417cc in row_upd_del_mark_clust_rec (node=0x7f640406d120, index=0x7f64040a33c8, offsets=0x7f64541349a0, thr=0x7f640403bf08, referenced=0, foreign=false, mtr=0x7f6454134cc0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2993
            #14 0x000055c6ff4422e3 in row_upd_clust_step (node=0x7f640406d120, thr=0x7f640403bf08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3178
            #15 0x000055c6ff4428bc in row_upd (node=0x7f640406d120, thr=0x7f640403bf08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3307
            #16 0x000055c6ff442e8a in row_upd_step (thr=0x7f640403bf08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3451
            #17 0x000055c6ff3d4468 in row_update_for_mysql (prebuilt=0x7f640406c598) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1888
            #18 0x000055c6ff240acf in ha_innobase::delete_row (this=0x7f64040a51e8, record=0x7f6404008290 "\374") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8982
            #19 0x000055c6ff01f6e4 in handler::ha_delete_row (this=0x7f64040a51e8, buf=0x7f6404008290 "\374") at /data/src/10.3/sql/handler.cc:6534
            #20 0x000055c6ff1c6623 in TABLE::delete_row (this=0x7f64040a45a0) at /data/src/10.3/sql/sql_delete.cc:253
            #21 0x000055c6ff1c3878 in mysql_delete (thd=0x7f6404000af0, table_list=0x7f64040128d0, conds=0x0, order_list=0x7f64040053b8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:750
            #22 0x000055c6fecf997c in mysql_execute_command (thd=0x7f6404000af0) at /data/src/10.3/sql/sql_parse.cc:4658
            #23 0x000055c6fed04497 in mysql_parse (thd=0x7f6404000af0, rawbuf=0x7f6404012808 "DELETE FROM t1", length=14, parser_state=0x7f64541365e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7815
            #24 0x000055c6fecf101b in dispatch_command (command=COM_QUERY, thd=0x7f6404000af0, packet=0x7f640415fe61 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
            #25 0x000055c6fecef963 in do_command (thd=0x7f6404000af0) at /data/src/10.3/sql/sql_parse.cc:1401
            #26 0x000055c6fee668fa in do_handle_one_connection (connect=0x55c70144a4b0) at /data/src/10.3/sql/sql_connect.cc:1403
            #27 0x000055c6fee6665c in handle_one_connection (arg=0x55c70144a4b0) at /data/src/10.3/sql/sql_connect.cc:1308
            #28 0x000055c6ff8130a8 in pfs_spawn_thread (arg=0x55c7013942e0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
            #29 0x00007f645baad4a4 in start_thread (arg=0x7f6454137700) at pthread_create.c:456
            #30 0x00007f6459ff4d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
            

            --source include/have_innodb.inc
             
            CREATE TABLE t1 ( 
                a TINYTEXT,
                b LONGTEXT AS (a) VIRTUAL,
                c INT,
                KEY (b(64))
            ) ENGINE=InnoDB ;
             
            ALTER TABLE t1 ADD f INT;
            INSERT INTO t1 (a,c) VALUES ('',NULL);
            DELETE FROM t1;
             
            # Cleanup
            DROP TABLE t1;
            

            Also reproducible only on 10.3. No obvious problem on a non-debug build.

            elenst Elena Stepanova added a comment - Probably another variation of the same problem. 10.3 a1454426 mysqld: /data/src/10.3/storage/innobase/include/mem0mem.h:240: void* mem_heap_dup(mem_heap_t*, const void*, size_t): Assertion `data || !len' failed. 191122 20:07:35 [ERROR] mysqld got signal 6 ;   #7 0x00007f6459f37f12 in __GI___assert_fail (assertion=0x55c6ffb0fb08 "data || !len", file=0x55c6ffb0fb18 "/data/src/10.3/storage/innobase/include/mem0mem.h", line=240, function=0x55c6ffb21340 <mem_heap_dup(mem_block_info_t*, void const*, unsigned long)::__PRETTY_FUNCTION__> "void* mem_heap_dup(mem_heap_t*, const void*, size_t)") at assert.c:101 #8 0x000055c6ff25aa26 in mem_heap_dup (heap=0x7f640406c290, data=0x0, len=64) at /data/src/10.3/storage/innobase/include/mem0mem.h:240 #9 0x000055c6ff22b3d6 in dfield_dup (field=0x7f64040a7090, heap=0x7f640406c290) at /data/src/10.3/storage/innobase/include/data0data.ic:182 #10 0x000055c6ff257431 in innobase_get_computed_value (row=0x7f64040a6fb8, col=0x7f640400c038, index=0x7f64040a33c8, local_heap=0x7f6454134328, heap=0x7f640406c290, ifield=0x0, thd=0x7f6404000af0, mysql_table=0x7f64040a45a0, mysql_rec=0x7f640403ded8 "\214", old_table=0x0, parent_update=0x0, foreign=0x0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21274 #11 0x000055c6ff43e6f0 in row_upd_store_v_row (node=0x7f640406d120, update=0x0, thd=0x7f6404000af0, mysql_table=0x7f64040a45a0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2198 #12 0x000055c6ff43e99b in row_upd_store_row (node=0x7f640406d120, thd=0x7f6404000af0, mysql_table=0x7f64040a45a0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2262 #13 0x000055c6ff4417cc in row_upd_del_mark_clust_rec (node=0x7f640406d120, index=0x7f64040a33c8, offsets=0x7f64541349a0, thr=0x7f640403bf08, referenced=0, foreign=false, mtr=0x7f6454134cc0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2993 #14 0x000055c6ff4422e3 in row_upd_clust_step (node=0x7f640406d120, thr=0x7f640403bf08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3178 #15 0x000055c6ff4428bc in row_upd (node=0x7f640406d120, thr=0x7f640403bf08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3307 #16 0x000055c6ff442e8a in row_upd_step (thr=0x7f640403bf08) at /data/src/10.3/storage/innobase/row/row0upd.cc:3451 #17 0x000055c6ff3d4468 in row_update_for_mysql (prebuilt=0x7f640406c598) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1888 #18 0x000055c6ff240acf in ha_innobase::delete_row (this=0x7f64040a51e8, record=0x7f6404008290 "\374") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8982 #19 0x000055c6ff01f6e4 in handler::ha_delete_row (this=0x7f64040a51e8, buf=0x7f6404008290 "\374") at /data/src/10.3/sql/handler.cc:6534 #20 0x000055c6ff1c6623 in TABLE::delete_row (this=0x7f64040a45a0) at /data/src/10.3/sql/sql_delete.cc:253 #21 0x000055c6ff1c3878 in mysql_delete (thd=0x7f6404000af0, table_list=0x7f64040128d0, conds=0x0, order_list=0x7f64040053b8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:750 #22 0x000055c6fecf997c in mysql_execute_command (thd=0x7f6404000af0) at /data/src/10.3/sql/sql_parse.cc:4658 #23 0x000055c6fed04497 in mysql_parse (thd=0x7f6404000af0, rawbuf=0x7f6404012808 "DELETE FROM t1", length=14, parser_state=0x7f64541365e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7815 #24 0x000055c6fecf101b in dispatch_command (command=COM_QUERY, thd=0x7f6404000af0, packet=0x7f640415fe61 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856 #25 0x000055c6fecef963 in do_command (thd=0x7f6404000af0) at /data/src/10.3/sql/sql_parse.cc:1401 #26 0x000055c6fee668fa in do_handle_one_connection (connect=0x55c70144a4b0) at /data/src/10.3/sql/sql_connect.cc:1403 #27 0x000055c6fee6665c in handle_one_connection (arg=0x55c70144a4b0) at /data/src/10.3/sql/sql_connect.cc:1308 #28 0x000055c6ff8130a8 in pfs_spawn_thread (arg=0x55c7013942e0) at /data/src/10.3/storage/perfschema/pfs.cc:1862 #29 0x00007f645baad4a4 in start_thread (arg=0x7f6454137700) at pthread_create.c:456 #30 0x00007f6459ff4d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97 --source include/have_innodb.inc   CREATE TABLE t1 ( a TINYTEXT, b LONGTEXT AS (a) VIRTUAL, c INT , KEY (b(64)) ) ENGINE=InnoDB ;   ALTER TABLE t1 ADD f INT ; INSERT INTO t1 (a,c) VALUES ( '' , NULL ); DELETE FROM t1;   # Cleanup DROP TABLE t1; Also reproducible only on 10.3. No obvious problem on a non-debug build.

            RQG tests on
            10.5 commit 287c1db7867502348dcbc9ff7ccaae3d289cdbb1 2020-02-03 build with debug
            showed asserts with quite similar shape.
            So I tried if maybe some of the MTR based tests above replay the problems.
            Unfortunately no success.
            

            mleich Matthias Leich added a comment - RQG tests on 10.5 commit 287c1db7867502348dcbc9ff7ccaae3d289cdbb1 2020-02-03 build with debug showed asserts with quite similar shape. So I tried if maybe some of the MTR based tests above replay the problems. Unfortunately no success.
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Marko Mäkelä [ marko ] Nikita Malyavin [ nikitamalyavin ]
            alice Alice Sherepa added a comment - - edited

            The same test, but adding INSERT IGNORE INTO t1 SELECT * FROM t2 at the end fails with "!cursor->index->is_committed()" on non-debug build 10.3 (as MDEV-19338)

            --source include/have_innodb.inc
             
            CREATE TABLE t1 (pk INT, f1 INT, f2 tinytext, f3 datetime, f4 TIMESTAMP, f5 datetime, vcol TEXT AS (f2) virtual, f7 varchar(1), f8 YEAR, f9 DATE, f10 INT, PRIMARY key(pk), index(vcol(64)) ) engine=innodb;
            CREATE TABLE t2 (pk INT, f1 INT, f2 varchar(8), f3 datetime, f4 TIMESTAMP, f5 datetime, f6 varchar(8), f7 varchar(1), f8 YEAR, f9 DATE, f10 INT, f11 INT, PRIMARY key(pk) ) engine=innodb;
            INSERT INTO t2 VALUES (1,1,'foobar','2012-12-12 12:12:12','2006-03-01 12:44:34','2029-10-10 21:27:53','','r',1975,'1989-12-24',9,NULL);
             
            ALTER TABLE t1 ADD COLUMN f11 INT;
            INSERT IGNORE INTO t1 SELECT * FROM t2;
            DELETE FROM t1;
            INSERT IGNORE INTO t1 SELECT * FROM t2;
            

            10.3 1656ea28e8e49318b34e non-debug

            Version: '10.3.24-MariaDB-log'  socket: '/10.3/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
            2020-07-24 10:00:38 9 [ERROR] InnoDB: Record in index `vcol` of table `test`.`t1` was not found on update: TUPLE (info_bits=0, 2 fields): {[0](0x),[4]    (0x80000001)} at: COMPACT RECORD(info_bits=0, 1 fields): {[8]infimum (0x696E66696D756D00)}
            2020-07-24 10:00:38 0x7f2cad354700  InnoDB: Assertion failure in file /10.3/storage/innobase/row/row0ins.cc line 221
            InnoDB: Failing assertion: !cursor->index->is_committed()
            InnoDB: We intentionally generate a memory trap.
            InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
            InnoDB: If you get repeated assertion failures or crashes, even
            InnoDB: immediately after the mysqld startup, there may be
            InnoDB: corruption in the InnoDB tablespace. Please refer to
            InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
            InnoDB: about forcing recovery.
            200724 10:00:38 [ERROR] mysqld got signal 6 ;
             
            linux/raise.c:51(__GI_raise)[0x7f2cb417d7bb]
            stdlib/abort.c:81(__GI_abort)[0x7f2cb4168535]
            /10.3/sql/mysqld(+0x4da468)[0x55b9ce27a468]
            ut/ut0rbt.cc:469(rbt_eject_node(ib_rbt_node_t*, ib_rbt_node_t*) [clone .cold.8])[0x55b9ce267a20]
            row/row0ins.cc:2201(row_ins_scan_sec_index_for_duplicate)[0x55b9ce71a8a8]
            row/row0ins.cc:3279(row_ins_sec_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, bool))[0x55b9ce71af05]
            row/row0ins.cc:3611(row_ins)[0x55b9ce72bc2a]
            row/row0mysql.cc:1425(row_insert_for_mysql(unsigned char const*, row_prebuilt_t*, ins_mode_t))[0x55b9ce68c525]
            handler/ha_innodb.cc:8039(ha_innobase::write_row(unsigned char*))[0x55b9ce527ca0]
            sql/handler.cc:6466(handler::ha_write_row(unsigned char*))[0x55b9ce32bf2d]
            sql/sql_insert.cc:2038(write_record(THD*, TABLE*, st_copy_info*))[0x55b9ce32cb01]
            sql/sql_insert.cc:3938(select_insert::send_data(List<Item>&))[0x55b9ce39dfc5]
            sql/sql_select.cc:20911(end_send(JOIN*, st_join_table*, bool))[0x55b9ce382605]
            sql/sql_select.cc:19952(evaluate_join_record(JOIN*, st_join_table*, int))[0x55b9ce38ccc6]
            sql/sql_select.cc:19739(sub_select(JOIN*, st_join_table*, bool))[0x55b9ce3ae3df]
            sql/sql_select.cc:19271(do_select)[0x55b9ce3ae5e9]
            sql/sql_select.cc:3911(JOIN::exec())[0x55b9ce3accfe]
            sql/sql_select.cc:4317(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*))[0x55b9ce3ad5e6]
            sql/sql_select.cc:370(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55b9ce35f484]
            sql/sql_parse.cc:4562(mysql_execute_command(THD*))[0x55b9ce35fb98]
            sql/sql_parse.cc:7827(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b9ce3618c5]
            sql/sql_parse.cc:1850(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b9ce362e86]
            sql/sql_parse.cc:1396(do_command(THD*))[0x55b9ce42ed54]
            sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x55b9ce42eee4]
            sql/sql_connect.cc:1310(handle_one_connection)[0x55b9ce94ce1f]
            nptl/pthread_create.c:487(start_thread)[0x7f2cb4c36fa3]
            x86_64/clone.S:97(clone)[0x7f2cb423f4cf]
             
            Query (0x7f2c5c00f6d0): INSERT IGNORE INTO t1 SELECT * FROM t2
            

            alice Alice Sherepa added a comment - - edited The same test, but adding INSERT IGNORE INTO t1 SELECT * FROM t2 at the end fails with "!cursor->index->is_committed()" on non-debug build 10.3 (as MDEV-19338 ) --source include/have_innodb.inc CREATE TABLE t1 (pk INT, f1 INT, f2 tinytext, f3 datetime, f4 TIMESTAMP, f5 datetime, vcol TEXT AS (f2) virtual, f7 varchar(1), f8 YEAR, f9 DATE, f10 INT, PRIMARY key(pk), index(vcol(64)) ) engine=innodb; CREATE TABLE t2 (pk INT, f1 INT, f2 varchar(8), f3 datetime, f4 TIMESTAMP, f5 datetime, f6 varchar(8), f7 varchar(1), f8 YEAR, f9 DATE, f10 INT, f11 INT, PRIMARY key(pk) ) engine=innodb; INSERT INTO t2 VALUES (1,1,'foobar','2012-12-12 12:12:12','2006-03-01 12:44:34','2029-10-10 21:27:53','','r',1975,'1989-12-24',9,NULL);   ALTER TABLE t1 ADD COLUMN f11 INT; INSERT IGNORE INTO t1 SELECT * FROM t2; DELETE FROM t1; INSERT IGNORE INTO t1 SELECT * FROM t2; 10.3 1656ea28e8e49318b34e non-debug Version: '10.3.24-MariaDB-log' socket: '/10.3/mysql-test/var/tmp/mysqld.1.sock' port: 16000 Source distribution 2020-07-24 10:00:38 9 [ERROR] InnoDB: Record in index `vcol` of table `test`.`t1` was not found on update: TUPLE (info_bits=0, 2 fields): {[0](0x),[4] (0x80000001)} at: COMPACT RECORD(info_bits=0, 1 fields): {[8]infimum (0x696E66696D756D00)} 2020-07-24 10:00:38 0x7f2cad354700 InnoDB: Assertion failure in file /10.3/storage/innobase/row/row0ins.cc line 221 InnoDB: Failing assertion: !cursor->index->is_committed() InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to https://jira.mariadb.org/ InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/ InnoDB: about forcing recovery. 200724 10:00:38 [ERROR] mysqld got signal 6 ;   linux/raise.c:51(__GI_raise)[0x7f2cb417d7bb] stdlib/abort.c:81(__GI_abort)[0x7f2cb4168535] /10.3/sql/mysqld(+0x4da468)[0x55b9ce27a468] ut/ut0rbt.cc:469(rbt_eject_node(ib_rbt_node_t*, ib_rbt_node_t*) [clone .cold.8])[0x55b9ce267a20] row/row0ins.cc:2201(row_ins_scan_sec_index_for_duplicate)[0x55b9ce71a8a8] row/row0ins.cc:3279(row_ins_sec_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, bool))[0x55b9ce71af05] row/row0ins.cc:3611(row_ins)[0x55b9ce72bc2a] row/row0mysql.cc:1425(row_insert_for_mysql(unsigned char const*, row_prebuilt_t*, ins_mode_t))[0x55b9ce68c525] handler/ha_innodb.cc:8039(ha_innobase::write_row(unsigned char*))[0x55b9ce527ca0] sql/handler.cc:6466(handler::ha_write_row(unsigned char*))[0x55b9ce32bf2d] sql/sql_insert.cc:2038(write_record(THD*, TABLE*, st_copy_info*))[0x55b9ce32cb01] sql/sql_insert.cc:3938(select_insert::send_data(List<Item>&))[0x55b9ce39dfc5] sql/sql_select.cc:20911(end_send(JOIN*, st_join_table*, bool))[0x55b9ce382605] sql/sql_select.cc:19952(evaluate_join_record(JOIN*, st_join_table*, int))[0x55b9ce38ccc6] sql/sql_select.cc:19739(sub_select(JOIN*, st_join_table*, bool))[0x55b9ce3ae3df] sql/sql_select.cc:19271(do_select)[0x55b9ce3ae5e9] sql/sql_select.cc:3911(JOIN::exec())[0x55b9ce3accfe] sql/sql_select.cc:4317(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*))[0x55b9ce3ad5e6] sql/sql_select.cc:370(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55b9ce35f484] sql/sql_parse.cc:4562(mysql_execute_command(THD*))[0x55b9ce35fb98] sql/sql_parse.cc:7827(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b9ce3618c5] sql/sql_parse.cc:1850(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b9ce362e86] sql/sql_parse.cc:1396(do_command(THD*))[0x55b9ce42ed54] sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x55b9ce42eee4] sql/sql_connect.cc:1310(handle_one_connection)[0x55b9ce94ce1f] nptl/pthread_create.c:487(start_thread)[0x7f2cb4c36fa3] x86_64/clone.S:97(clone)[0x7f2cb423f4cf]   Query (0x7f2c5c00f6d0): INSERT IGNORE INTO t1 SELECT * FROM t2
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 99389 ] MariaDB v4 [ 141506 ]
            Roel Roel Van de Paar made changes -

            For the quick test I've chosen my current 11.0 fork.
            None of the reports are reproducible there.

            nikitamalyavin Nikita Malyavin added a comment - For the quick test I've chosen my current 11.0 fork. None of the reports are reproducible there.
            nikitamalyavin Nikita Malyavin made changes -
            issue.field.resolutiondate 2023-04-14 12:39:57.0 2023-04-14 12:39:57.41
            nikitamalyavin Nikita Malyavin made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Won't Fix [ 2 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

              nikitamalyavin Nikita Malyavin
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.