summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.intranet.mysql.r18.ru>2004-04-06 19:57:33 +0500
committerunknown <bar@bar.intranet.mysql.r18.ru>2004-04-06 19:57:33 +0500
commit815c23f1e6431a6e20e8915fa92a71f7a754d5b7 (patch)
tree3410735f1e3d76f9c5c170a8f6124e69fdd8422f /sql/protocol.cc
parentae3d22668921d11c584d7cf395f60ed29cb651d1 (diff)
downloadmariadb-git-815c23f1e6431a6e20e8915fa92a71f7a754d5b7.tar.gz
Fixed charsetnr sent to the client
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 61af6ffceaf..fb4d2a57ab6 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -530,7 +530,10 @@ bool Protocol::send_fields(List<Item> *list, uint flag)
/* Store fixed length fields */
pos= (char*) local_packet->ptr()+local_packet->length();
*pos++= 12; // Length of packed fields
- int2store(pos, field.charsetnr);
+ if (item->collation.collation == &my_charset_bin || thd_charset == NULL)
+ int2store(pos, field.charsetnr);
+ else
+ int2store(pos, thd_charset->number);
int4store(pos+2, field.length);
pos[6]= field.type;
int2store(pos+7,field.flags);