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

YEAR column is not compatible with MySQL #12615

Closed
cyliu0 opened this issue Oct 11, 2019 · 2 comments · Fixed by #12715
Closed

YEAR column is not compatible with MySQL #12615

cyliu0 opened this issue Oct 11, 2019 · 2 comments · Fixed by #12715
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/bug The issue is confirmed as a bug. type/compatibility

Comments

@cyliu0
Copy link
Contributor

cyliu0 commented Oct 11, 2019

Bug Report

This PR #9856 fixed part of the issue. But we may need more fix.

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
mysql> create table t (y year);
Query OK, 0 rows affected (0.01 sec)

mysql> insert ignore into t values(2156);
Query OK, 1 row affected, 1 warning (0.01 sec)
  1. What did you expect to see?
    On MySQL:
mysql> select * from t;
+------+
| y    |
+------+
| 0000 |
+------+
1 row in set (0.00 sec)
  1. What did you see instead?
    On TIDB:
mysql> select * from t;
+------+
| y    |
+------+
| NULL |
+------+
1 row in set (0.00 sec)
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-alpha-459-gebc122bb4
Git Commit Hash: ebc122bb48355149a8a18963f28e8d4e85e65551
Git Branch: master
UTC Build Time: 2019-10-11 03:10:45
GoVersion: go version go1.12.9 darwin/amd64
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
@cyliu0 cyliu0 added the type/bug The issue is confirmed as a bug. label Oct 11, 2019
@lzmhhh123
Copy link
Contributor

@cyliu0 Thank you for your report. Do you have any interest to fix it?

@shenli shenli added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Oct 13, 2019
@cyliu0
Copy link
Contributor Author

cyliu0 commented Oct 14, 2019

@cyliu0 Thank you for your report. Do you have any interest to fix it?

Sure. Let me have a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/bug The issue is confirmed as a bug. type/compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants