summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-04-02 19:17:43 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-04-02 19:17:43 +0400
commit5a59d706be5f38768fc861388d92c0f985a5fa1a (patch)
tree6d057eab12491f577608f07bd6097f0b71bfa88a /sql/item_strfunc.h
parent5bfa2e8dbeb5c8c41ad33fbef392aa5cdfecac56 (diff)
parentd5325c7793a640d0f32d62088f84d3d19166add7 (diff)
downloadmariadb-git-5a59d706be5f38768fc861388d92c0f985a5fa1a.tar.gz
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts: Text conflict in mysql-test/r/func_str.result Text conflict in mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result Text conflict in mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result Text conflict in mysql-test/t/func_str.test Text conflict in sql/mysqld.cc Text conflict in sql/protocol.cc Text conflict in storage/myisam/mi_open.c
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index c9d62ac1052..21ac4d0a8cb 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -721,8 +721,9 @@ public:
String *val_str(String *);
void fix_length_and_dec()
{
+ ulonglong max_result_length= (ulonglong) args[0]->max_length * 2 + 2;
+ max_length= min(max_result_length, MAX_BLOB_WIDTH);
collation.set(args[0]->collation);
- max_length= args[0]->max_length * 2 + 2;
}
};