mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt mysql-test/r/func_gconcat.result: Auto merged mysql-test/r/insert_update.result: Auto merged mysql-test/r/subselect3.result: Auto merged mysql-test/t/func_gconcat.test: Auto merged mysql-test/t/insert_update.test: Auto merged sql/field_conv.cc: Auto merged sql/item.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_select.cc: Auto merged sql/table.h: Auto merged mysql-test/r/gis.result: Manual merge mysql-test/t/gis.test: Manual merge sql/handler.cc: Manual merge sql/item_sum.cc: Manual merge sql/sql_insert.cc: Manual merge sql/sql_table.cc: Manual merge
This commit is contained in:
@ -8982,20 +8982,19 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
|
||||
|
||||
enum enum_field_types type;
|
||||
/*
|
||||
DATE/TIME fields have STRING_RESULT result type. To preserve
|
||||
type they needed to be handled separately.
|
||||
DATE/TIME and GEOMETRY fields have STRING_RESULT result type.
|
||||
To preserve type they needed to be handled separately.
|
||||
*/
|
||||
if ((type= item->field_type()) == MYSQL_TYPE_DATETIME ||
|
||||
type == MYSQL_TYPE_TIME || type == MYSQL_TYPE_DATE ||
|
||||
type == MYSQL_TYPE_TIMESTAMP)
|
||||
type == MYSQL_TYPE_TIMESTAMP || type == MYSQL_TYPE_GEOMETRY)
|
||||
new_field= item->tmp_table_field_from_field_type(table, 1);
|
||||
/*
|
||||
Make sure that the blob fits into a Field_varstring which has
|
||||
2-byte lenght.
|
||||
*/
|
||||
else if (item->max_length/item->collation.collation->mbmaxlen > 255 &&
|
||||
item->max_length/item->collation.collation->mbmaxlen < UINT_MAX16
|
||||
&& convert_blob_length)
|
||||
convert_blob_length < UINT_MAX16 && convert_blob_length)
|
||||
new_field= new Field_varstring(convert_blob_length, maybe_null,
|
||||
item->name, table->s,
|
||||
item->collation.collation);
|
||||
|
Reference in New Issue
Block a user