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

Assertion (col.vers_sys_end()) upon inplace ALTER with virtual columns

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
          a INT,
          va INT AS (a) VIRTUAL,
          b INT,
          vb INT AS (b) VIRTUAL,
          c INT,
          vc INT AS (c) VIRTUAL,
          d INT,
          e INT,
          INDEX(va)
      ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
      REPLACE INTO t1 () VALUES (),();
      SET STATEMENT system_versioning_alter_history=KEEP FOR ALTER TABLE t1 DROP e;
      ALTER TABLE t1 ALGORITHM=INPLACE, DROP SYSTEM VERSIONING;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 fe4a4bb0

      mysqld: /data/src/10.4/storage/innobase/dict/dict0mem.cc:1280: bool dict_index_t::vers_history_row(const rec_t*, const ulint*): Assertion `col.vers_sys_end()' failed.
      190910 13:41:11 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f83bca0ff12 in __GI___assert_fail (assertion=0x564ea66151a5 "col.vers_sys_end()", file=0x564ea6614ca0 "/data/src/10.4/storage/innobase/dict/dict0mem.cc", line=1280, function=0x564ea66167e0 <dict_index_t::vers_history_row(unsigned char const*, unsigned long const*)::__PRETTY_FUNCTION__> "bool dict_index_t::vers_history_row(const rec_t*, const ulint*)") at assert.c:101
      #8  0x0000564ea5f33408 in dict_index_t::vers_history_row (this=0x7f836c0816c8, rec=0x7f83b65bc07e "", offsets=0x7f836c3b1e38) at /data/src/10.4/storage/innobase/dict/dict0mem.cc:1280
      #9  0x0000564ea5d2c597 in row_merge_read_clustered_index (trx=0x7f83b6879140, table=0x7f83b5ddc830, old_table=0x7f836c07df68, new_table=0x7f836c070748, online=false, index=0x7f836c15d7a8, fts_sort_idx=0x0, psort_info=0x0, files=0x7f836c191720, key_numbers=0x7f836c15d7b8, n_index=2, defaults=0x0, add_v=0x0, col_map=0x7f836c15d840, add_autoinc=18446744073709551615, sequence=..., block=0x7f83ac4f9000 <error: Cannot access memory at address 0x7f83ac4f9000>, skip_pk_sort=true, tmpfd=0x7f83b5ddb970, stage=0x7f836c0e8fe0, pct_cost=33.333333333333336, crypt_block=0x0, eval_table=0x7f83b5ddc830, allow_not_null=false) at /data/src/10.4/storage/innobase/row/row0merge.cc:2308
      #10 0x0000564ea5d34583 in row_merge_build_indexes (trx=0x7f83b6879140, old_table=0x7f836c07df68, new_table=0x7f836c070748, online=false, indexes=0x7f836c15d7a8, key_numbers=0x7f836c15d7b8, n_indexes=2, table=0x7f83b5ddc830, defaults=0x0, col_map=0x7f836c15d840, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7f836c0e8fe0, add_v=0x0, eval_table=0x7f83b5ddc830, allow_not_null=false) at /data/src/10.4/storage/innobase/row/row0merge.cc:4718
      #11 0x0000564ea5bdcdbe in ha_innobase::inplace_alter_table (this=0x7f836c1a1f68, altered_table=0x7f83b5ddc830, ha_alter_info=0x7f83b5ddc7a0) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:8381
      #12 0x0000564ea56d32ed in handler::ha_inplace_alter_table (this=0x7f836c1a1f68, altered_table=0x7f83b5ddc830, ha_alter_info=0x7f83b5ddc7a0) at /data/src/10.4/sql/handler.h:4324
      #13 0x0000564ea56c7496 in mysql_inplace_alter_table (thd=0x7f836c000b00, table_list=0x7f836c013238, table=0x7f836c1a1100, altered_table=0x7f83b5ddc830, ha_alter_info=0x7f83b5ddc7a0, inplace_supported=HA_ALTER_INPLACE_COPY_LOCK, target_mdl_request=0x7f83b5ddd600, alter_ctx=0x7f83b5dde130) at /data/src/10.4/sql/sql_table.cc:7715
      #14 0x0000564ea56ce2af in mysql_alter_table (thd=0x7f836c000b00, new_db=0x7f836c0052b8, new_name=0x7f836c0056c0, create_info=0x7f83b5dded10, table_list=0x7f836c013238, alter_info=0x7f83b5ddec50, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:10092
      #15 0x0000564ea5766683 in Sql_cmd_alter_table::execute (this=0x7f836c0138f8, thd=0x7f836c000b00) at /data/src/10.4/sql/sql_alter.cc:508
      #16 0x0000564ea55e4369 in mysql_execute_command (thd=0x7f836c000b00) at /data/src/10.4/sql/sql_parse.cc:6099
      #17 0x0000564ea55e9ab2 in mysql_parse (thd=0x7f836c000b00, rawbuf=0x7f836c013118 "ALTER TABLE t1 ALGORITHM=INPLACE, DROP SYSTEM VERSIONING", length=56, parser_state=0x7f83b5de0170, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7909
      #18 0x0000564ea55d4ab2 in dispatch_command (command=COM_QUERY, thd=0x7f836c000b00, packet=0x7f836c1379d1 "ALTER TABLE t1 ALGORITHM=INPLACE, DROP SYSTEM VERSIONING", packet_length=56, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1843
      #19 0x0000564ea55d30fc in do_command (thd=0x7f836c000b00) at /data/src/10.4/sql/sql_parse.cc:1360
      #20 0x0000564ea575ce45 in do_handle_one_connection (connect=0x564ea98e7960) at /data/src/10.4/sql/sql_connect.cc:1412
      #21 0x0000564ea575cb94 in handle_one_connection (arg=0x564ea98e7960) at /data/src/10.4/sql/sql_connect.cc:1316
      #22 0x0000564ea6194173 in pfs_spawn_thread (arg=0x564ea98662d0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #23 0x00007f83be5844a4 in start_thread (arg=0x7f83b5de1700) at pthread_create.c:456
      #24 0x00007f83bcaccd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Not reproducible on 10.3.
      No obvious effect on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.