Skip to content

Cherry pick #80791 to 25.3: Fix bitNot() for String to return a zero-terminated string#80819

Merged
robot-ch-test-poll2 merged 2 commits intobackport/25.3/80791from
cherrypick/25.3/80791
May 26, 2025
Merged

Cherry pick #80791 to 25.3: Fix bitNot() for String to return a zero-terminated string#80819
robot-ch-test-poll2 merged 2 commits intobackport/25.3/80791from
cherrypick/25.3/80791

Conversation

@robot-ch-test-poll2
Copy link
Copy Markdown
Contributor

Original pull-request #80791

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Note

This pull-request will be merged automatically. Please, do not merge it manually (but if you accidentally did, nothing bad will happen).

Troubleshooting

If the PR was manually reopened after being closed

If this PR is stuck (i.e. not automatically merged after one day), check #80791 for pr-backports-created label and delete it.

Manually merging will do nothing. The pr-backports-created label prevents the original PR #80791 from being processed.

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the original PR #80791 for pr-backports-created, and delete if it's presented there

The PR source

The PR is created in the CI job

azat added 2 commits May 25, 2025 17:13
Previuosly, due to bitNot() ignores row boundaries, it inverts the NUL
byte as well, but some code relies on the fact that String are NUL
terminated, i.e. the following will fail in debug build:

    SELECT hex(any(bitNot('foo')))

With chassert() from StringValueCompatibility::getDataAtWithTerminatingZero():

    Logical error: 'res.data[res.size] == '\0'

Restore NUL byte after the inversion.
Fix bitNot() for String to return a zero-terminated string
@robot-ch-test-poll2 robot-ch-test-poll2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels May 26, 2025
@robot-ch-test-poll2 robot-ch-test-poll2 merged commit c2753c2 into backport/25.3/80791 May 26, 2025
73 of 80 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 deleted the cherrypick/25.3/80791 branch May 26, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants