1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

bug #19983 (mysql_client_test_embedded fails)

libmysqld/lib_sql.cc:
  field length counting fixed
tests/mysql_client_test.c:
  this test is not for embedded server as it tests kill command
This commit is contained in:
unknown
2006-06-02 22:33:22 +05:00
parent ddd9fbacc6
commit ea7aa19396
2 changed files with 8 additions and 2 deletions

View File

@@ -665,10 +665,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;