summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2005-08-16 00:03:50 +0400
committerunknown <aivanov@mysql.com>2005-08-16 00:03:50 +0400
commit14fec24b3c76c6557b29c5db6711778525482ae6 (patch)
treec0ff2a74ef1019cad7498ac97739235c538db903 /sql/item_strfunc.cc
parent219c84faba28171cc04608f826703f5c031d70bc (diff)
parentd44c9e486e4c2c0ebb1b42351e612f3bfb7a39ca (diff)
downloadmariadb-git-14fec24b3c76c6557b29c5db6711778525482ae6.tar.gz
Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/alexi/mysql-5.0 mysql-test/t/select.test: Auto merged sql/item_strfunc.cc: Auto merged
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 094a0c56319..1e1cc123e60 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2176,6 +2176,9 @@ void Item_func_lpad::fix_length_and_dec()
{
ulonglong length= ((ulonglong) args[1]->val_int() *
collation.collation->mbmaxlen);
+ /*a comment before (merged) */
+ length= max((ulonglong)args[0]->max_length, length);
+ /*a comment after */
if (length >= MAX_BLOB_WIDTH)
{
length= MAX_BLOB_WIDTH;