Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.2.7, 10.2.9
-
None
-
Ubuntu 16.04x64
Description
I'm currently working on doctrine support for mariadb 10.2 and information_schema changes introduced in 10.2.7 (MDEV-13132).
I faced an unexpected case in information schema concerning default values. I understand the new behavior of 'NULL' being quoted. And it works well, except that after an upgrade from 10.2.6 to 10.2.7, not all the fields have been converted to the new spec.
As an example:
SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS where COLUMN_DEFAULT IS NULL AND IS_NULLABLE = "YES"
|
Should not return any row, but returns 4 rows on my database (amongst 4206 fields matching default is null). The column is nullable and the column_default is NULL (should be 'NULL'). See attached screenshot 086.
For info, the normal behaviour was working:
SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_DEFAULT
|
FROM INFORMATION_SCHEMA.COLUMNS where COLUMN_DEFAULT IS NULL AND IS_NULLABLE <> "YES"
|
For this one, 4202 records worked. See screenshot 087.
It's only happening after upgrade to 10.2.7. So I guess the upgrade of information_schema failed somewhere. If I recreate the database the information_schema is correct.
Attachments
Issue Links
- relates to
-
MDEV-13132 Information Schema does not show whether column default is expression or literal
- Closed
-
MDEV-13341 information_schema.columns Column_default now return 'null' instead of null
- Closed