1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

bug#23856

This commit is contained in:
unknown
2007-05-21 10:27:33 +02:00
parent 1e33cfb36a
commit 84966af9fc
6 changed files with 111 additions and 6 deletions

View File

@@ -8794,7 +8794,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(),
@@ -8885,7 +8885,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,
item->collation.collation);