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

Incorrect error handling on DDL with FULLTEXT INDEX

Details

    Description

      This came up while testing MDEV-29445. The scenario is that a TRUNCATE TABLE fails in fts_create_one_index_table() because of DB_LOCK_TABLE_FULL. At the time of this, the buffer pool was being shrunk to 10% of its current size, so it is to be expected that operations may fail due to running out of space for locks. The bug is that the transaction had already been rolled back, but we are overwriting trx->error_state with an error code. A little later, the next operation that would attempt to use this transaction object would fail:

      ALTER TABLE t3 CHANGE COLUMN col2 col2 INT, LOCK = SHARED, ALGORITHM = COPY;
      

      2025-02-10  5:05:30 0 [Warning] InnoDB: Could not free any blocks in the buffer pool! 256 blocks are in use and 230 free. Consider increasing innodb_buffer_pool_size.
      2025-02-10  5:05:31 69 [Note] InnoDB: Cannot close file ./test/t1.ibd because of 6 pending operations and pending fsync
      2025-02-10  5:05:32 87 [Warning] Aborted connection 87 to db: 'test' user: 'root' host: 'localhost' (KILLED)
      2025-02-10  5:05:32 0 [Warning] InnoDB: Could not free any blocks in the buffer pool! 256 blocks are in use and 240 free. Consider increasing innodb_buffer_pool_size.
      2025-02-10  5:05:36 87 [Note] InnoDB: Online DDL : Start reading clustered index of the table and create temporary files
      2025-02-10  5:05:37 76 [Note] InnoDB: Cannot close file ./test/#sql-alter-184715-57.ibd because of 1 pending operations
      2025-02-10  5:05:37 76 [Warning] InnoDB: Failed to create FTS index table test/FTS_0000000000000a7a_0000000000000e24_INDEX_4
      2025-02-10  5:05:37 69 [Warning] Aborted connection 69 to db: 'test' user: 'root' host: 'localhost' (KILLED)
      2025-02-10  5:05:38 56 [Warning] InnoDB: Failed to create FTS index table test/FTS_0000000000000aa2_0000000000000e32_INDEX_2
      2025-02-10  5:05:38 87 [ERROR] InnoDB: (Lock structs have exhausted the buffer pool) while updating last doc id for table`test`.`#sql-alter-184715-57`
      2025-02-10  5:05:38 87 [Note] InnoDB: Online DDL : End of reading clustered index of the table and create temporary files
      2025-02-10 05:05:39 0x4aa1743dc6c0  InnoDB: Assertion failure in file /data/Server/10.6-MDEV-29445C/storage/innobase/trx/trx0trx.cc line 962
      InnoDB: Failing assertion: trx->error_state == DB_SUCCESS
      

      Attachments

        Issue Links

          Activity

            https://github.com/MariaDB/server/pull/3832 includes two fixes related to ER_LOCK_TABLE_FULL errors that occur during DDL on tables that contain FULLTEXT INDEX, as well as one error that I was able to reproduce with DBUG_EXECUTE_IF.

            marko Marko Mäkelä added a comment - https://github.com/MariaDB/server/pull/3832 includes two fixes related to ER_LOCK_TABLE_FULL errors that occur during DDL on tables that contain FULLTEXT INDEX , as well as one error that I was able to reproduce with DBUG_EXECUTE_IF .

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              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.