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

Assertion `cmp_rec_rec(rec, old_rec, offsets, old_offsets, m_index) > 0' failed in PageBulk::insert

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a CHAR(8), id INT, PRIMARY KEY (a,id)) COLLATE utf8_nopad_bin ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
      INSERT INTO t1 VALUES ('',1);
      ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
      INSERT INTO t1 VALUES ('',2);
      ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
       
      # Cleanup
      DROP TABLE t1;
      

      10.2 1ac4d0c1

      mysqld: /data/src/10.2/storage/innobase/btr/btr0bulk.cc:199: void PageBulk::insert(const rec_t*, rec_offs*): Assertion `cmp_rec_rec(rec, old_rec, offsets, old_offsets, m_index) > 0' failed.
      210417 20:36:07 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007faeda8c7f36 in __GI___assert_fail (assertion=0x561417051f60 "cmp_rec_rec(rec, old_rec, offsets, old_offsets, m_index) > 0", file=0x561417051cc0 "/data/src/10.2/storage/innobase/btr/btr0bulk.cc", line=199, function=0x561417051ec0 "void PageBulk::insert(const rec_t*, rec_offs*)") at assert.c:101
      #8  0x00005614161ae9ce in PageBulk::insert (this=0x61a00007da80, rec=0x6190000e9d7a ' ' <repeats 24 times>, "\200", offsets=0x6190000e9db0) at /data/src/10.2/storage/innobase/btr/btr0bulk.cc:199
      #9  0x00005614161b2567 in BtrBulk::insert (this=0x6060000cae20, tuple=0x6310000dc8b0, level=0) at /data/src/10.2/storage/innobase/btr/btr0bulk.cc:978
      #10 0x0000561415f33d18 in BtrBulk::insert (this=0x6060000cae20, tuple=0x6310000dc8b0) at /data/src/10.2/storage/innobase/include/btr0bulk.h:313
      #11 0x0000561415f9341e in row_merge_insert_index_tuples (index=0x618000036508, old_table=0x6190000dd508, fd=-1, block=0x0, row_buf=0x615000032d88, btr_bulk=0x6060000cae20, table_total_rows=2, pct_progress=0, pct_cost=50, crypt_block=0x0, space=6, stage=0x0) at /data/src/10.2/storage/innobase/row/row0merge.cc:3533
      #12 0x0000561415f8ba0d in row_merge_read_clustered_index (trx=0x7faed2528910, table=0x61f0000428f0, old_table=0x6190000dd508, new_table=0x6190000e8408, online=true, index=0x6190000e8170, fts_sort_idx=0x0, psort_info=0x0, files=0x6030000606d0, key_numbers=0x6190000e8180, n_index=1, add_cols=0x0, add_v=0x0, col_map=0x6190000e81d0, add_autoinc=18446744073709551615, sequence=..., block=0x7faec369f000 "", skip_pk_sort=true, tmpfd=0x7faec40f0ca0, stage=0x607000013960, pct_cost=50, crypt_block=0x0, eval_table=0x61f0000428f0) at /data/src/10.2/storage/innobase/row/row0merge.cc:2391
      #13 0x0000561415f9985b in row_merge_build_indexes (trx=0x7faed2528910, old_table=0x6190000dd508, new_table=0x6190000e8408, online=true, indexes=0x6190000e8170, key_numbers=0x6190000e8180, n_indexes=1, table=0x61f0000428f0, add_cols=0x0, col_map=0x6190000e81d0, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x607000013960, add_v=0x0, eval_table=0x61f0000428f0) at /data/src/10.2/storage/innobase/row/row0merge.cc:4683
      #14 0x0000561415d82d39 in ha_innobase::inplace_alter_table (this=0x61d0001f8710, altered_table=0x61f0000428f0, ha_alter_info=0x7faec40f1a10) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:6294
      #15 0x00005614153c3092 in handler::ha_inplace_alter_table (this=0x61d0001f8710, altered_table=0x61f0000428f0, ha_alter_info=0x7faec40f1a10) at /data/src/10.2/sql/handler.h:3798
      #16 0x00005614153a7689 in mysql_inplace_alter_table (thd=0x62a0000ba270, table_list=0x62b0000003b0, table=0x61f000041af0, altered_table=0x61f0000428f0, ha_alter_info=0x7faec40f1a10, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7faec40f1aa0, alter_ctx=0x7faec40f1e80) at /data/src/10.2/sql/sql_table.cc:7458
      #17 0x00005614153b6e0d in mysql_alter_table (thd=0x62a0000ba270, new_db=0x62b0000009d0 "test", new_name=0x0, create_info=0x7faec40f3120, table_list=0x62b0000003b0, alter_info=0x7faec40f3030, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9627
      #18 0x00005614154fe45e in Sql_cmd_alter_table::execute (this=0x62b0000009e0, thd=0x62a0000ba270) at /data/src/10.2/sql/sql_alter.cc:333
      #19 0x0000561415184e50 in mysql_execute_command (thd=0x62a0000ba270) at /data/src/10.2/sql/sql_parse.cc:6020
      #20 0x00005614151906ee in mysql_parse (thd=0x62a0000ba270, rawbuf=0x62b000000290 "ALTER TABLE t1 ROW_FORMAT=REDUNDANT", length=35, parser_state=0x7faec40f4c10, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7794
      #21 0x00005614151697d0 in dispatch_command (command=COM_QUERY, thd=0x62a0000ba270, packet=0x629000136271 "ALTER TABLE t1 ROW_FORMAT=REDUNDANT", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1827
      #22 0x000056141516658f in do_command (thd=0x62a0000ba270) at /data/src/10.2/sql/sql_parse.cc:1381
      #23 0x00005614154ee94a in do_handle_one_connection (connect=0x61100004aa70) at /data/src/10.2/sql/sql_connect.cc:1336
      #24 0x00005614154ee20d in handle_one_connection (arg=0x61100004aa70) at /data/src/10.2/sql/sql_connect.cc:1241
      #25 0x0000561416890516 in pfs_spawn_thread (arg=0x61600000e7f0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #26 0x00007faedadd7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x00007faeda9b3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on 10.2-10.6.
      No obvious immediate problem on a non-debug build.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: