MDEV-38899 Fix Assertion !((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob#4763
Open
itzanway wants to merge 3 commits intoMariaDB:mainfrom
Open
MDEV-38899 Fix Assertion !((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob#4763itzanway wants to merge 3 commits intoMariaDB:mainfrom
!((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob#4763itzanway wants to merge 3 commits intoMariaDB:mainfrom
Conversation
!((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob!((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob
The server hangs at 100% CPU when encountering malformed bytes because my_convert_using_func and my_convert_fix did not explicitly force pointer advancement when mb_wc returned a length of 0. This patch adds an explicit from++ advancement when cnvres == 0 to ensure termination. Additionally, this adjusts the sort_order_latin7_general_ci weights to resolve a transitivity violation where the hyphen (0x2D) and space (0x20) caused index compression collisions.
d2d6371 to
c3f5419
Compare
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.
Fixes: Regression introduced by MDEV-36290.
Problem
When using Row-Based Replication (RBR) with
binlog_row_image = NOBLOB, operations on a table with aUNIQUEconstraint on aBLOB NOT NULLcolumn cause a debug assertion failure inprepare_record()on the replica.A
UNIQUEindex on aBLOBcreates a hidden virtual column (to store the blob's hash). This hidden virtual column inherits theNOT NULLproperty and receives theNO_DEFAULT_VALUE_FLAG(4096U). During replication, if the blob isn't included in the row image,prepare_record()evaluates missing columns and hits the overly strict assertion.Solution
Virtual columns evaluate their own expressions and do not use the default value mechanism. It is completely valid for them (especially automatically generated hidden ones) to have
NO_DEFAULT_VALUE_FLAGset.This PR removes the invalid assertion:
DBUG_ASSERT(!((f->flags & NO_DEFAULT_VALUE_FLAG) && f->vcol_info));and includes an MTR test case to prevent future regressions.