Skip to content
/ server Public

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

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

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
@vuvova
Copy link
Member

vuvova commented Feb 23, 2026

Thank you, @Mahmoud-kh1. Your PR made us think what other languages might be incorrect and we've done a complete comparison with https://unicode.org/cldr/charts/48/summary/root.html and hopefully fixed everything that was wrong.
See for example 1a88fa7.

As it fixed everything, it includes your ur_PK corrections too. Just to be extra sure, I've verified that https://unicode.org/cldr/charts/48/summary/ur.html matches your changes.

But it means we'll push the commit that fixes everything, not your PR, unfortunately. Thanks for the work though, it prompted us to do this.

@vuvova vuvova closed this Feb 23, 2026
@Mahmoud-kh1
Copy link
Author

Thank you, @Mahmoud-kh1. Your PR made us think what other languages might be incorrect and we've done a complete comparison with https://unicode.org/cldr/charts/48/summary/root.html and hopefully fixed everything that was wrong. See for example 1a88fa7.

As it fixed everything, it includes your ur_PK corrections too. Just to be extra sure, I've verified that https://unicode.org/cldr/charts/48/summary/ur.html matches your changes.

But it means we'll push the commit that fixes everything, not your PR, unfortunately. Thanks for the work though, it prompted us to do this.

Thanks, honestly knowing that my PR prompted you is more valuable to me than the merge itself.

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.

5 participants