[MDEV-11302] Add class Type_ext_attributes and Type_handler::join_type_ext_attributes() Created: 2016-11-17 Updated: 2017-05-27 Resolved: 2017-05-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Some data types have extended attrubutes:
This task will introduce new classes:
and a new method in Type_handler with this prototype:
The intent is to handle extended data type attributes in a unified way, and remove a few tests for field_type() against MYSQL_TYPE_GEOMETRY, MYSQL_TYPE_SET, MYSQL_TYPE_ENUM. The new class Type_ext_attributes will be reused in classes Column_definition, Item_hybrid_func and Item_type_holder, instead of declaring ENUM and GEOMETRY related attributes in every class separately. So these class definitions will change to:
This means that Column_definition::interval will be renamed to Column_definition::typelib. This will cause changes in a few dozen of lines. But this is OK. We'll eventually have the INTERVAL data type (as in the SQL Standard), so the old name would be confusing. The new name is better. Also, this means that Item_type_holder::enum_set_typelib will be renamed to Item_type_holder::typelib. But this will cause changes only in a few lines. Note, the new class Type_ext_attributes will be used in a few field creation methods in Type_handler later. |
| Comments |
| Comment by Alexander Barkov [ 2017-05-27 ] |
|
The patch for Closing the issue, as it's not needed any more. |