Skip to content
/ server Public

Comments

MDEV-38583 : Fix TO_DATE Urdu parsing mismatch with Oracle#4649

Open
Mahmoud-kh1 wants to merge 2 commits intoMariaDB:12.3from
Mahmoud-kh1:fix-urdu-parsing
Open

MDEV-38583 : Fix TO_DATE Urdu parsing mismatch with Oracle#4649
Mahmoud-kh1 wants to merge 2 commits intoMariaDB:12.3from
Mahmoud-kh1:fix-urdu-parsing

Conversation

@Mahmoud-kh1
Copy link

@Mahmoud-kh1 Mahmoud-kh1 commented Feb 13, 2026

The problem :
previously, TO_DATE() would return NULL when using Urdu month or day names
image

The bug :
I found the bug is a mismatch for certain characters in days and months
error_in_maira_parsing_dates

Key changes :

  • fixed the harded coded words by replacing all with standard urdu and shows the hexa to ensure it's correct
  • added test to verify the query run without any problem and hexa based testing to ensure there is no typo or mismatching characters.

Now it works as intended
fixErrorDate

issue ID:
MDEV-38583

@grooverdan grooverdan added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Feb 16, 2026
@gkodinov gkodinov self-assigned this Feb 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.
Couple of things:

  • Please add a better commit message that according to the coding standard: describes what the issue is, how it was fixed and how it was tested.
  • I do not see the CLA bot confirmation. Please rectify this
  • I would add some HEX codes into the tests to make sure the relevant encoded texts (day names) are spelled correctly.

@Mahmoud-kh1
Copy link
Author

Mahmoud-kh1 commented Feb 16, 2026

Thank you for your contribution. This is a preliminary review. Couple of things:

* Please add a better commit message that according to the coding standard: describes what the issue is, how it was fixed and how it was tested.

* I do not see the CLA bot confirmation. Please rectify this

* I would add some HEX codes into the tests to make sure the relevant encoded texts (day names) are spelled correctly.

I fixed the tests and description of pr and commit message , for the CLA bot I don't know what's the problem exactly but its check passes here
image

… Nulls

Issue: Wrong months names and days was written in Arabic instead of Urdu caused TO_DATE() parsing failures.

Fix: Update months names and days to be standard Urdu.

Test: Added tests to verfiy the fix also with HEX validation.
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! LGTM. Please stand by for the final review.

@gkodinov gkodinov requested a review from abarkov February 20, 2026 10:46
Copy link
Contributor

@abarkov abarkov left a comment

Choose a reason for hiding this comment

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

The patch looks correct for me.
The new locale data matches Unicode Locale Data at:
https://github.com/unicode-org/cldr/blob/main/common/main/ur.xml

Can you please backport the patch to 12.3, so we merge it into the earliest version which supports TO_DATE() - since 12.3.1.

Another option would be to backport to 10.6, but this will need rewritting tests using STR_TO_DATE() instead of TO_DATE().

Thanks.

@Mahmoud-kh1 Mahmoud-kh1 changed the base branch from main to 12.3 February 20, 2026 11:37
@Mahmoud-kh1
Copy link
Author

The patch looks correct for me. The new locale data matches Unicode Locale Data at: https://github.com/unicode-org/cldr/blob/main/common/main/ur.xml

Can you please backport the patch to 12.3, so we merge it into the earliest version which supports TO_DATE() - since 12.3.1.

Another option would be to backport to 10.6, but this will need rewritting tests using STR_TO_DATE() instead of TO_DATE().

Thanks.

done , I backport it to 12.3

@gkodinov gkodinov requested a review from abarkov February 20, 2026 11:45
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.

4 participants