[MDEV-19725] Incorrect error handling in ALTER TABLE Created: 2019-06-10  Updated: 2019-06-11  Resolved: 2019-06-10

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.7, 10.3.1
Fix Version/s: 10.3.7, 10.2.25

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: error

Issue Links:
Duplicate
duplicates MDEV-15895 Innodb cleanup : use pfs_os_file_t f... Closed
Relates
relates to MDEV-19231 make DB_SUCCESS equals 0 Closed

 Description   

Some I/O functions and macros that are declared in os0file.h used to return a Boolean status code (nonzero on success). In MySQL 5.7, they were changed to return dberr_t instead. Alas, in MariaDB, some uses of functions were not adjusted to the changed return value.

Until MDEV-19231, the valid values of dberr_t were always nonzero. This means that some code that was incorrectly checking for a zero return value from the functions would never detect a failure.

After MDEV-19231, some tests for ALTER ONLINE TABLE would fail with cmake -DPLUGIN_PERFSCHEMA=OFF. It turned out that the wrappers pfs_os_file_read_no_error_handling_int_fd_func() and pfs_os_file_write_int_fd_func() were wrongly returning bool instead of dberr_t. Also the callers of these functions were wrongly expecting bool (nonzero on success) instead of dberr_t.

This mistake had been made when the addition of these functions was merged from MySQL 5.6.36 and 5.7.18, in MariaDB Server 10.2.7.



 Comments   
Comment by Marko Mäkelä [ 2019-06-11 ]

MDEV-15895 in MariaDB Server 10.3.7 removed the int_fd functions that had been introduced via MySQL 5.6.36.

Generated at Thu Feb 08 08:53:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.