server
server copied to clipboard
MDEV-24931: Assertion `prefix_size <= width' failed in Bitmap<width>::is_prefix(uint) & UBSAN: shift exponent 32 is too large for 32-bit type 'int' in generate_derived_keys_for_table
- [x] The Jira issue number for this PR is: MDEV-24931
Description
How can this PR be tested?
The test is append to join.test
Basing the PR against the correct MariaDB version
- [ ] This is a new feature and the PR is based against the latest MariaDB development branch
- [x] This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
Hi @Weijun-H , could you elaborate more on why does it make more sense using DBUG_ASSERT(idx <= ARRAY_ELEMENTS);
to check the boundary of the prefix in your commit log?
Also in your commit log stated that this commit also fix a potential UB but I believe the issue still exists in https://github.com/MariaDB/server/blob/70be59913c90e93fe5136d6f6df03c4254aa515d/sql/sql_select.cc#L13035, could you also verify that?