2
Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; version 2 of the
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
28
#include "network-mysqld-proto.h"
29
#include "network-mysqld-packet.h"
32
#if GLIB_CHECK_VERSION(2, 16, 0)
33
#define C(x) x, sizeof(x) - 1
34
#define S(x) x->str, x->len
37
* Tests for the MySQL Protocol Codec functions
42
void t_ok_packet_new(void) {
43
network_mysqld_ok_packet_t *ok_packet;
45
ok_packet = network_mysqld_ok_packet_new();
48
network_mysqld_ok_packet_free(ok_packet);
51
void t_ok_packet_append(void) {
52
network_mysqld_ok_packet_t *ok_packet;
53
network_packet *packet;
55
ok_packet = network_mysqld_ok_packet_new();
56
packet = network_packet_new();
57
packet->data = g_string_new(NULL);
59
/* check if a empty ok-packet is encoded correctly */
60
g_assert_cmpint(0, ==, network_mysqld_proto_append_ok_packet(packet->data, ok_packet));
61
g_assert_cmpint(7, ==, packet->data->len);
62
g_assert_cmpint(TRUE, ==, g_memeq(S(packet->data), C("\x00\x00\x00\x00\x00\x00\x00")));
64
g_assert_cmpint(0, ==, network_mysqld_proto_get_ok_packet(packet, ok_packet));
66
/* check if encoding and decoding works */
67
ok_packet->warnings = 1;
68
ok_packet->server_status = 2;
69
ok_packet->insert_id = 3;
70
ok_packet->affected_rows = 4;
72
g_string_truncate(packet->data, 0);
75
g_assert_cmpint(0, ==, network_mysqld_proto_append_ok_packet(packet->data, ok_packet));
76
g_assert_cmpint(7, ==, packet->data->len);
77
g_assert_cmpint(TRUE, ==, g_memeq(S(packet->data), C("\x00\x04\x03\x02\x00\x01\x00")));
79
network_mysqld_ok_packet_free(ok_packet);
81
ok_packet = network_mysqld_ok_packet_new();
82
g_assert_cmpint(0, ==, network_mysqld_proto_get_ok_packet(packet, ok_packet));
83
g_assert_cmpint(1, ==, ok_packet->warnings);
84
g_assert_cmpint(2, ==, ok_packet->server_status);
85
g_assert_cmpint(3, ==, ok_packet->insert_id);
86
g_assert_cmpint(4, ==, ok_packet->affected_rows);
88
network_mysqld_ok_packet_free(ok_packet);
90
/* check if too-short packet is denied */
91
ok_packet = network_mysqld_ok_packet_new();
92
g_string_truncate(packet->data, 0);
94
g_assert_cmpint(-1, ==, network_mysqld_proto_get_ok_packet(packet, ok_packet));
96
network_mysqld_ok_packet_free(ok_packet);
98
g_string_free(packet->data, TRUE);
99
network_packet_free(packet);
102
void t_err_packet_new(void) {
103
network_mysqld_err_packet_t *err_packet;
105
err_packet = network_mysqld_err_packet_new();
106
g_assert(err_packet);
108
network_mysqld_err_packet_free(err_packet);
111
void t_err_packet_append(void) {
112
network_mysqld_err_packet_t *err_packet;
113
network_packet *packet;
115
err_packet = network_mysqld_err_packet_new();
116
packet = network_packet_new();
117
packet->data = g_string_new(NULL);
119
/* check if a empty ok-packet is encoded correctly */
120
g_assert_cmpint(0, ==, network_mysqld_proto_append_err_packet(packet->data, err_packet));
121
g_assert_cmpint(9, ==, packet->data->len);
122
g_assert_cmpint(TRUE, ==, g_memeq(S(packet->data), C("\xff\x00\x00#07000")));
124
g_assert_cmpint(0, ==, network_mysqld_proto_get_err_packet(packet, err_packet));
126
/* check if encoding and decoding works */
127
err_packet->errcode = 3;
128
g_string_assign_len(err_packet->errmsg, C("test"));
129
g_string_assign_len(err_packet->sqlstate, C("01234"));
131
g_string_truncate(packet->data, 0);
134
g_assert_cmpint(0, ==, network_mysqld_proto_append_err_packet(packet->data, err_packet));
135
g_assert_cmpint(13, ==, packet->data->len);
136
g_assert_cmpint(TRUE, ==, g_memeq(S(packet->data), C("\xff\x03\x00#01234test")));
138
network_mysqld_err_packet_free(err_packet);
140
err_packet = network_mysqld_err_packet_new();
141
g_assert_cmpint(0, ==, network_mysqld_proto_get_err_packet(packet, err_packet));
142
g_assert_cmpint(3, ==, err_packet->errcode);
143
g_assert_cmpstr("01234", ==, err_packet->sqlstate->str);
144
g_assert_cmpstr("test", ==, err_packet->errmsg->str);
146
network_mysqld_err_packet_free(err_packet);
148
/* check if too-short packet is denied */
149
err_packet = network_mysqld_err_packet_new();
150
g_string_truncate(packet->data, 0);
152
g_assert_cmpint(-1, ==, network_mysqld_proto_get_err_packet(packet, err_packet));
154
network_mysqld_err_packet_free(err_packet);
156
g_string_free(packet->data, TRUE);
157
network_packet_free(packet);
160
void t_eof_packet_new(void) {
161
network_mysqld_eof_packet_t *eof_packet;
163
eof_packet = network_mysqld_eof_packet_new();
164
g_assert(eof_packet);
166
network_mysqld_eof_packet_free(eof_packet);
169
void t_eof_packet_append(void) {
170
network_mysqld_eof_packet_t *eof_packet;
171
network_packet *packet;
173
eof_packet = network_mysqld_eof_packet_new();
174
packet = network_packet_new();
175
packet->data = g_string_new(NULL);
177
/* check if a empty ok-packet is encoded correctly */
178
g_assert_cmpint(0, ==, network_mysqld_proto_append_eof_packet(packet->data, eof_packet));
179
g_assert_cmpint(5, ==, packet->data->len);
180
g_assert_cmpint(TRUE, ==, g_memeq(S(packet->data), C("\xfe\x00\x00\x00\x00")));
182
g_assert_cmpint(0, ==, network_mysqld_proto_get_eof_packet(packet, eof_packet));
184
/* check if encoding and decoding works */
185
eof_packet->warnings = 1;
186
eof_packet->server_status = 2;
188
g_string_truncate(packet->data, 0);
191
g_assert_cmpint(0, ==, network_mysqld_proto_append_eof_packet(packet->data, eof_packet));
192
g_assert_cmpint(5, ==, packet->data->len);
193
g_assert_cmpint(TRUE, ==, g_memeq(S(packet->data), C("\xfe\x01\x00\x02\x00")));
195
network_mysqld_eof_packet_free(eof_packet);
197
eof_packet = network_mysqld_eof_packet_new();
198
g_assert_cmpint(0, ==, network_mysqld_proto_get_eof_packet(packet, eof_packet));
199
g_assert_cmpint(1, ==, eof_packet->warnings);
200
g_assert_cmpint(2, ==, eof_packet->server_status);
202
network_mysqld_eof_packet_free(eof_packet);
204
/* check if too-short packet is denied */
205
eof_packet = network_mysqld_eof_packet_new();
206
g_string_truncate(packet->data, 0);
208
g_assert_cmpint(-1, ==, network_mysqld_proto_get_eof_packet(packet, eof_packet));
210
network_mysqld_eof_packet_free(eof_packet);
212
g_string_free(packet->data, TRUE);
213
network_packet_free(packet);
216
void test_mysqld_handshake(void) {
217
const char raw_packet[] = "J\0\0\0"
219
"5.0.45-Debian_1ubuntu3.3-log\0"
223
",\242" /* 0x2c 0xa2 */
226
"\0\0\0\0\0\0\0\0\0\0\0\0\0"
229
network_mysqld_auth_challenge *shake;
230
network_packet packet;
232
shake = network_mysqld_auth_challenge_new();
234
packet.data = g_string_new(NULL);
236
g_string_append_len(packet.data, C(raw_packet));
238
g_assert_cmpint(packet.data->len, ==, 78);
240
g_assert_cmpint(0, ==, network_mysqld_proto_skip_network_header(&packet));
241
g_assert_cmpint(0, ==, network_mysqld_proto_get_auth_challenge(&packet, shake));
243
g_assert(shake->server_version == 50045);
244
g_assert(shake->thread_id == 119);
245
g_assert(shake->server_status ==
246
SERVER_STATUS_AUTOCOMMIT);
247
g_assert(shake->charset == 8);
248
g_assert(shake->capabilities ==
249
(CLIENT_CONNECT_WITH_DB |
256
CLIENT_TRANSACTIONS |
257
CLIENT_SECURE_CONNECTION));
259
g_assert(shake->challenge->len == 20);
260
g_assert(0 == memcmp(shake->challenge->str, "\"L;!3|8@vV,s#PLjSA+Q", shake->challenge->len));
263
g_string_truncate(packet.data, 0);
264
g_string_append_len(packet.data, C("J\0\0\0"));
265
network_mysqld_proto_append_auth_challenge(packet.data, shake);
267
g_assert_cmpint(packet.data->len, ==, sizeof(raw_packet) - 1);
269
g_assert(0 == memcmp(packet.data->str, raw_packet, packet.data->len));
271
network_mysqld_auth_challenge_free(shake);
272
g_string_free(packet.data, TRUE);
275
void test_mysqld_auth_empty_pw(void) {
276
const char raw_packet[] =
277
"&\0\0\1\205\246\3\0\0\0\0\1\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0root\0\0"
280
network_mysqld_auth_response *auth;
282
auth = network_mysqld_auth_response_new();
283
g_string_assign(auth->username, "root");
285
(CLIENT_LONG_PASSWORD |
290
CLIENT_TRANSACTIONS |
291
CLIENT_SECURE_CONNECTION |
292
CLIENT_MULTI_STATEMENTS |
293
CLIENT_MULTI_RESULTS);
294
auth->max_packet_size = 1 << 24;
297
packet = g_string_new(NULL);
299
network_mysqld_proto_append_int8(packet, 38);
300
network_mysqld_proto_append_int8(packet, 0);
301
network_mysqld_proto_append_int8(packet, 0);
302
network_mysqld_proto_append_int8(packet, 1);
304
g_assert(0 == network_mysqld_proto_append_auth_response(packet, auth));
307
g_message("%s: packet->len = %d, packet is: %d", G_STRLOC, packet->len, sizeof(raw_packet) - 1);
310
g_assert(packet->len == sizeof(raw_packet) - 1);
313
for (i = 0; i < packet->len; i++) {
314
g_message("%s: [%d] %02x %c= %02x", G_STRLOC, i, packet->str[i], packet->str[i] == raw_packet[i] ? '=' : '!', raw_packet[i]);
318
g_assert(0 == memcmp(packet->str, raw_packet, sizeof(raw_packet) - 1));
320
network_mysqld_auth_response_free(auth);
322
g_string_free(packet, TRUE);
325
void test_mysqld_auth_with_pw(void) {
326
const char raw_packet[] =
331
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
333
"\24\241\304\260>\255\1:F,\256\337K\323\340\4\273\354I\256\204"
335
const char raw_challenge[] =
336
"%@R[SoWC" /* part 1 */
337
"+L|LG_+R={tV"; /* part 2 */
339
GString *packet, *challenge, *hashed_password;
340
network_mysqld_auth_response *auth;
342
auth = network_mysqld_auth_response_new();
343
g_string_assign(auth->username, "root");
345
CLIENT_LONG_PASSWORD |
350
CLIENT_TRANSACTIONS |
351
CLIENT_SECURE_CONNECTION |
352
CLIENT_MULTI_STATEMENTS |
353
CLIENT_MULTI_RESULTS;
354
auth->max_packet_size = 1 << 24;
357
challenge = g_string_new(NULL);
358
hashed_password = g_string_new(NULL);
359
g_string_append_len(challenge, raw_challenge, sizeof(raw_challenge) - 1);
361
network_mysqld_proto_password_hash(hashed_password, C("123"));
362
network_mysqld_proto_password_scramble(auth->response, S(challenge), S(hashed_password));
364
g_string_free(hashed_password, TRUE);
366
packet = g_string_new(NULL);
368
network_mysqld_proto_append_int8(packet, 58);
369
network_mysqld_proto_append_int8(packet, 0);
370
network_mysqld_proto_append_int8(packet, 0);
371
network_mysqld_proto_append_int8(packet, 1);
373
g_assert(0 == network_mysqld_proto_append_auth_response(packet, auth));
374
g_assert(packet->len == sizeof(raw_packet) - 1);
377
for (i = 0; i < packet->len; i++) {
378
g_message("%s: [%d] %02x %c= %02x", G_STRLOC, i, packet->str[i], packet->str[i] == raw_packet[i] ? '=' : '!', raw_packet[i]);
382
g_assert(0 == memcmp(packet->str, raw_packet, sizeof(raw_packet) - 1));
384
network_mysqld_auth_response_free(auth);
386
g_string_free(packet, TRUE);
387
g_string_free(challenge, TRUE);
392
* network_mysqld_auth_response_new() and network_mysqld_auth_response_free()
393
* don't cause a crash
395
void t_auth_response_new() {
396
network_mysqld_auth_response *shake;
398
shake = network_mysqld_auth_response_new();
401
network_mysqld_auth_response_free(shake);
406
* network_mysqld_proto_get_auth_response() can decode a string
407
* network_mysqld_proto_append_auth_response() can encode the result
408
* of the network_mysqld_proto_get_auth_response()
410
void t_mysqld_get_auth_response(void) {
411
const char raw_packet[] =
415
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
417
"\24\241\304\260>\255\1:F,\256\337K\323\340\4\273\354I\256\204"
420
network_mysqld_auth_response *auth;
421
network_packet packet;
424
auth = network_mysqld_auth_response_new();
425
packet.data = g_string_new_len(C(raw_packet));
428
err = err || network_mysqld_proto_get_auth_response(&packet, auth);
430
g_assert_cmpint(err, ==, 0);
432
g_assert(auth->username);
433
g_assert_cmpint(auth->username->len, ==, 4);
434
g_assert_cmpstr(auth->username->str, ==, "root");
436
g_assert_cmpuint(auth->capabilities, ==,
437
CLIENT_LONG_PASSWORD |
442
CLIENT_TRANSACTIONS |
443
CLIENT_SECURE_CONNECTION |
444
CLIENT_MULTI_STATEMENTS |
445
CLIENT_MULTI_RESULTS);
446
g_assert_cmpuint(auth->max_packet_size, ==, 1 << 24);
447
g_assert_cmpuint(auth->charset , ==, 8);
449
g_string_truncate(packet.data, 0);
452
err = err || network_mysqld_proto_append_auth_response(packet.data, auth);
453
g_assert_cmpint(err, ==, 0);
455
g_assert_cmpint(packet.data->len, ==, sizeof(raw_packet) - 1);
456
g_assert_cmpint(TRUE, ==, g_memeq(S(packet.data), raw_packet, packet.data->len));
458
network_mysqld_auth_response_free(auth);
460
/* empty auth struct */
461
g_string_truncate(packet.data, 0);
464
auth = network_mysqld_auth_response_new();
465
err = err || network_mysqld_proto_append_auth_response(packet.data, auth);
466
g_assert_cmpint(err, ==, 0);
467
network_mysqld_auth_response_free(auth);
469
g_string_free(packet.data, TRUE);
474
* network_mysqld_proto_get_auth_response() can decode a pre-4.0 packet
475
* network_mysqld_proto_append_auth_response() can encode the result
476
* of the network_mysqld_proto_get_auth_response()
478
void t_mysqld_get_auth_response_pre_41(void) {
479
const char raw_packet[] =
485
network_mysqld_auth_response *auth;
486
network_packet packet;
489
auth = network_mysqld_auth_response_new();
490
packet.data = g_string_new_len(C(raw_packet));
493
err = err || network_mysqld_proto_get_auth_response(&packet, auth);
495
g_assert_cmpint(err, ==, 0);
497
g_assert(auth->username);
498
g_assert_cmpint(auth->username->len, ==, 4);
499
g_assert_cmpstr(auth->username->str, ==, "root");
501
g_assert_cmpuint(auth->capabilities, ==,
502
CLIENT_LONG_PASSWORD |
508
g_assert_cmpuint(auth->max_packet_size, ==, 0);
510
g_string_truncate(packet.data, 0);
513
err = err || network_mysqld_proto_append_auth_response(packet.data, auth);
514
g_assert_cmpint(err, ==, 0);
516
g_assert_cmpint(packet.data->len, ==, sizeof(raw_packet) - 1);
517
g_assert_cmpint(TRUE, ==, g_memeq(S(packet.data), raw_packet, packet.data->len));
519
network_mysqld_auth_response_free(auth);
521
/* empty auth struct */
522
g_string_truncate(packet.data, 0);
525
auth = network_mysqld_auth_response_new();
526
err = err || network_mysqld_proto_append_auth_response(packet.data, auth);
527
g_assert_cmpint(err, ==, 0);
528
network_mysqld_auth_response_free(auth);
530
g_string_free(packet.data, TRUE);
535
* network_mysqld_proto_get_auth_response() can decode a broken pre-4.0 packet
537
void t_mysqld_get_auth_response_no_term(void) {
538
const char raw_packet[] =
541
"root\0" /* missing trailing \0 */
545
network_mysqld_auth_response *auth;
546
network_packet packet;
549
auth = network_mysqld_auth_response_new();
550
packet.data = g_string_new_len(C(raw_packet));
553
err = err || network_mysqld_proto_get_auth_response(&packet, auth);
555
g_assert_cmpint(err, !=, 0);
557
network_mysqld_auth_response_free(auth);
559
g_string_free(packet.data, TRUE);
568
void t_resultset_fields_works(void) {
569
strings packets[] = {
570
{ C("\1\0\0\1\2") }, /* 2 fields */
571
{ C("6\0\0\2\3def\0\6STATUS\0\rVariable_name\rVariable_name\f\10\0P\0\0\0\375\1\0\0\0\0") },
572
{ C("&\0\0\3\3def\0\6STATUS\0\5Value\5Value\f\10\0\0\2\0\0\375\1\0\0\0\0") },
573
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
574
{ C("\23\0\0\5\17Aborted_clients\00298") },
575
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
582
q = network_queue_new();
584
for (i = 0; packets[i].s; i++) {
585
network_queue_append(q, g_string_new_len(packets[i].s, packets[i].s_len));
588
fields = g_ptr_array_new();
589
g_assert(NULL != network_mysqld_proto_get_fielddefs(q->chunks->head, fields));
591
network_queue_free(q);
594
void t_resultset_fields_parse_err(void) {
595
strings packets[] = {
596
{ C("\1\0\0\1\377") }, /* err-packet */
597
{ C("6\0\0\2\3def\0\6STATUS\0\rVariable_name\rVariable_name\f\10\0P\0\0\0\375\1\0\0\0\0") },
598
{ C("&\0\0\3\3def\0\6STATUS\0\5Value\5Value\f\10\0\0\2\0\0\375\1\0\0\0\0") },
599
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
600
{ C("\23\0\0\5\17Aborted_clients\00298") },
601
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
608
q = network_queue_new();
610
for (i = 0; packets[i].s; i++) {
611
network_queue_append(q, g_string_new_len(packets[i].s, packets[i].s_len));
614
fields = g_ptr_array_new();
615
g_assert(NULL == network_mysqld_proto_get_fielddefs(q->chunks->head, fields));
617
network_queue_free(q);
620
void t_resultset_fields_parse_null(void) {
621
strings packets[] = {
622
{ C("\1\0\0\1\373") }, /* NULL */
623
{ C("6\0\0\2\3def\0\6STATUS\0\rVariable_name\rVariable_name\f\10\0P\0\0\0\375\1\0\0\0\0") },
624
{ C("&\0\0\3\3def\0\6STATUS\0\5Value\5Value\f\10\0\0\2\0\0\375\1\0\0\0\0") },
625
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
626
{ C("\23\0\0\5\17Aborted_clients\00298") },
627
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
634
q = network_queue_new();
636
for (i = 0; packets[i].s; i++) {
637
network_queue_append(q, g_string_new_len(packets[i].s, packets[i].s_len));
640
fields = g_ptr_array_new();
641
g_assert(NULL == network_mysqld_proto_get_fielddefs(q->chunks->head, fields));
643
network_queue_free(q);
646
void t_resultset_fields_parse_low(void) {
647
strings packets[] = {
648
{ C("\1\0\0\1\2") }, /* 2 fields */
649
{ C("6\0\0\2\3def\0\6STATUS\0\rVariable_name\rVariable_name\f\10\0P\0\0\0\375\1\0\0\0\0") },
650
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
651
{ C("\23\0\0\5\17Aborted_clients\00298") },
652
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
659
q = network_queue_new();
661
for (i = 0; packets[i].s; i++) {
662
network_queue_append(q, g_string_new_len(packets[i].s, packets[i].s_len));
665
fields = g_ptr_array_new();
666
g_assert(NULL == network_mysqld_proto_get_fielddefs(q->chunks->head, fields));
668
network_queue_free(q);
671
void t_resultset_fields_parse_high(void) {
672
strings packets[] = {
673
{ C("\1\0\0\1\2") }, /* 2 fields */
674
{ C("6\0\0\2\3def\0\6STATUS\0\rVariable_name\rVariable_name\f\10\0P\0\0\0\375\1\0\0\0\0") },
675
{ C("&\0\0\3\3def\0\6STATUS\0\5Value\5Value\f\10\0\0\2\0\0\375\1\0\0\0\0") },
676
{ C("&\0\0\3\3def\0\6STATUS\0\5Value\5Value\f\10\0\0\2\0\0\375\1\0\0\0\0") },
677
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
678
{ C("\23\0\0\5\17Aborted_clients\00298") },
679
{ C("\5\0\0\4\376\0\0\"\0") }, /* EOF */
686
q = network_queue_new();
688
for (i = 0; packets[i].s; i++) {
689
network_queue_append(q, g_string_new_len(packets[i].s, packets[i].s_len));
692
fields = g_ptr_array_new();
693
g_assert(NULL == network_mysqld_proto_get_fielddefs(q->chunks->head, fields));
695
network_queue_free(q);
701
* don't include the main() function the docs
703
int main(int argc, char **argv) {
704
g_test_init(&argc, &argv, NULL);
705
g_test_bug_base("http://bugs.mysql.com/");
707
g_test_add_func("/core/ok-packet-new", t_ok_packet_new);
708
g_test_add_func("/core/ok-packet-append", t_ok_packet_append);
709
g_test_add_func("/core/eof-packet-new", t_eof_packet_new);
710
g_test_add_func("/core/eof-packet-append", t_eof_packet_append);
711
g_test_add_func("/core/err-packet-new", t_err_packet_new);
712
g_test_add_func("/core/err-packet-append", t_err_packet_append);
714
g_test_add_func("/core/mysqld-proto-handshake", test_mysqld_handshake);
716
g_test_add_func("/core/mysqld-proto-pw-empty", test_mysqld_auth_empty_pw);
717
g_test_add_func("/core/mysqld-proto-pw", test_mysqld_auth_with_pw);
719
g_test_add_func("/core/mysqld-proto-auth-response-new", t_auth_response_new);
720
g_test_add_func("/core/mysqld-proto-get-auth-response", t_mysqld_get_auth_response);
721
g_test_add_func("/core/mysqld-proto-get-auth-response-pre-4.1", t_mysqld_get_auth_response_pre_41);
722
g_test_add_func("/core/mysqld-proto-get-auth-response-no-term", t_mysqld_get_auth_response_no_term);
724
g_test_add_func("/core/resultset-fields", t_resultset_fields_works);
725
g_test_add_func("/core/resultset-fields-broken-proto-err", t_resultset_fields_parse_err);
726
g_test_add_func("/core/resultset-fields-broken-proto-null", t_resultset_fields_parse_null);
727
g_test_add_func("/core/resultset-fields-broken-proto-field-count-low", t_resultset_fields_parse_low);
728
g_test_add_func("/core/resultset-fields-broken-proto-field-count-high", t_resultset_fields_parse_high);