mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fix mismerge.
This commit is contained in:
@@ -8615,7 +8615,7 @@ bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
|
|||||||
and 19 as length of 4.1 compatible representation. Silently
|
and 19 as length of 4.1 compatible representation. Silently
|
||||||
shrink it to MAX_DATETIME_COMPRESSED_WIDTH.
|
shrink it to MAX_DATETIME_COMPRESSED_WIDTH.
|
||||||
*/
|
*/
|
||||||
DBUG_ASSERT(MAX_DATETIME_COMPRESSED_WIDTH < UINT_MAX);
|
DBUG_ASSERT(MAX_DATETIME_COMPRESSED_WIDTH < UINT_MAX);
|
||||||
if (length != UINT_MAX) /* avoid overflow; is safe because of min() */
|
if (length != UINT_MAX) /* avoid overflow; is safe because of min() */
|
||||||
length= ((length+1)/2)*2;
|
length= ((length+1)/2)*2;
|
||||||
length= min(length, MAX_DATETIME_COMPRESSED_WIDTH);
|
length= min(length, MAX_DATETIME_COMPRESSED_WIDTH);
|
||||||
|
@@ -531,7 +531,7 @@ Item *create_func_cast(Item *a, Cast_target cast_type,
|
|||||||
ulong decoded_size;
|
ulong decoded_size;
|
||||||
errno= 0;
|
errno= 0;
|
||||||
decoded_size= strtoul(c_len, NULL, 10);
|
decoded_size= strtoul(c_len, NULL, 10);
|
||||||
if (errno != 0)
|
if ((errno != 0) || (decoded_size > MAX_FIELD_BLOBLENGTH))
|
||||||
{
|
{
|
||||||
my_error(ER_TOO_BIG_DISPLAYWIDTH, MYF(0), "cast as char", MAX_FIELD_BLOBLENGTH);
|
my_error(ER_TOO_BIG_DISPLAYWIDTH, MYF(0), "cast as char", MAX_FIELD_BLOBLENGTH);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user