mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/mysql_priv.h: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_view.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged mysql-test/r/sp.result: Manual merge. mysql-test/r/udf.result: Manual merge. mysql-test/t/sp.test: Manual merge. mysql-test/t/udf.test: Manual merge.
This commit is contained in:
commit
e44e344cac
59 changed files with 1143 additions and 88 deletions
13
sql/item.cc
13
sql/item.cc
|
|
@ -3904,7 +3904,9 @@ Field *Item::make_string_field(TABLE *table)
|
|||
if (max_length/collation.collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB)
|
||||
return new Field_blob(max_length, maybe_null, name, table,
|
||||
collation.collation);
|
||||
if (max_length > 0)
|
||||
/* Item_type_holder holds the exact type, do not change it */
|
||||
if (max_length > 0 &&
|
||||
(type() != Item::TYPE_HOLDER || field_type() != MYSQL_TYPE_STRING))
|
||||
return new Field_varstring(max_length, maybe_null, name, table,
|
||||
collation.collation);
|
||||
return new Field_string(max_length, maybe_null, name, table,
|
||||
|
|
@ -3968,6 +3970,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table)
|
|||
case MYSQL_TYPE_TIME:
|
||||
return new Field_time(maybe_null, name, table, &my_charset_bin);
|
||||
case MYSQL_TYPE_TIMESTAMP:
|
||||
return new Field_timestamp(maybe_null, name, table, &my_charset_bin);
|
||||
case MYSQL_TYPE_DATETIME:
|
||||
return new Field_datetime(maybe_null, name, table, &my_charset_bin);
|
||||
case MYSQL_TYPE_YEAR:
|
||||
|
|
@ -3991,7 +3994,11 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table)
|
|||
case MYSQL_TYPE_LONG_BLOB:
|
||||
case MYSQL_TYPE_BLOB:
|
||||
case MYSQL_TYPE_GEOMETRY:
|
||||
return new Field_blob(max_length, maybe_null, name, table,
|
||||
if (this->type() == Item::TYPE_HOLDER)
|
||||
return new Field_blob(max_length, maybe_null, name, table,
|
||||
collation.collation, 1);
|
||||
else
|
||||
return new Field_blob(max_length, maybe_null, name, table,
|
||||
collation.collation);
|
||||
break; // Blob handled outside of case
|
||||
}
|
||||
|
|
@ -6152,7 +6159,7 @@ uint32 Item_type_holder::display_length(Item *item)
|
|||
case MYSQL_TYPE_DOUBLE:
|
||||
return 53;
|
||||
case MYSQL_TYPE_NULL:
|
||||
return 4;
|
||||
return 0;
|
||||
case MYSQL_TYPE_LONGLONG:
|
||||
return 20;
|
||||
case MYSQL_TYPE_INT24:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue