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

Incorrect weekday behaviour #10835

Closed
breezewish opened this issue Jun 18, 2019 · 3 comments
Closed

Incorrect weekday behaviour #10835

breezewish opened this issue Jun 18, 2019 · 3 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/bug The issue is confirmed as a bug.

Comments

@breezewish
Copy link
Member

Bug Report

set sql_mode = 'ALLOW_INVALID_DATES';

create table t (col datetime);

insert into t values ('2004-04-31');

select weekday(col) from t;

MySQL:

mysql> select weekday(col) from t;
+--------------+
| weekday(col) |
+--------------+
|            5 |
+--------------+
1 row in set (0.00 sec)

TiDB:

mysql> select weekday(col) from t;
+--------------+
| weekday(col) |
+--------------+
|            6 |
+--------------+
1 row in set (0.00 sec)
@ngaut ngaut added type/bug The issue is confirmed as a bug. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Jun 19, 2019
@Ishiihara
Copy link

@ngaut @breeswish Can you assign this issue to me?

@Deardrops Deardrops assigned Ishiihara and unassigned Ishiihara Jun 27, 2019
@Deardrops
Copy link
Contributor

@Ishiihara you could review the PR #10864 for this issue.

@zz-jason
Copy link
Member

fixed by #10864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

5 participants