server icon indicating copy to clipboard operation
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

Open Weijun-H opened this issue 1 year ago • 2 comments

  • [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

Weijun-H avatar Mar 03 '23 12:03 Weijun-H

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 03 '23 12:03 CLAassistant

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?

keeper avatar Feb 22 '24 23:02 keeper