[MDEV-6880] Can't define CURRENT_TIMESTAMP as default value for added column Created: 2014-10-16 Updated: 2015-06-30 Resolved: 2014-11-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 5.1.67, 5.2.14, 5.3.12, 5.5.40, 10.0.14 |
| Fix Version/s: | 10.0.15 |
| Type: | Bug | Priority: | Major |
| Reporter: | Mikhail Gavrilov | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux |
||
| Issue Links: |
|
||||||||
| Description |
|
Can't define CURRENT_TIMESTAMP as default value for added column
Expected that d1 filled with CURRENT_TIMESTAMP values instead '0000-00-00 00:00:00' because '0000-00-00 00:00:00' is incorrect for this filed value. I can prove it:
OR
|
| Comments |
| Comment by Elena Stepanova [ 2014-10-16 ] | |||||||||||||||||||||||||||||||
|
The problem has a history. | |||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-11-12 ] | |||||||||||||||||||||||||||||||
|
We even have a test case for this. But it's for MyISAM, where is succeeds. When I tried It failed for InnoDB. | |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-06-29 ] | |||||||||||||||||||||||||||||||
|
Tested with 10.1.5, InnoDB fails differently but after fix both refuse to set constant default.
| |||||||||||||||||||||||||||||||
| Comment by Mikhail Gavrilov [ 2015-06-29 ] | |||||||||||||||||||||||||||||||
|
Jan, please try InnoDB engine. | |||||||||||||||||||||||||||||||
| Comment by Mikhail Gavrilov [ 2015-06-29 ] | |||||||||||||||||||||||||||||||
|
I've just test this example on MariaDB 10.1.5 with InnoDB engine, and I see that error is present. | |||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-06-30 ] | |||||||||||||||||||||||||||||||
|
True, I have not yet pushed my fix for InnoDB/XtraDB, |