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

Downgrade from current 10.2 to 10.2.19: InnoDB: Failing assertion: trx->dict_operation_lock_mode == RW_X_LATCH

    XMLWordPrintable

Details

    Description

      Note: I don't expect it to be fixed, but I need it for the record. Feel free to close as "won't fix".

      To reproduce:

      • on the current 10.2 server (e.g. 56529a7d) running with all defaults, execute

        create table t1 (a varchar(2048), b int, primary key(a)) engine=InnoDB;
        

      • shut down the server;
      • start 10.2.19 server on the same datadir;
      • execute

        alter table t1 row_format=redundant;
        truncate table t1;
        

      10.2.19

      2020-01-16 00:26:06 0x7efd2cbe5700  InnoDB: Assertion failure in file /data/src/10.2-bug/storage/innobase/row/row0mysql.cc line 2202
      InnoDB: Failing assertion: trx->dict_operation_lock_mode == RW_X_LATCH
       
      #6  0x0000558fc310423b in ut_dbg_assertion_failed (expr=0x558fc3695618 "trx->dict_operation_lock_mode == RW_X_LATCH", file=0x558fc3694678 "/data/src/10.2-bug/storage/innobase/row/row0mysql.cc", line=2202) at /data/src/10.2-bug/storage/innobase/ut/ut0dbg.cc:61
      #7  0x0000558fc3035174 in row_mysql_unlock_data_dictionary (trx=0x7efd2cf893a8) at /data/src/10.2-bug/storage/innobase/row/row0mysql.cc:2202
      #8  0x0000558fc2f11e3a in ha_innobase::create (this=0x7efcbc00a338, name=0x7efcbc00b378 "test/t1", form=0x7efcbc035010, create_info=0x7efd2cbe3360, file_per_table=true, trx=0x7efd2cf893a8) at /data/src/10.2-bug/storage/innobase/handler/ha_innodb.cc:12849
      #9  0x0000558fc2efd7e4 in ha_innobase::truncate (this=0x7efcbc00a338) at /data/src/10.2-bug/storage/innobase/handler/ha_innodb.cc:13489
      #10 0x0000558fc2cef6cd in handler::ha_truncate (this=0x7efcbc00a338) at /data/src/10.2-bug/sql/handler.cc:4081
      #11 0x0000558fc2eb218a in Sql_cmd_truncate_table::handler_truncate (this=0x7efcbc011660, thd=0x7efcbc000b00, table_ref=0x7efcbc011048, is_tmp_table=false) at /data/src/10.2-bug/sql/sql_truncate.cc:245
      #12 0x0000558fc2eb27e2 in Sql_cmd_truncate_table::truncate_table (this=0x7efcbc011660, thd=0x7efcbc000b00, table_ref=0x7efcbc011048) at /data/src/10.2-bug/sql/sql_truncate.cc:442
      #13 0x0000558fc2eb2960 in Sql_cmd_truncate_table::execute (this=0x7efcbc011660, thd=0x7efcbc000b00) at /data/src/10.2-bug/sql/sql_truncate.cc:499
      #14 0x0000558fc2a79fd2 in mysql_execute_command (thd=0x7efcbc000b00) at /data/src/10.2-bug/sql/sql_parse.cc:6225
      #15 0x0000558fc2a7f106 in mysql_parse (thd=0x7efcbc000b00, rawbuf=0x7efcbc010f78 "truncate table t1", length=17, parser_state=0x7efd2cbe4250, is_com_multi=false, is_next_command=false) at /data/src/10.2-bug/sql/sql_parse.cc:8012
      #16 0x0000558fc2a6c7bd in dispatch_command (command=COM_QUERY, thd=0x7efcbc000b00, packet=0x7efcbc0191a1 "truncate table t1", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/10.2-bug/sql/sql_parse.cc:1824
      #17 0x0000558fc2a6b159 in do_command (thd=0x7efcbc000b00) at /data/src/10.2-bug/sql/sql_parse.cc:1377
      #18 0x0000558fc2bbc21c in do_handle_one_connection (connect=0x558fc55989a0) at /data/src/10.2-bug/sql/sql_connect.cc:1335
      #19 0x0000558fc2bbbf9c in handle_one_connection (arg=0x558fc55989a0) at /data/src/10.2-bug/sql/sql_connect.cc:1241
      #20 0x00007efd2f9224a4 in start_thread (arg=0x7efd2cbe5700) at pthread_create.c:456
      #21 0x00007efd2dc70d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Not reproducible with 10.2.20, it instead returns error on ALTER:

      MariaDB [test]> alter table t1 row_format=redundant;
      ERROR 1709 (HY000): Index column size too large. The maximum column size is 767 bytes
      

      Not reproducible with 10.2.18 either, it executes both statements without complaining.

      I didn't check whether there is a similar issue between any minor versions of 10.3 and 10.4.
      Downgrade between major versions isn't tested, as it isn't supported anyway.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.