Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-31334: Consider dates ending in 'T' as malformed #3788

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FarihaIS
Copy link

@FarihaIS FarihaIS commented Jan 23, 2025

Description

MariaDB 10.6 currently accepts dates that end in 'T' without a warning or error: for example 'insert into t1 values ("2003-02-05T")'. This is an issue as ISO 8601 standards state that a 'T' should be followed by the time of day. Dates that terminate in 'T' should receive the same error in strict mode and warning otherwise as dates that terminate in any other (invalid) character. Commit includes bug fix and tests for dates ending in 'T'.

How can this PR be tested?

Execute the main suite in mysql-test-run. This commit adds a test in that suite.

Basing the PR against the correct MariaDB version

  • This is a new feature and the PR is based against the latest MariaDB development branch

Backward compatibility

This is a new feature introducing stricter date formatting that will consider dates ending in 'T' as malformed and affect backwards compatibility.

Copyright

All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.

According to ISO 8601 standard, 'T' should be followed by the time of
day. If a date ends with only 'T', throw an error in strict mode and a
warning in other modes.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants