Skip to content
/ server Public

MDEV-38792: Fix inconsistent separator treatment in TO_DATE#4811

Open
alexDiaconuAlex wants to merge 1 commit intoMariaDB:12.3from
alexDiaconuAlex:MDEV-38792-fix-final-12.3
Open

MDEV-38792: Fix inconsistent separator treatment in TO_DATE#4811
alexDiaconuAlex wants to merge 1 commit intoMariaDB:12.3from
alexDiaconuAlex:MDEV-38792-fix-final-12.3

Conversation

@alexDiaconuAlex
Copy link

@alexDiaconuAlex alexDiaconuAlex commented Mar 15, 2026

Fixed MDEV-38792: Added a loop to skip non-alphanumeric separators in TO_DATE, ensuring flexible data parsing matching Oracle's expected behavior.

Reported-by: Elena Stepanova elenastepanova@github

@alexDiaconuAlex alexDiaconuAlex force-pushed the MDEV-38792-fix-final-12.3 branch 2 times, most recently from 8bd25e4 to e196a0d Compare March 15, 2026 17:45
@alexDiaconuAlex alexDiaconuAlex force-pushed the MDEV-38792-fix-final-12.3 branch from e196a0d to 9748047 Compare March 15, 2026 19:10
@grooverdan
Copy link
Member

prelim review - #general > MDEV-31535 @ 💬

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 16, 2026
Copy link
Member

@gkodinov gkodinov 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 for your contribution! This is a preliminary review.

Please add a commit message that compiles with CODING_STANDARDS.md.

@gkodinov
Copy link
Member

Also, please fix all the buildbot failures. compat/oracle.func_to_date looks related.

@alexDiaconuAlex alexDiaconuAlex force-pushed the MDEV-38792-fix-final-12.3 branch from 9748047 to 8edef52 Compare March 17, 2026 12:30
This patch adds logic to skip non-alphanumeric characters in the
date string before matching the next token. It specifically
safeguards the '-' sign only when the expected format is SYYYY
to preserve negative year parsing, and resets the part_of_digits
flag when separators are skipped to allow flexible length parsing.

Reported-by: Elena Stepanova <elenastepanova@github>

Signed-off-by: Alexandru Diaconu <alexandrudiaconu93@gmail.com>
@alexDiaconuAlex alexDiaconuAlex force-pushed the MDEV-38792-fix-final-12.3 branch from 8edef52 to 4ba0a2f Compare March 17, 2026 12:55
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