Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Item::send has a switch on field_type():
bool Item::send(Protocol *protocol, String *buffer)
|
{
|
...
|
switch ((f_type=field_type())) {
|
default:
|
case MYSQL_TYPE_NULL:
|
case MYSQL_TYPE_DECIMAL:
|
...
|
};
|
This is not friendly to pluggable data types.
We'll introduce a new in Type_handler instead:
virtual bool Item_send(Item *item, Protocol *p, st_value *buf) const= 0;
|
The default implementation of Item::send will look like:
virtual bool send(Protocol *protocol, st_value *buffer)
|
{
|
return type_handler()->Item_send(this, protocol, buffer); |
}
|
Attachments
Issue Links
- blocks
-
MDEV-4912 Data type plugin API version 1
- Closed