Fix operator typo in || chain#5118
Open
ParadoxV5 wants to merge 1 commit into
Open
Conversation
There is a `,` breaking `Table_map_log_event::write_data_body()`’s `||` chain. This “comma operator” still connects the expressions, but if a step in the first sub-chain fails, the code will disregard the failure and continue with the second half-chain. This change was originally **unsolicitedly** suggested by Gemini; that is, I did not activate Gemini nor provide any prompt, but rather the CI-triggered Gemini comment came to me like junk mail. By verifying the bot output and creating this patch independently *without AI assistance*, I confirm I understand the change and can claim its authorship and responsibility, and *I remain have never provided AI-generated code*. Co-authored-by: gemini-code-assist <200291788+gemini-code-assist@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request corrects an error propagation issue in Table_map_log_event::write_data_body by replacing a comma operator with a logical OR operator, ensuring that failures in writing field metadata are correctly handled. The reviewer recommends adding a regression test to verify this error propagation logic and prevent potential binary log corruption.
| write_data(m_coltype, m_colcnt) || | ||
| write_data(mbuf, (size_t) (mbuf_end - mbuf)) || | ||
| write_data(m_field_metadata, m_field_metadata_size), | ||
| write_data(m_field_metadata, m_field_metadata_size) || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a
,breakingTable_map_log_event::write_data_body()’s||chain.This “comma operator” still connects the expressions, but if a step in the first sub-chain fails, the code will disregard the failure and continue with the second half-chain.
This change was originally unsolicitedly suggested by our new spambot in mariadb-corporation/MariaDBEnterprise#265; that is, I did not activate a bot nor provide any prompt, but rather the CI-triggered spambot comment came to me like junk mail.
By verifying the bot output and creating this patch independently without AI assistance, I confirm I understand the change and can claim its authorship and responsibility, and I remain have never provided AI-generated code.
This PR targets 10.6 in the name of stability improvement; I’m happy to retarget 10.11.
(Help me answer the very same spambot: Do I need to engineer a fault-injection test for this triviality as well?)