diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2006-09-28 07:35:04 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2006-09-28 07:35:04 -0400 |
commit | 96bc9f80794b305f6f7636213187472eb81a9045 (patch) | |
tree | ffcaba33428981d743d5080320c0fdee220422cd /sql/item_strfunc.cc | |
parent | be29dd430e35e12b86cf0a44d62d9ca32387e955 (diff) | |
parent | d165736b8d091dcb173cd80b357197845f41cbf0 (diff) | |
download | mariadb-git-96bc9f80794b305f6f7636213187472eb81a9045.tar.gz |
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
client/mysql.cc:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_string.cc:
Auto merged
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 851551a86d9..7a82dd753b3 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; } |