diff options
author | cmiller@zippy.cornsilk.net <> | 2006-09-28 07:30:24 -0400 |
---|---|---|
committer | cmiller@zippy.cornsilk.net <> | 2006-09-28 07:30:24 -0400 |
commit | ca7ade8825cbc1bc3621cfb3aef3ff51d9e725ce (patch) | |
tree | 5c630869a834ac690a1fe0be1794d187f44b1ef7 /sql/item_strfunc.cc | |
parent | 47c2c590c8490ca119dc6ab29d80c5af2a042f49 (diff) | |
parent | e12092627e7686c158a5aeb50a2fdc65f7524d35 (diff) | |
download | mariadb-git-ca7ade8825cbc1bc3621cfb3aef3ff51d9e725ce.tar.gz |
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 46a96c28d88..31c2f44fc3e 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1149,12 +1149,13 @@ void Item_func_substr::fix_length_and_dec() } if (arg_count == 3 && args[2]->const_item()) { - int32 length= (int32) args[2]->val_int() * collation.collation->mbmaxlen; + int32 length= (int32) args[2]->val_int(); if (length <= 0) max_length=0; /* purecov: inspected */ else set_if_smaller(max_length,(uint) length); } + max_length*= collation.collation->mbmaxlen; } |