Status: Open (View Workflow)
Fix Version/s: None
Data type are actually not the "real" data type, but "storage" data type.
Storing an additional byte in frm files to save "real" data type information would solve lots of issues.
type means something compare to storage data type : that means Connector may return true/false and not 0/1.
JSON type means that data is not just a string, but that string can be a parse to JSON object.
Connectors actually don't know the "real" data type, and it's needed.
Example with JSON: MySQL server save JSON field differently. The result is having a dedicated MYSQL_TYPE_JSON Data type that is sent to connectors.
MariaDB saves JSON like a string, then connector has no information that this field is a JSON object.
That additional byte would permit a lot of new functionalities: BOOLEAN, JSON ok, but that may permit new types like IPV4 / IPV6 / UUID that are store are text.
Another minor annoyance is that SHOW CREATE could return initial type :
Current protocol for Column definition packet is :
First field always send string<lenenc> catalog (always 'def') = 0x03 0x64 0x65 0x66
no driver does use this information, because catalog doesn't exist in Mariadb.
This field can be used to transmit to driver this additional metadata byte.
This would permit that existing driver will receive the "storage" data type