Skip to content
/ server Public

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
itzanway:fix-mdev-36290-assert
Open

MDEV-38899 Fix Assertion !((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob#4763
itzanway wants to merge 3 commits intoMariaDB:mainfrom
itzanway:fix-mdev-36290-assert

Conversation

@itzanway
Copy link

@itzanway itzanway commented Mar 9, 2026

Fixes: Regression introduced by MDEV-36290.

Problem

When using Row-Based Replication (RBR) with binlog_row_image = NOBLOB, operations on a table with a UNIQUE constraint on a BLOB NOT NULL column cause a debug assertion failure in prepare_record() on the replica.

A UNIQUE index on a BLOB creates a hidden virtual column (to store the blob's hash). This hidden virtual column inherits the NOT NULL property and receives the NO_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_FLAG set.

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.

@itzanway itzanway changed the title Fix Assertion !((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob MDEV-38899 Fix Assertion !((f->flags & 4096U) && f->vcol_info) upon RBR with NOBLOB and unique blob Mar 9, 2026
itzanway added 2 commits March 9, 2026 22:35
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.
@itzanway itzanway force-pushed the fix-mdev-36290-assert branch from d2d6371 to c3f5419 Compare March 9, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant