Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
We should eventually remove DTCollation from the top level Item class. Only string types really need it. It wastes memory for non-string Items.
As the first step, let's do the following:
- add a new class DTCollation_numeric
- change all:
collation.set_numeric()
to:
collation= DTCollation_numeric();
- remove virtual methods Field::derivation() and Field::repertoire()
- change Field::dtcollation() to be a virtual method:
virtual DTCollation dtcollation()= 0;
- Reuse DTCollation_numeric() in Field_numeric::dtcollation() and Field_temporal::dtcollation()
- Replace these members in Field_str:
// TODO-10.2: Reuse DTCollation instead of these three members
CHARSET_INFO *field_charset;
enum Derivation field_derivation;
uint field_repertoire;
to:
DTCollation m_collation;
Later we'll remove DTCollation from the top level Item class and replace it to a new Item virtual method:
virtual DTCollation dtcollation(); |
So numeric and temporal methods will return and instance of DTCollation_numeric(), by value or by reference.
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed