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

Assertion `file->s->base.reclength < file- >s->vreclength || !table->s->stored_fields' upon creating HASH index

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
    • 10.5, 10.6
    • Virtual Columns

    Description

      Note: Bugfix for MDEV-19011 is already in the main trees.

      CREATE TABLE t (f bit, key (f)) ENGINE=MyISAM;
      CREATE UNIQUE INDEX ind USING HASH ON t(f);
       
      # Cleanup
      DROP TABLE t;
      

      10.4 09b03ff3

      mysqld: /data/src/10.4/storage/myisam/ha_myisam.cc:981: void ha_myisam::setup_vcols_for_repair(HA_CHECK*): Assertion `file->s->base.reclength < file->s->vreclength || !table->s->stored_fields' failed.
      210628 18:59:51 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f554ea80f36 in __GI___assert_fail (assertion=0x56039470ec48 "file->s->base.reclength < file->s->vreclength || !table->s->stored_fields", file=0x56039470e798 "/data/src/10.4/storage/myisam/ha_myisam.cc", line=981, function=0x56039470ec10 "void ha_myisam::setup_vcols_for_repair(HA_CHECK*)") at assert.c:101
      #8  0x000056039419b146 in ha_myisam::setup_vcols_for_repair (this=0x7f5538046658, param=0x7f55380475f8) at /data/src/10.4/storage/myisam/ha_myisam.cc:981
      #9  0x000056039419d6f4 in ha_myisam::enable_indexes (this=0x7f5538046658, mode=2) at /data/src/10.4/storage/myisam/ha_myisam.cc:1651
      #10 0x000056039419de24 in ha_myisam::end_bulk_insert (this=0x7f5538046658) at /data/src/10.4/storage/myisam/ha_myisam.cc:1848
      #11 0x0000560393a0c2ef in handler::ha_end_bulk_insert (this=0x7f5538046658) at /data/src/10.4/sql/handler.cc:4427
      #12 0x000056039378c146 in copy_data_between_tables (thd=0x7f5538000d90, from=0x7f55380415a0, to=0x7f55380457f0, create=..., ignore=false, order_num=0, order=0x0, copied=0x7f55488ff658, deleted=0x7f55488ff660, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x7f55489010d0) at /data/src/10.4/sql/sql_table.cc:11003
      #13 0x0000560393789c7b in mysql_alter_table (thd=0x7f5538000d90, new_db=0x7f55380148c8, new_name=0x7f55380148d8, create_info=0x7f5548901e60, table_list=0x7f55380148b0, alter_info=0x7f5548901da0, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:10353
      #14 0x0000560393691d74 in mysql_execute_command (thd=0x7f5538000d90) at /data/src/10.4/sql/sql_parse.cc:4242
      #15 0x000056039369e89b in mysql_parse (thd=0x7f5538000d90, rawbuf=0x7f55380147a8 "CREATE UNIQUE INDEX ind USING HASH ON t(f)", length=42, parser_state=0x7f55489024d0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7992
      #16 0x000056039368abdb in dispatch_command (command=COM_QUERY, thd=0x7f5538000d90, packet=0x7f553800ac01 "", packet_length=42, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #17 0x0000560393689441 in do_command (thd=0x7f5538000d90) at /data/src/10.4/sql/sql_parse.cc:1373
      #18 0x000056039381a962 in do_handle_one_connection (connect=0x560397666f20) at /data/src/10.4/sql/sql_connect.cc:1412
      #19 0x000056039381a6ab in handle_one_connection (arg=0x560397666f20) at /data/src/10.4/sql/sql_connect.cc:1316
      #20 0x000056039424719c in pfs_spawn_thread (arg=0x56039763fd20) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #21 0x00007f554ef99609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x00007f554eb6c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Not reproducible on 10.3, apparently related to MDEV-371.
      Not reproducible with INT instead of BIT, I didn't check other data types.
      No obvious problems with InnoDB instead of MyISAM, or with MyISAM on a non-debug build.

      If Aria is used instead, both debug and release builds produce an error:

      query 'CREATE UNIQUE INDEX ind USING HASH ON t(f)' failed: 1071: Specified key was too long; max key length is 1000 bytes
      

      This error is not limited to BIT, happens with INT as well.

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.