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

NO_ZERO_IN_DATE does not work in default value #24165

Closed
tangenta opened this issue Apr 20, 2021 · 2 comments · Fixed by #24174
Closed

NO_ZERO_IN_DATE does not work in default value #24165

tangenta opened this issue Apr 20, 2021 · 2 comments · Fixed by #24174
Labels
severity/major type/bug The issue is confirmed as a bug.

Comments

@tangenta
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

set @@sql_mode = (select replace(@@sql_mode,'NO_ZERO_IN_DATE',''));
set @@sql_mode = (select replace(@@sql_mode,'NO_ZERO_DATE',''));
create table t (a datetime default '2999-00-00 00:00:00');

2. What did you expect to see? (Required)

Query OK, 0 rows affected (0.04 sec)

3. What did you see instead (Required)

ERROR 1067 (42000): Invalid default value for 'a'

4. What is your TiDB version? (Required)

master 53c5d6e4656658c0e844f62a3e1d2ece74d50671

@tangenta tangenta added the type/bug The issue is confirmed as a bug. label Apr 20, 2021
@summer9989
Copy link

Marked , via : https://asktug.com/t/topic/69720/5

wait new version

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants