server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-36017 Alter table aborts when temporary directory is full

Open Thirunarayanan opened this issue 8 months ago • 1 comments

  • [x] The Jira issue number for this PR is: MDEV-36017

Description

Problem:

  • In 10.11, During Copy algorithm, InnoDB does use bulk insert for row by row insert operation. When temporary directory ran out of memory, row_mysql_handle_errors() fails to handle DB_TEMP_FILE_WRITE_FAIL.

  • During inplace algorithm, concurrent DML fails to write the log operation into the temporary file. InnoDB fail to mark the error for the online log.

Fix:

row_mysql_handle_errors(): Rollback the transaction when InnoDB encounters DB_TEMP_FILE_WRITE_FAIL

convert_error_code_to_mysql(): Report an aborted transaction when InnoDB encounters DB_TEMP_FILE_WRITE_FAIL

row_log_online_op(): Mark the error in online log when InnoDB ran out of temporary space

How can this PR be tested?

./mtr innodb.alter_temp_fail

Basing the PR against the correct MariaDB version

  • [ ] This is a new feature or a refactoring, and the PR is based against the main branch.
  • [x] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

Thirunarayanan avatar Mar 20 '25 10:03 Thirunarayanan