10.2+ Integer DEFAULT values missing quotes
(MDEV-15377)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Server |
| Affects Version/s: | 10.2 |
| Fix Version/s: | N/A |
| Type: | Technical task | Priority: | Minor |
| Reporter: | Nemanja Stambolic | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
GNU/Linux |
||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Another linked discrepancy on this matter. 10.0
10.2
What is the background on this one? Standards compliance or it's nicer to use functions instead of built-in constants? |
| Comments |
| Comment by Nemanja Stambolic [ 2018-03-08 ] | ||||||||||||||||||
|
Any comment on this? | ||||||||||||||||||
| Comment by Ian Gilfillan [ 2018-03-13 ] | ||||||||||||||||||
|
serg can you comment on why this change was made? | ||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-03-13 ] | ||||||||||||||||||
|
It was a side effect, in a way. In earlier versions, the default could be either a constant or CURRENT_TIMESTAMP. Now it's just an expression, so the default value is printed like any expression is. See how CURRENT_TIMESTAMP is printed elsewhere:
Now CURRENT_TIMESTAMP is consistently printed everywhere. In earlier versions, the sequence of letters "DEFAULT CURRENT_TIMESTAMP" was hard-coded, so CURRENT_TIMESTAMP was printed differently in DEFAULT as compared to all other cases. | ||||||||||||||||||
| Comment by Elena Stepanova [ 2018-03-13 ] | ||||||||||||||||||
|
greenman, I think this is one of the questions (and answers) that deserve to be added to FAQ. | ||||||||||||||||||
| Comment by Ian Gilfillan [ 2018-04-15 ] | ||||||||||||||||||
|
Documented in https://mariadb.com/kb/en/library/now/ |