Skip to content
/ server Public

MDEV-38144: update Optional_metadata_fields to use MariaDB types#4720

Open
EricHayter wants to merge 1 commit intoMariaDB:mainfrom
EricHayter:mdev-38144
Open

MDEV-38144: update Optional_metadata_fields to use MariaDB types#4720
EricHayter wants to merge 1 commit intoMariaDB:mainfrom
EricHayter:mdev-38144

Conversation

@EricHayter
Copy link

Currently Optional_metadata_fields has many members that use classes from the C++ standard library, most notably the use of std::vector and std::string. These members have been updated to use existing MariaDB types instead.

@EricHayter
Copy link
Author

Running .clangformat seemed to add lots of line changes. Working on providing a separate commit just with the main changes to make review easier.

Currently Optional_metadata_fields has many members that use classes
from the C++ standard library, most notably the use of std::vector and
std::string. These members have been updated to use existing MariaDB
types instead.
@grooverdan grooverdan requested a review from bnestere March 2, 2026 21:35
@grooverdan
Copy link
Member

Running .clangformat seemed to add lots of line changes. Working on providing a separate commit just with the main changes to make review easier.

I think it was determined that the coding standard wasn't acheivable with clang-format. I'm not sure if worth the effort.

@grooverdan grooverdan added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 2, 2026
Copy link
Contributor

@bnestere bnestere left a comment

Choose a reason for hiding this comment

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

Hi @EricHayter !

Thank you for submitting the PR! It is good to update our types to be consistent with MariaDB types. One thing this PR misses, that is in the description of MDEV-38144, is that rather than having an array per field, it would be better to have one array that has elements of a complex type which describe a field.

Previously, another contributor had prepared a patch, PR #4494, which looked to satisfy this; however, it was never thoroughly reviewed because they never got it to compile / pass tests on our CI system. I'd suggest looking through it for some inspiration (though I'm not sure of the quality of it).

Something the previous patch didn't try (though the JIRA mentions) is to use the Column_definition type defined in sql/field.h. That would be another improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

3 participants