-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
inconsistent result with MySQL for comparing datetime with invalid value #13157
Comments
Another interesting finding related to this problem:
while in MySQL:
Looks like MySQL's behavior is inconsistent with itself when using user defined variables. |
MySQL 8.0 has a different behavior here (and is at least consistent between both examples): mysql [localhost:8021] {msandbox} (test) > execute stmt2 using @p0;
ERROR 1525 (HY000): Incorrect DATETIME value: 'EWJ77aX7t'
mysql [localhost:8021] {msandbox} (test) > SELECT (col_datetime <= @p0) AS res FROM t;
ERROR 1525 (HY000): Incorrect DATETIME value: 'EWJ77aX7t' It might be easiest to follow MySQL 8.0 behavior here, since MySQL 5.7 is inconsistent? |
Related to #17868. Actually I also tested the test case of the issue with |
/pick-up |
Pick up success. |
test in mysql 8.0: case1: the related doc from mysql
some analysis:
|
@blueseason You did not submit PR within 7 days, so give up automatically. |
I think it's a compatibility problem. MySQL would return an error, while TiDB returns a warning. |
@wjhuang2016 Please discuss the conclusion with @jebter |
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
In TiDB:
while in MySQL:
Same result.
Different result.
tidb-server -V
or runselect tidb_version();
on TiDB)?SIG slack channel
#sig-exec
Score
Mentor
The text was updated successfully, but these errors were encountered: