Skip to content

MDEV-41684: Embedded: prepared TIME parameter reports column length 16 instead of 23 - #5967

Closed
Omar-Abdo1 wants to merge 1 commit into
MariaDB:12.3from
Omar-Abdo1:MDEV-41684-embedded-time
Closed

Omar-Abdo1 wants to merge 1 commit into
MariaDB:12.3from
Omar-Abdo1:MDEV-41684-embedded-time

Conversation

@Omar-Abdo1

Copy link
Copy Markdown

Description

The embedded server used MAX_TIME_WIDTH (16) 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.

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 a TIME parameter and verifies that the metadata returns the correct length. The test passes on both the standard server and the embedded server (--embedded-server).

…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>
@Omar-Abdo1

Copy link
Copy Markdown
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

@Omar-Abdo1 Omar-Abdo1 closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant