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 |
|
Just when I thought that INFORMATION_SCHEMA returns proper default values which could be used across different MariaDB server versions....
10.2:
10.0
So we have different results depending on the context (INFORMATION_SCHEMA vs. SHOW CREATE TABLE...). What a mess. |
| Comments |
| Comment by Sergei Golubchik [ 2018-02-22 ] | |
|
Yes. We started looking at this because of the new support for arbitrary expressions in DEFAULT. Like
Printing defaults without quotes in the INFORMATION_SCHEMA.COLUMNS is not able to distinguish between the two different defaults. So we looked at the SQL standard, and it turned out that it says that INFORMATION_SCHEMA.COLUMNS should print strings in default values quoted! Apparently when MySQL was implementing INFORMATION_SCHEMA.COLUMNS, someone misread the standard. We fixed that bug and it removed the ambiguity in UUID() vs 'UUID()'. | |
| Comment by Nemanja Stambolic [ 2018-02-23 ] | |
|
Thanks for info. I guess there's also no flag to get the old style back at least for INFORMATION_SCHEMA usage? | |
| Comment by Ian Gilfillan [ 2018-03-13 ] | |
|
Documented in https://mariadb.com/kb/en/library/incompatibilities-and-feature-differences-between-mariadb-102-and-mysql-57/#incompatibilities, was already in https://mariadb.com/kb/en/library/information-schema-columns-table/ | |
| Comment by Nemanja Stambolic [ 2018-03-13 ] | |
|
Good. Thanks. |