Repository navigation
MDEV-41684: Embedded: prepared TIME parameter reports column length 16 instead of 23 - #5967
Closed
Omar-Abdo1 wants to merge 1 commit into
Closed
Omar-Abdo1 wants to merge 1 commit into
Omar-Abdo1 wants to merge 1 commit into
Conversation
…6 instead of 23 The embedded server used MAX_TIME_WIDTH instead of MAX_TIME_FULL_WIDTH when setting the column length metadata for a prepared TIME parameter. This caused the metadata to report an incorrect length compared to the normal server. Fix: Change MAX_TIME_WIDTH to MAX_TIME_FULL_WIDTH in the embedded Item_param::set_param_time. Signed-off-by: OmarAbdo <omargamer10a@gmail.com>
Author
|
Closing this PR. I was able to apply the one-line fix (MAX_TIME_WIDTH -> MAX_TIME_FULL_WIDTH) and it resolves the issue, but I ran into significant difficulties setting up and verifying the embedded server test environment locally in 10.11 (MTR symlink issues, missing embedded binaries). I am leaving this for a maintainer or a contributor with a more stable embedded build setup. The proposed fix in the JIRA description is correct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The embedded server used
MAX_TIME_WIDTH(16) instead ofMAX_TIME_FULL_WIDTHwhen setting the column length metadata for a preparedTIMEparameter. This caused the metadata to report an incorrect length compared to the normal server.Fix: Change
MAX_TIME_WIDTHtoMAX_TIME_FULL_WIDTHin the embeddedItem_param::set_param_time.JIRA Ticket
https://jira.mariadb.org/browse/MDEV-41684
Test Coverage
A regression test is added in
mysql-test/main/mdev_41684.test. It prepares a statement with aTIMEparameter and verifies that the metadata returns the correct length. The test passes on both the standard server and the embedded server (--embedded-server).