summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorcmiller@zippy.cornsilk.net <>2008-04-10 23:27:24 -0400
committercmiller@zippy.cornsilk.net <>2008-04-10 23:27:24 -0400
commitac2d693514cbab3f1216dd0c40cae99d3bd4e6ce (patch)
tree924ef20586a481ebf707569506fe386fa39cb83b /sql/item_create.cc
parent2f7bdf84273ac076b4cf10b31eb320fc343823f2 (diff)
downloadmariadb-git-ac2d693514cbab3f1216dd0c40cae99d3bd4e6ce.tar.gz
Fix merge problem.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 427857c58ad..349c47816ad 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -5125,7 +5125,7 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
ulong decoded_size;
errno= 0;
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);
return NULL;