diff options
author | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-07-20 16:03:21 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-07-20 16:03:21 +0500 |
commit | 6bbbf46f1740c52200359dcf97b0f0e8e089cf75 (patch) | |
tree | df0880f79e51a963ad55111419b36b55fea5d813 /libmysqld | |
parent | eff4efa8809b84f0b869c3117565df14e14e48c2 (diff) | |
parent | a1da97ff5e08b77dcfbb8e2479eccd094c1e71a2 (diff) | |
download | mariadb-git-6bbbf46f1740c52200359dcf97b0f0e8e089cf75.tar.gz |
Merge bk@192.168.21.1:mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.19983
libmysqld/lib_sql.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/lib_sql.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index d270fe25306..1a3e10f08a8 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -674,10 +674,14 @@ bool Protocol::send_fields(List<Item> *list, uint flag) } else { + uint max_char_len; /* With conversion */ client_field->charsetnr= thd_cs->number; - uint char_len= server_field.length / item->collation.collation->mbmaxlen; - client_field->length= char_len * thd_cs->mbmaxlen; + max_char_len= (server_field.type >= (int) MYSQL_TYPE_TINY_BLOB && + server_field.type <= (int) MYSQL_TYPE_BLOB) ? + server_field.length / item->collation.collation->mbminlen : + server_field.length / item->collation.collation->mbmaxlen; + client_field->length= max_char_len * thd_cs->mbmaxlen; } client_field->type= server_field.type; client_field->flags= server_field.flags; |