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

Assertion `m_prebuilt->trx == thd_to_trx(m_user_thd)' failed in ha_innobase::is_read_only

    XMLWordPrintable

Details

    Description

      The test case below is non-deterministic in the sense that the statement after COMMIT RELEASE sometimes fails with 2006/2013 errors. This non-determinism exists in previous versions too, only the assertion (and thus the failure) is new. I intentionally don't mask the errors as they may be somehow related to the reported problem. If the test case fails with one of the errors instead of the assertion failure, just re-run it. I hope it will be made deterministic after the analysis.

      --source include/have_innodb.inc
       
      --connect (con1,localhost,root,,test)
      --disconnect con1
       
      --connection default
      --enable_reconnect
      CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
      --error ER_BAD_FIELD_ERROR
      ALTER TABLE t1 ADD CHECK (b <= 1);
      COMMIT RELEASE;
      ALTER TABLE t1 AUTO_INCREMENT=1;
       
      # Cleanup
      --connection default
      DROP TABLE t1;
      

      10.6 9118fd36

      mariadbd: /data/src/10.6/storage/innobase/handler/ha_innodb.cc:7269: bool ha_innobase::is_read_only() const: Assertion `m_prebuilt->trx == thd_to_trx(m_user_thd)' failed.
      201230 19:31:06 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f48a7525f36 in __GI___assert_fail (assertion=0x5608c7c28af8 "m_prebuilt->trx == thd_to_trx(m_user_thd)", file=0x5608c7c26d48 "/data/src/10.6/storage/innobase/handler/ha_innodb.cc", line=7269, function=0x5608c7c2ab28 "bool ha_innobase::is_read_only() const") at assert.c:101
      #8  0x00005608c7379d79 in ha_innobase::is_read_only (this=0x7f48741ac080) at /data/src/10.6/storage/innobase/handler/ha_innodb.cc:7269
      #9  0x00005608c73afc58 in ha_innobase::check_if_supported_inplace_alter (this=0x7f48741ac080, altered_table=0x7f48a087f950, ha_alter_info=0x7f48a087f8b0) at /data/src/10.6/storage/innobase/handler/handler0alter.cc:1978
      #10 0x00005608c6c9ad54 in mysql_alter_table (thd=0x7f4868000db8, new_db=0x7f4868005828, new_name=0x7f4868005c28, create_info=0x7f48a0881480, table_list=0x7f4868012958, alter_info=0x7f48a08813b0, order_num=0, order=0x0, ignore=false, if_exists=false) at /data/src/10.6/sql/sql_table.cc:10609
      #11 0x00005608c6d42f28 in Sql_cmd_alter_table::execute (this=0x7f4868013038, thd=0x7f4868000db8) at /data/src/10.6/sql/sql_alter.cc:539
      #12 0x00005608c6b99dda in mysql_execute_command (thd=0x7f4868000db8) at /data/src/10.6/sql/sql_parse.cc:5858
      #13 0x00005608c6ba0126 in mysql_parse (thd=0x7f4868000db8, rawbuf=0x7f4868012870 "ALTER TABLE t1 AUTO_INCREMENT=1", length=31, parser_state=0x7f48a0882510) at /data/src/10.6/sql/sql_parse.cc:7881
      #14 0x00005608c6b8c739 in dispatch_command (command=COM_QUERY, thd=0x7f4868000db8, packet=0x7f4868008e49 "ALTER TABLE t1 AUTO_INCREMENT=1", packet_length=31) at /data/src/10.6/sql/sql_parse.cc:1816
      #15 0x00005608c6b8b150 in do_command (thd=0x7f4868000db8) at /data/src/10.6/sql/sql_parse.cc:1348
      #16 0x00005608c6d382eb in do_handle_one_connection (connect=0x5608c95ae228, put_in_cache=true) at /data/src/10.6/sql/sql_connect.cc:1410
      #17 0x00005608c6d3804e in handle_one_connection (arg=0x5608c95add88) at /data/src/10.6/sql/sql_connect.cc:1312
      #18 0x00005608c7294b27 in pfs_spawn_thread (arg=0x5608c95ade68) at /data/src/10.6/storage/perfschema/pfs.cc:2201
      #19 0x00007f48a7a3d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x00007f48a7611293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      The assertion [failure] appeared in 10.6 branch after this commit:

      Author: Marko Mäkelä
      Date:   Tue Nov 10 17:21:16 2020 +0200
       
          MDEV-23497 Make ROW_FORMAT=COMPRESSED read-only by default
      

      Attachments

        Issue Links

          Activity

            People

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