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 |
|
Now this starts to smell. 10.2
10.0
Originally the column does not have DEFAULT value set at all! Basically table exported from 10.2 will not work in a same way on MariaDB 10.0 or MySQL servers. |
| Comments |
| Comment by Nemanja Stambolic [ 2018-02-24 ] | ||
|
Furthermore, this only seems to apply for text columns which are defined NULL-able, while NOT-NULL-able text columns and varchar columns share same behavior with 10.0 series. Same on both 10.2 and 10.0
Same on both 10.2 and 10.0
Now that's a mess. | ||
| Comment by Ian Gilfillan [ 2018-02-24 ] | ||
|
From MariaDB 10.2.1, BLOB and TEXT fields can have a DEFAULT value. The behaviour is unchanged, but the DEFAULT is now explicitly specified, as is preferable. The specification is now the same as for all other types. NOT NULL fields without a default will obviously fail or give a warning, depending on the strict mode, as they always have. In an unrelated change, 10.2 has also changed to strict mode by default. | ||
| Comment by Nemanja Stambolic [ 2018-03-13 ] | ||
|
Thanks for clarification. I think this deserves to be documented. | ||
| Comment by Ian Gilfillan [ 2018-03-14 ] | ||
|
Added to https://mariadb.com/kb/en/library/show-create-table/ and https://mariadb.com/kb/en/library/incompatibilities-and-feature-differences-between-mariadb-102-and-mysql-57/ |