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 | c988ef942fed9688fd2bd126af1e6946bbdd531d (patch) | |
tree | df0880f79e51a963ad55111419b36b55fea5d813 /libmysqld | |
parent | b53e47a1ec183896994b5dbbae5e27129fce6981 (diff) | |
parent | ea7aa193960d42c0bdbc011ba3714ceebc6f189c (diff) | |
download | mariadb-git-c988ef942fed9688fd2bd126af1e6946bbdd531d.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; |