Skip to content
/ server Public

MDEV-37792 MSAN: use-of-uninitialized-value on DELETE from sequence t…#4843

Open
Olernov wants to merge 1 commit into11.4from
11.4-MDEV-37792-msan
Open

MDEV-37792 MSAN: use-of-uninitialized-value on DELETE from sequence t…#4843
Olernov wants to merge 1 commit into11.4from
11.4-MDEV-37792-msan

Conversation

@Olernov
Copy link
Contributor

@Olernov Olernov commented Mar 23, 2026

…able

SEQUENCE is a pseudo-engine intended to produce sequential numbers. This engine has HTON_HIDDEN flag, and optimizer costs for such engines are zeroed and marked with MEM_UNDEFINED() macro.

However, some code paths still examine optimizer costs during execution of queries involving SEQUENCE tables. For example, deletion from a sequence table, despite being invalid, still evaluates costs of access to the table before producing an error. This makes MSAN trigger on the error "use-of-uninitialized-value".

Not to overcomplicate the logic for handling such scenarios, this patch simply removes MEM_UNDEFINED() macro for engines with HTON_HIDDEN flag.

…able

SEQUENCE is a pseudo-engine intended to produce sequential numbers.
This engine has HTON_HIDDEN flag, and optimizer costs for such engines
are zeroed and marked with MEM_UNDEFINED() macro.

However, some code paths still examine optimizer costs during
execution of queries involving SEQUENCE tables. For example,
deletion from a sequence table, despite being invalid, still evaluates
costs of access to the table before producing an error. This makes
MSAN trigger on the error "use-of-uninitialized-value".

Not to overcomplicate the logic for handling such scenarios,
this patch simply removes MEM_UNDEFINED() macro for engines with
HTON_HIDDEN flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant