[MDEV-19231] make DB_SUCCESS equals 0 Created: 2019-04-10  Updated: 2019-06-10  Resolved: 2019-04-25

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.2.24, 10.3.15, 10.4.5

Type: Bug Priority: Major
Reporter: Eugene Kosov (Inactive) Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-19725 Incorrect error handling in ALTER TABLE Closed

 Description   

This will make code like if ( err == DB_SUCCESS) work a bit faster because CPUs have instructions to check for zero fast.



 Comments   
Comment by Marko Mäkelä [ 2019-04-28 ]

This cleanup revealed that a few calls to os_file_read() in MariaDB and Mariabackup 10.2 had not been adjusted to the change of the return type from Boolean to dberr_t. In 10.3, also some calls to os_file_write() were incorrect. This means that errors from these calls were being effectively ignored. That was fixed as part of applying the cleanup.

Comment by Marko Mäkelä [ 2019-04-29 ]

In 10.4, MDEV-12026 introduced one more misuse of os_file_read() in mariabackup’s xb_assign_undo_space_start(). That was caught in the merge.

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