summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2005-07-26 21:03:41 +0400
committerunknown <aivanov@mysql.com>2005-07-26 21:03:41 +0400
commitd44c9e486e4c2c0ebb1b42351e612f3bfb7a39ca (patch)
tree2101a2c8f932e6084830a0e4844ccdfc5420953e /sql/item_strfunc.cc
parent4fc1f429c1bf9a7f76692fb3df97cb42570cea4a (diff)
parent15a35982e42b27c81a4217b75427eab7d71aa307 (diff)
downloadmariadb-git-d44c9e486e4c2c0ebb1b42351e612f3bfb7a39ca.tar.gz
Merge mysql.com:/home/alexi/mysql-4.1-bug1
into mysql.com:/home/alexi/mysql-5.0 sql/item_strfunc.cc: Auto merged mysql-test/t/select.test: Merging BUG#XXX to 5.0 (test, will not push)
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 256090d3e61..478ef55143a 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2163,6 +2163,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;