Skip to content

MDEV-41220: GROUP_CONCAT(expr ORDER BY col) mis-sorts where col is NULL - #5704

Open
MikeWang000000 wants to merge 1 commit into
MariaDB:10.11from
MikeWang000000:MDEV-41220-10.11
Open

MikeWang000000 wants to merge 1 commit into
MariaDB:10.11from
MikeWang000000:MDEV-41220-10.11

Conversation

@MikeWang000000

Copy link
Copy Markdown

The sort keys were built from the record minus its NULL bytes, and the comparators never looked at the NULL bits, so a NULL ORDER BY value was compared against stale bytes left in the record by the previous row.

Store the whole record, NULL bytes included, as the key, and let the comparators handle NULLs themselves. The now-redundant *_with_nulls variants and the helpers that selected between them are removed.

The sort keys were built from the record minus its NULL bytes, and the
comparators never looked at the NULL bits, so a NULL ORDER BY value was
compared against stale bytes left in the record by the previous row.

Store the whole record, NULL bytes included, as the key, and let the
comparators handle NULLs themselves. The now-redundant *_with_nulls
variants and the helpers that selected between them are removed.
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