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

Assertion `!n_mysql_tables_in_use' failed after error upon binary logging of DML involving vector table

    XMLWordPrintable

Details

    Description

      --source include/have_binlog_format_statement.inc
      --source include/have_innodb.inc
       
      SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
       
      CREATE TABLE t (pk INT PRIMARY KEY, v BLOB NOT NULL, VECTOR(v)) ENGINE=InnoDB;
      --error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE
      UPDATE t SET pk = 2 WHERE pk = 1;
       
      # Cleanup
      DROP TABLE t;
      

      bb-11.6-MDEV-32887-vector 77be73c489fb7c21ca58e78cef10e0c166f293d8

      UPDATE t SET pk = 2 WHERE pk = 1;
      ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
      ...
      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/innobase/trx/trx0trx.cc:383: void trx_t::free(): Assertion `!n_mysql_tables_in_use' failed.
      241004 22:38:41 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007feaf1853e32 in __GI___assert_fail (assertion=0x563f1ba6a520 "!n_mysql_tables_in_use", file=0x563f1ba69e00 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/innobase/trx/trx0trx.cc", line=383, function=0x563f1ba6a560 "void trx_t::free()") at ./assert/assert.c:101
      #10 0x0000563f1a2e5ec6 in trx_t::free (this=0x7feae8e9f3c0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/innobase/trx/trx0trx.cc:383
      #11 0x0000563f19cea189 in innobase_close_connection (thd=0x62c0001f0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/innobase/handler/ha_innodb.cc:4940
      #12 0x0000563f192c6575 in ha_close_connection (thd=0x62c0001f0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/handler.cc:971
      #13 0x0000563f187ece01 in THD::free_connection (this=0x62c0001f0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_class.cc:1730
      #14 0x0000563f18559461 in unlink_thd (thd=0x62c0001f0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/mysqld.cc:2875
      #15 0x0000563f18e20301 in do_handle_one_connection (connect=0x6080000088b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1459
      #16 0x0000563f18e1fb4a in handle_one_connection (arg=0x608000008838) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #17 0x0000563f19ac3672 in pfs_spawn_thread (arg=0x617000008c98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #18 0x00007feaf18a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #19 0x00007feaf192861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The error upon UPDATE is not specific to vector keys, the limitation exists in all versions. The following assertion failure, however, doesn't happen without the vector key with otherwise the same scenario.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.