Details
-
Technical task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.2(EOL)
-
None
-
GNU/Linux
Description
Just when I thought that INFORMATION_SCHEMA returns proper default values which could be used across different MariaDB server versions....
- Numbers are now just fine (e.g. not quoted) on both 10.0 and 10.2
- But now textual columns (varchar, text...) are quoted and only IF they contain some default value (even empty string) on 10.2+ only
10.2:
+--------------+---------------+-------------+-------------+------------------+----------------+
|
| TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | ORDINAL_POSITION | COLUMN_DEFAULT |
|
+--------------+---------------+-------------+-------------+------------------+----------------+
|
| erschema | partner_sites | er_order | varchar(4) | 70 | 'DESC' |
|
| erschema | partner_sites | er_limit | tinyint(4) | 71 | 10 |
|
+--------------+---------------+-------------+-------------+------------------+----------------+
|
10.0
+--------------+---------------+-------------+-------------+------------------+----------------+
|
| TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | ORDINAL_POSITION | COLUMN_DEFAULT |
|
+--------------+---------------+-------------+-------------+------------------+----------------+
|
| erschema | partner_sites | er_order | varchar(4) | 70 | DESC |
|
| erschema | partner_sites | er_limit | tinyint(4) | 71 | 10 |
|
+--------------+---------------+-------------+-------------+------------------+----------------+
|
So we have different results depending on the context (INFORMATION_SCHEMA vs. SHOW CREATE TABLE...). What a mess.
Attachments
Issue Links
- includes
-
MDEV-15394 DEFAULT current_timestamp() discrepancy
- Closed
- relates to
-
MDEV-15407 DEFAULT NULL forced when no DEFAULT set on NULL-able column
- Closed