Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Item_param has two parallel systems to maintain the data type:
- Type_handler_hybrid_field_type, which is used externally, like for a regular Item.
- enum_item_param_state constants INT_VALUE, DECIMAL_VALUE, REAL_VALUE, STRING_VALUE, TIME_VALUE, which are used internally, to maintain the data stored inside Item_param::value.
We'll do the following:
- Remove the data type specific constants from enum_item_param_state
- Add a new value SHORT_DATA_VALUE instead, for all data types.
- Start using Type_handler_hybrid_field_type to maintain Item_param::value internally.
After this change, enum_item_param_state will look like this:
enum enum_item_param_state |
{
|
NO_VALUE, NULL_VALUE, SHORT_DATA_VALUE, LONG_DATA_VALUE,
|
DEFAULT_VALUE, IGNORE_VALUE
|
} state;
|
Note, SHORT_DATA_VALUE is needed to distinguish the state from LONG_DATA_VALUE.
These changes are needed to simplify further work for:
- MDEV-14270 Dynamic CREATE TABLE does not preserve the data type of SP variables with NULL value
MDEV-4912Add a plugin to field types (column types)
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed
-
MDEV-14270 Dynamic CREATE TABLE does not preserve the data type of SP variables with NULL value
- Open
- relates to
-
MDEV-14476 Integer overflow when using 9223372036854775808 as a LIMIT parameter
- Open
-
MDEV-14494 Move set_param_xxx() in sql_prepare.cc to methods in Item_param and Type_handler
- Closed
-
MDEV-14498 PS: Wrong value for CAST(? AS DOUBLE) when using 9223372036854775808 as a parameter
- Open