Status: Closed (View Workflow)
This task will implement a new frm segment EXTRA2_FIELD_DATA_TYPE_INFO.
Pluggable data types will write their exact data type information in this segment: the data type name and all attributes.
In the standard data type sergment, pluggable data types will still write basic things (like normal fields do) such as:
- The MYSQL_TYPE_XXX replacement type code
- Collation ID
For example, INET6 will later write this information in the standard segment:
- Type code = MYSQL_TYPE_STRING
- Field length = 16
- Collation ID = 63 (my_charset_bin)
and additionally write "inet6" into the new segment EXTRA2_FIELD_DATA_TYPE_INFO.
Only extended data types will write to EXTRA2_FIELD_DATA_TYPE_INFO.
If a table does not have any columns with extended types, EXTRA2_FIELD_DATA_TYPE_INFO won't be written.
Let's use this format for every field:
1. fieldnr, in net_write_length() format
2. data type info length, in net_write_length() format
3. data type info string, according to 2
We don't have extended data types yet, so this task will make sure the new functionality works using some DBUG_EXECUTE_IFs:
- to force some built-in data types write EXTRA2_FIELD_DATA_TYPE_INFO
- to print information about EXTRA2_FIELD_DATA_TYPE_INFO as warnings
This will guarantee that the full cycle is tested:
- writing EXTRA2_FIELD_DATA_TYPE_INFO in build_frm_image()
- parsing EXTRA2_FIELD_DATA_TYPE_INFO in TABLE_SHARE::init_from_binary_frm_image()
MDEV-4912 Data type plugin API version 1
MDEV-15558 Save real data type in addition to existing data type