mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-19125 Change Send_field::type from enum_field_types to Type_handler*
This commit is contained in:
23
sql/field.cc
23
sql/field.cc
@ -1968,7 +1968,7 @@ void Field::make_send_field(Send_field *field)
|
||||
}
|
||||
field->col_name= field_name;
|
||||
field->length=field_length;
|
||||
field->type=type();
|
||||
field->set_handler(type_handler());
|
||||
field->flags=table->maybe_null ? (flags & ~NOT_NULL_FLAG) : flags;
|
||||
field->decimals= 0;
|
||||
}
|
||||
@ -8743,6 +8743,20 @@ uint Field_blob::is_equal(Create_field *new_field)
|
||||
}
|
||||
|
||||
|
||||
void Field_blob::make_send_field(Send_field *field)
|
||||
{
|
||||
/*
|
||||
Historically all BLOB variant Fields are displayed as MYSQL_TYPE_BLOB
|
||||
in the result set metadata. Note, Item can work differently and
|
||||
display the exact BLOB type, such as
|
||||
MYSQL_TYPE_{TINY_BLOB|BLOB|MEDIUM_BLOB|LONG_BLOB}.
|
||||
QQ: this should be made consistent eventually.
|
||||
*/
|
||||
Field_longstr::make_send_field(field);
|
||||
field->set_handler(&type_handler_blob);
|
||||
}
|
||||
|
||||
|
||||
int Field_blob_compressed::store(const char *from, size_t length,
|
||||
CHARSET_INFO *cs)
|
||||
{
|
||||
@ -10915,6 +10929,13 @@ bool Column_definition::set_compressed(const char *method)
|
||||
}
|
||||
|
||||
|
||||
Send_field::Send_field(THD *thd, Item *item)
|
||||
{
|
||||
item->make_send_field(thd, this);
|
||||
normalize();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
maximum possible display length for blob.
|
||||
|
||||
|
Reference in New Issue
Block a user