Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-22855 Assertion !field->prefix_len || field->fixed_len == field->prefix_len failed in btr_node_ptr_max_size #3222

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

Thirunarayanan
Copy link
Member

  • The Jira issue number for this PR is: MDEV-22855

Description

Problem:

  • InnoDB wrongly calulates the record size in btr_node_ptr_max_size() when prefix index of
    the column has to be stored externally.

Fix:

  • InnoDB should add the maximum field size to record size when the field is a fixed length one.

How can this PR be tested?

./mtr innodb.innodb-index

Basing the PR against the correct MariaDB version

  • This is a new feature and the PR is based against the latest MariaDB development branch.
  • 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

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@dr-m dr-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. The fix looks OK, but I would like to clarify it a little, because I do not remember where exactly the decision to store long CHAR as VARCHAR has been implemented.

storage/innobase/btr/btr0cur.cc Show resolved Hide resolved
mysql-test/suite/innodb/t/innodb-index.test Outdated Show resolved Hide resolved
…->prefix_len' failed in btr_node_ptr_max_size

Problem:
========
- InnoDB wrongly calulates the record size in
btr_node_ptr_max_size() when prefix index of
the column has to be stored externally.

Fix:
====
- InnoDB should add the maximum field size to
record size when the field is a fixed length one.
@dr-m dr-m merged commit a586b6d into 10.4 Apr 29, 2024
9 of 13 checks passed
@dr-m dr-m deleted the 10.4-MDEV-22855 branch April 29, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants