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

Assertion `padding_bytes % fpi->space_xfrm_len == 0' in myrocks::Rdb_key_def::pack_with_varchar_space_pad

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.5, 10.6
    • None

    Description

      INSTALL SONAME 'ha_rocksdb';
      CREATE TABLE t (a VARCHAR(8)) ENGINE=RocksDB COLLATE utf8mb4_nopad_bin;
      ALTER TABLE t ADD PRIMARY KEY (a);
      INSERT INTO t VALUES ('x');
      

      10.3 18488048

      mysqld: /data/src/10.3/storage/rocksdb/rdb_datadic.cc:2420: static void myrocks::Rdb_key_def::pack_with_varchar_space_pad(myrocks::Rdb_field_packing*, Field*, uchar*, uchar**, myrocks::Rdb_pack_field_context*): Assertion `padding_bytes % fpi->space_xfrm_len == 0' failed.
      220720  1:59:03 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fe2378c4662 in __GI___assert_fail (assertion=0x7fe23151fbc8 "padding_bytes % fpi->space_xfrm_len == 0", file=0x7fe23151e668 "/data/src/10.3/storage/rocksdb/rdb_datadic.cc", line=2420, function=0x7fe23151fbf8 "static void myrocks::Rdb_key_def::pack_with_varchar_space_pad(myrocks::Rdb_field_packing*, Field*, uchar*, uchar**, myrocks::Rdb_pack_field_context*)") at assert.c:101
      #8  0x00007fe231087507 in myrocks::Rdb_key_def::pack_with_varchar_space_pad (fpi=0x55d474d89630, field=0x7fe2200ea410, buf=0x7fe2200ea983 '\245' <repeats 37 times>, "h4z\025\342\177", dst=0x7fe2318ea630, pack_ctx=0x7fe2318ea658) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:2420
      #9  0x00007fe2310846c9 in myrocks::Rdb_key_def::pack_field (this=0x7fe2200f6110, field=0x7fe2200ea410, pack_info=0x55d474d89630, tuple=0x7fe2200e5514 "", packed_tuple=0x7fe2200e5510 "", pack_buffer=0x7fe2200ea980 "", unpack_info=0x7fe2202d77a0, n_null_fields=0x0) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:1231
      #10 0x00007fe231084e4d in myrocks::Rdb_key_def::pack_record (this=0x7fe2200f6110, tbl=0x7fe2202d82b0, pack_buffer=0x7fe2200ea980 "", record=0x7fe2200ea3b0 "\001x", packed_tuple=0x7fe2200e5510 "", unpack_info=0x7fe2202d77a0, should_store_row_debug_checksums=false, hidden_pk_id=0, n_key_parts=1, n_null_fields=0x0, ttl_bytes=0x0) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:1379
      #11 0x00007fe230ff831b in myrocks::ha_rocksdb::get_pk_for_update (this=0x7fe2202d7228, row_info=0x7fe2318ea840) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:9655
      #12 0x00007fe230ffa555 in myrocks::ha_rocksdb::update_write_row (this=0x7fe2202d7228, old_data=0x0, new_data=0x7fe2200ea3b0 "\001x", skip_unique_check=false) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:10361
      #13 0x00007fe230ff81fd in myrocks::ha_rocksdb::write_row (this=0x7fe2202d7228, buf=0x7fe2200ea3b0 "\001x") at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:9602
      #14 0x000055d4726fe439 in handler::ha_write_row (this=0x7fe2202d7228, buf=0x7fe2200ea3b0 "\001x") at /data/src/10.3/sql/handler.cc:6493
      #15 0x000055d47238aab4 in write_record (thd=0x7fe220000d90, table=0x7fe2202d82b0, info=0x7fe2318eabf0) at /data/src/10.3/sql/sql_insert.cc:2054
      #16 0x000055d472387ad4 in mysql_insert (thd=0x7fe220000d90, table_list=0x7fe220012bb8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.3/sql/sql_insert.cc:1077
      #17 0x000055d4723cc8f0 in mysql_execute_command (thd=0x7fe220000d90) at /data/src/10.3/sql/sql_parse.cc:4504
      #18 0x000055d4723d81aa in mysql_parse (thd=0x7fe220000d90, rawbuf=0x7fe220012ad8 "INSERT INTO t VALUES ('x')", length=26, parser_state=0x7fe2318eb5b0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7870
      #19 0x000055d4723c49df in dispatch_command (command=COM_QUERY, thd=0x7fe220000d90, packet=0x7fe220008f31 "INSERT INTO t VALUES ('x')", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #20 0x000055d4723c339d in do_command (thd=0x7fe220000d90) at /data/src/10.3/sql/sql_parse.cc:1398
      #21 0x000055d472540956 in do_handle_one_connection (connect=0x55d474e6b170) at /data/src/10.3/sql/sql_connect.cc:1403
      #22 0x000055d4725406c1 in handle_one_connection (arg=0x55d474e6b170) at /data/src/10.3/sql/sql_connect.cc:1308
      #23 0x000055d472eefdd0 in pfs_spawn_thread (arg=0x55d474f6ba40) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #24 0x00007fe237a5dea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x00007fe23798ddef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      No obvious problem on a non-debug build.

      It is important for the test case that the PK is added separately. If it is a part of the initial CREATE TABLE, it fails with

      query 'CREATE TABLE t (a VARCHAR(8), PRIMARY KEY(a)) ENGINE=RocksDB COLLATE utf8mb4_nopad_bin' failed: 4077: MyRocks doesn't currently support collations with "No pad" attribute.
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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