Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
In order to simplify the unification of these Type_handler methods:
virtual Field *make_table_field(MEM_ROOT *root, |
const LEX_CSTRING *name, |
const Record_addr &addr, |
const Type_all_attributes &attr, |
TABLE *table) const= 0; |
and
virtual Field * |
make_table_field_from_def(TABLE_SHARE *share,
|
MEM_ROOT *mem_root,
|
const LEX_CSTRING *name, |
const Record_addr &addr, |
const Bit_addr &bit, |
const Column_definition_attributes *attr, |
uint32 flags) const= 0; |
let's do the following:
- Move Column_definition::decimals to the parent class Column_definition_attributes
- When loading a column definition from a FRM file, instead of mixing numeric scale to Column_definition_attributes::pack_flag, store it to Column_definition_attributes::decimals. This will be done in virtual implementation of Type_handler_xxx::Column_definition_attributes_frm_unpack().
- Mix (decimals << FIELDFLAG_DEC_SHIFT) to pack_flag only before storing it to the FRM. This will be done in virtual implementation of Type_handler_xxx::Column_definition_attributes_frm_pack().
As a result:
- Column_definition_attributes::decimals will always be up-to-date.
- Column_definition_attributes::pack_flag will never contain the decimal scale
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed