1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge dl145s.mysql.com:/users/mhansson/mysql/push/bug23856/my50-bug23856

into  dl145s.mysql.com:/users/mhansson/mysql/push/bug23856/my51-bug23856
This commit is contained in:
mhansson@dl145s.mysql.com
2007-05-21 14:28:31 +02:00
6 changed files with 111 additions and 6 deletions

View File

@ -8991,7 +8991,7 @@ Field *create_tmp_field_from_field(THD *thd, Field *org_field,
Make sure that the blob fits into a Field_varstring which has
2-byte lenght.
*/
if (convert_blob_length && convert_blob_length < UINT_MAX16 &&
if (convert_blob_length && convert_blob_length <= Field_varstring::MAX_SIZE &&
(org_field->flags & BLOB_FLAG))
new_field= new Field_varstring(convert_blob_length,
org_field->maybe_null(),
@ -9084,7 +9084,8 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
2-byte lenght.
*/
else if (item->max_length/item->collation.collation->mbmaxlen > 255 &&
convert_blob_length < UINT_MAX16 && convert_blob_length)
convert_blob_length <= Field_varstring::MAX_SIZE &&
convert_blob_length)
new_field= new Field_varstring(convert_blob_length, maybe_null,
item->name, table->s,
item->collation.collation);