summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2005-07-26 20:48:43 +0400
committerunknown <aivanov@mysql.com>2005-07-26 20:48:43 +0400
commit15a35982e42b27c81a4217b75427eab7d71aa307 (patch)
tree6131066978bc267385b76984dcec83b4c9fe3ccf /sql/item_strfunc.cc
parent08216d3abf6a66dc1d58449d2b0e60d028cd26f1 (diff)
parent0d9ab525692ecc50c7c30cc4c365d3af6dcba29e (diff)
downloadmariadb-git-15a35982e42b27c81a4217b75427eab7d71aa307.tar.gz
Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/alexi/mysql-4.1-bug1 sql/item_strfunc.cc: test merge attempt, please ignore
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 d316c7eaf72..4453bc69401 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2129,6 +2129,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;