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

Assertion `index->table->not_redundant()' or Assertion `dict_table_is_comp(index->table)' failed in row_merge_buf_add

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(3), b CHAR(8) AS (a) VIRTUAL, KEY(b(4))) ENGINE=InnoDB CHARACTER SET utf8;
      INSERT INTO t1 (id,a) VALUES (1,'foo');
      ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
      OPTIMIZE TABLE t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 ce141d07

      mysqld: /data/src/10.4/storage/innobase/row/row0merge.cc:704: ulint row_merge_buf_add(row_merge_buf_t*, dict_index_t*, const dict_table_t*, const dict_table_t*, fts_psort_t*, dtuple_t*, const row_ext_t*, doc_id_t*, mem_heap_t*, dberr_t*, mem_heap_t**, TABLE*, trx_t*): Assertion `index->table->not_redundant()' failed.
      210127 21:20:39 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f2798a5bf36 in __GI___assert_fail (assertion=0x55ab8c5f1573 "index->table->not_redundant()", file=0x55ab8c5f10e0 "/data/src/10.4/storage/innobase/row/row0merge.cc", line=704, function=0x55ab8c5f1480 "ulint row_merge_buf_add(row_merge_buf_t*, dict_index_t*, const dict_table_t*, const dict_table_t*, fts_psort_t*, dtuple_t*, const row_ext_t*, doc_id_t*, mem_heap_t*, dberr_t*, mem_heap_t**, TABLE*, tr"...) at assert.c:101
      #8  0x000055ab8bdd285e in row_merge_buf_add (buf=0x7f274005a710, fts_index=0x0, old_table=0x7f274005b210, new_table=0x7f2740159b50, psort_info=0x0, row=0x7f2740063530, ext=0x0, doc_id=0x7f2791c1b280, conv_heap=0x0, err=0x7f2791c1b26c, v_heap=0x7f2791c1b278, my_table=0x7f2791c1cc20, trx=0x7f27926c3120) at /data/src/10.4/storage/innobase/row/row0merge.cc:704
      #9  0x000055ab8bdd9aaf in row_merge_read_clustered_index (trx=0x7f27926c3120, table=0x7f2791c1cc20, old_table=0x7f274005b210, new_table=0x7f2740159b50, online=false, index=0x7f274005faf8, fts_sort_idx=0x0, psort_info=0x0, files=0x7f2740167830, key_numbers=0x7f274005fb08, n_index=2, defaults=0x0, add_v=0x0, col_map=0x7f274005fb70, add_autoinc=18446744073709551615, sequence=..., block=0x7f27884f9000 <error: Cannot access memory at address 0x7f27884f9000>, skip_pk_sort=true, tmpfd=0x7f2791c1bec0, stage=0x7f2740040c90, pct_cost=33.333333333333336, crypt_block=0x0, eval_table=0x7f2791c1cc20, allow_not_null=false) at /data/src/10.4/storage/innobase/row/row0merge.cc:2353
      #10 0x000055ab8bde1420 in row_merge_build_indexes (trx=0x7f27926c3120, old_table=0x7f274005b210, new_table=0x7f2740159b50, online=false, indexes=0x7f274005faf8, key_numbers=0x7f274005fb08, n_indexes=2, table=0x7f2791c1cc20, defaults=0x0, col_map=0x7f274005fb70, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7f2740040c90, add_v=0x0, eval_table=0x7f2791c1cc20, allow_not_null=false) at /data/src/10.4/storage/innobase/row/row0merge.cc:4704
      #11 0x000055ab8bc8ec0c in ha_innobase::inplace_alter_table (this=0x7f2740044058, altered_table=0x7f2791c1cc20, ha_alter_info=0x7f2791c1cb80) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:8504
      #12 0x000055ab8b7736ad in handler::ha_inplace_alter_table (this=0x7f2740044058, altered_table=0x7f2791c1cc20, ha_alter_info=0x7f2791c1cb80) at /data/src/10.4/sql/handler.h:4357
      #13 0x000055ab8b76743f in mysql_inplace_alter_table (thd=0x7f2740000d90, table_list=0x7f2740013510, table=0x7f2740041d20, altered_table=0x7f2791c1cc20, ha_alter_info=0x7f2791c1cb80, target_mdl_request=0x7f2791c1d9f0, alter_ctx=0x7f2791c1e530) at /data/src/10.4/sql/sql_table.cc:7780
      #14 0x000055ab8b76e5bd in mysql_alter_table (thd=0x7f2740000d90, new_db=0x55ab8c36dd80 <null_clex_str>, new_name=0x55ab8c36dd80 <null_clex_str>, create_info=0x7f2791c1f100, table_list=0x7f2740013510, alter_info=0x7f2791c1f040, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:10190
      #15 0x000055ab8b771590 in mysql_recreate_table (thd=0x7f2740000d90, table_list=0x7f2740013510, table_copy=false) at /data/src/10.4/sql/sql_table.cc:11038
      #16 0x000055ab8b812616 in admin_recreate_table (thd=0x7f2740000d90, table_list=0x7f2740013510) at /data/src/10.4/sql/sql_admin.cc:59
      #17 0x000055ab8b815d44 in mysql_admin_table (thd=0x7f2740000d90, tables=0x7f2740013510, check_opt=0x7f2740005f70, operator_name=0x55ab8c3b70b8 "optimize", lock_type=TL_WRITE, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x55ab8b9ee206 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0) at /data/src/10.4/sql/sql_admin.cc:1104
      #18 0x000055ab8b817109 in Sql_cmd_optimize_table::execute (this=0x7f2740013bd8, thd=0x7f2740000d90) at /data/src/10.4/sql/sql_admin.cc:1449
      #19 0x000055ab8b67fad9 in mysql_execute_command (thd=0x7f2740000d90) at /data/src/10.4/sql/sql_parse.cc:6160
      #20 0x000055ab8b685087 in mysql_parse (thd=0x7f2740000d90, rawbuf=0x7f2740013458 "OPTIMIZE TABLE t1", length=17, parser_state=0x7f2791c20550, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7958
      #21 0x000055ab8b6713af in dispatch_command (command=COM_QUERY, thd=0x7f2740000d90, packet=0x7f27400087b1 "", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1855
      #22 0x000055ab8b66fc17 in do_command (thd=0x7f2740000d90) at /data/src/10.4/sql/sql_parse.cc:1373
      #23 0x000055ab8b7fef07 in do_handle_one_connection (connect=0x55ab8f426f20) at /data/src/10.4/sql/sql_connect.cc:1412
      #24 0x000055ab8b7fec50 in handle_one_connection (arg=0x55ab8f426f20) at /data/src/10.4/sql/sql_connect.cc:1316
      #25 0x000055ab8c220302 in pfs_spawn_thread (arg=0x55ab8f374590) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #26 0x00007f27992dc609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x00007f2798b47293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.2 900a1475

      mysqld: /data/src/10.2/storage/innobase/row/row0merge.cc:704: ulint row_merge_buf_add(row_merge_buf_t*, dict_index_t*, const dict_table_t*, const dict_table_t*, fts_psort_t*, dtuple_t*, const row_ext_t*, doc_id_t*, mem_heap_t*, dberr_t*, mem_heap_t**, TABLE*, trx_t*): Assertion `dict_table_is_comp(index->table)' failed.
      210127 21:21:50 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fba44e59f36 in __GI___assert_fail (assertion=0x562c2efd0318 "dict_table_is_comp(index->table)", file=0x562c2efcfea8 "/data/src/10.2/storage/innobase/row/row0merge.cc", line=704, function=0x562c2efd0220 "ulint row_merge_buf_add(row_merge_buf_t*, dict_index_t*, const dict_table_t*, const dict_table_t*, fts_psort_t*, dtuple_t*, const row_ext_t*, doc_id_t*, mem_heap_t*, dberr_t*, mem_heap_t**, TABLE*, tr"...) at assert.c:101
      #8  0x0000562c2e989b99 in row_merge_buf_add (buf=0x7fb9f00a1950, fts_index=0x0, old_table=0x7fb9f003a3b0, new_table=0x7fb9f01733c0, psort_info=0x0, row=0x7fb9f003ab50, ext=0x0, doc_id=0x7fba400e1c58, conv_heap=0x0, err=0x7fba400e1c44, v_heap=0x7fba400e1c50, my_table=0x7fb9f009e170, trx=0x7fba3bc00120) at /data/src/10.2/storage/innobase/row/row0merge.cc:704
      #9  0x0000562c2e98e8b5 in row_merge_read_clustered_index (trx=0x7fba3bc00120, table=0x7fb9f009e170, old_table=0x7fb9f003a3b0, new_table=0x7fb9f01733c0, online=false, index=0x7fb9f009fe30, fts_sort_idx=0x0, psort_info=0x0, files=0x7fb9f0008120, key_numbers=0x7fb9f009fe40, n_index=2, add_cols=0x0, add_v=0x0, col_map=0x7fb9f009fe78, add_autoinc=18446744073709551615, sequence=..., block=0x7fba3428b000 <error: Cannot access memory at address 0x7fba3428b000>, skip_pk_sort=true, tmpfd=0x7fba400e2728, stage=0x7fb9f00349b0, pct_cost=33.333333333333336, crypt_block=0x0, eval_table=0x7fb9f009e170) at /data/src/10.2/storage/innobase/row/row0merge.cc:2231
      #10 0x0000562c2e9951fc in row_merge_build_indexes (trx=0x7fba3bc00120, old_table=0x7fb9f003a3b0, new_table=0x7fb9f01733c0, online=false, indexes=0x7fb9f009fe30, key_numbers=0x7fb9f009fe40, n_indexes=2, table=0x7fb9f009e170, add_cols=0x0, col_map=0x7fb9f009fe78, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7fb9f00349b0, add_v=0x0, eval_table=0x7fb9f009e170) at /data/src/10.2/storage/innobase/row/row0merge.cc:4681
      #11 0x0000562c2e89c29f in ha_innobase::inplace_alter_table (this=0x7fb9f0176658, altered_table=0x7fb9f009e170, ha_alter_info=0x7fba400e2dd0) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:6292
      #12 0x0000562c2e4b035f in handler::ha_inplace_alter_table (this=0x7fb9f0176658, altered_table=0x7fb9f009e170, ha_alter_info=0x7fba400e2dd0) at /data/src/10.2/sql/handler.h:3792
      #13 0x0000562c2e4a57ef in mysql_inplace_alter_table (thd=0x7fb9f0000d90, table_list=0x7fb9f00127c0, table=0x7fb9f0192310, altered_table=0x7fb9f009e170, ha_alter_info=0x7fba400e2dd0, inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, target_mdl_request=0x7fba400e2e60, alter_ctx=0x7fba400e3410) at /data/src/10.2/sql/sql_table.cc:7458
      #14 0x0000562c2e4ab686 in mysql_alter_table (thd=0x7fb9f0000d90, new_db=0x0, new_name=0x0, create_info=0x7fba400e4020, table_list=0x7fb9f00127c0, alter_info=0x7fba400e3f70, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9627
      #15 0x0000562c2e4ae089 in mysql_recreate_table (thd=0x7fb9f0000d90, table_list=0x7fb9f00127c0, table_copy=false) at /data/src/10.2/sql/sql_table.cc:10413
      #16 0x0000562c2e534b2b in admin_recreate_table (thd=0x7fb9f0000d90, table_list=0x7fb9f00127c0) at /data/src/10.2/sql/sql_admin.cc:58
      #17 0x0000562c2e537e4f in mysql_admin_table (thd=0x7fb9f0000d90, tables=0x7fb9f00127c0, check_opt=0x7fb9f00058a8, operator_name=0x562c2ee71ac8 "optimize", lock_type=TL_WRITE, org_open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x562c2e65d364 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0) at /data/src/10.2/sql/sql_admin.cc:1033
      #18 0x0000562c2e5391fc in Sql_cmd_optimize_table::execute (this=0x7fb9f0012de0, thd=0x7fb9f0000d90) at /data/src/10.2/sql/sql_admin.cc:1372
      #19 0x0000562c2e3d8027 in mysql_execute_command (thd=0x7fb9f0000d90) at /data/src/10.2/sql/sql_parse.cc:5994
      #20 0x0000562c2e3dd03f in mysql_parse (thd=0x7fb9f0000d90, rawbuf=0x7fb9f00126f8 "OPTIMIZE TABLE t1", length=17, parser_state=0x7fba400e55f0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7763
      #21 0x0000562c2e3cb318 in dispatch_command (command=COM_QUERY, thd=0x7fb9f0000d90, packet=0x7fb9f0008b51 "", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1827
      #22 0x0000562c2e3c9e13 in do_command (thd=0x7fb9f0000d90) at /data/src/10.2/sql/sql_parse.cc:1381
      #23 0x0000562c2e52472e in do_handle_one_connection (connect=0x562c3100efa0) at /data/src/10.2/sql/sql_connect.cc:1336
      #24 0x0000562c2e524493 in handle_one_connection (arg=0x562c3100efa0) at /data/src/10.2/sql/sql_connect.cc:1241
      #25 0x0000562c2ed4c9ec in pfs_spawn_thread (arg=0x562c30ff2120) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #26 0x00007fba45369609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x00007fba44f45293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      The first one is reproducible on 10.4-10.6, the second one on 10.2-10.3.
      No obvious immediate effect on a non-debug build.

        Attachments

          Activity

            People

            Assignee:
            thiru Thirunarayanan Balathandayuthapani
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: