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

sql_mode ALLOW_INVALID_DATES is not supported #8263

Closed
morgo opened this issue Nov 11, 2018 · 0 comments · Fixed by #9027
Closed

sql_mode ALLOW_INVALID_DATES is not supported #8263

morgo opened this issue Nov 11, 2018 · 0 comments · Fixed by #9027

Comments

@morgo
Copy link
Contributor

morgo commented Nov 11, 2018

Feature Request

Is your feature request related to a problem? Please describe:

Relates to #2738 - currently ALLOW_INVALID_DATES is not supported. It is not commonly used, but could be useful for compatibility.

Describe the feature you'd like:

# testcase
CREATE TABLE d1 (d DATE);
SET sql_mode='STRICT_TRANS_TABLES,ALLOW_INVALID_DATES';
INSERT INTO d1 VALUES ('2010-00-01');

Passes in MySQL, produces this in TiDB:

MySQL [test]> SET sql_mode='STRICT_TRANS_TABLES,ALLOW_INVALID_DATES';
ERROR 1105 (HY000): ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'ALLOW_INVALID_DATES'
MySQL [test]> INSERT INTO d1 VALUES ('2010-00-01');
ERROR 1292 (22007): Incorrect datetime value: '2010-00-01'

Describe alternatives you've considered:
Possible to document as unsupported.

Teachability, Documentation, Adoption, Migration Strategy:
Improves compatibility with MySQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant