Debian Codegraph @

mysql-test/suite/x/t/status_bytes_received.test

raw
1 --echo Preamble
2
3 --source include/xplugin_preamble.inc
4 --source include/xplugin_create_user.inc
5
6 --write_file $MYSQL_TMP_DIR/mysqlx-capabilities-set-all-message.xpl
7 -->quiet
8 -->binparse %MESSAGE_DUMP% Mysqlx.Connection.CapabilitiesSet {
9 capabilities {
10 capabilities {
11 name: "plugin.version"
12 value {
13 type: SCALAR
14 scalar {
15 type: V_STRING
16 v_string {
17 value: "1.0.0"
18 }
19 }
20 }
21 }
22 }
23 }
24
25 -->varsub %MESSAGE_DUMP%
26 -->binsend %MESSAGE_DUMP%
27
28 -->expecterror ER_X_CAPABILITY_NOT_FOUND
29 -->recvresult
30 EOF
31
32 --write_file $MYSQL_TMP_DIR/mysqlx-capabilities-set-parts-message.xpl
33 -->quiet
34 -->binparse %MESSAGE_DUMP% Mysqlx.Connection.CapabilitiesSet {
35 capabilities {
36 capabilities {
37 name: "plugin.version"
38 value {
39 type: SCALAR
40 scalar {
41 type: V_STRING
42 v_string {
43 value: "1.0.0"
44 }
45 }
46 }
47 }
48 }
49 }
50
51 -->varsub %MESSAGE_DUMP%
52 -->binsendoffset %MESSAGE_DUMP% 0% 50%
53 -->sleep 0.2
54 -->varsub %MESSAGE_DUMP%
55 -->binsendoffset %MESSAGE_DUMP% 50% 100%
56
57 -->expecterror ER_X_CAPABILITY_NOT_FOUND
58 -->recvresult
59 EOF
60
61 --disable_query_log
62 --disable_result_log
63 --echo Test
64 --exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/mysqlx-capabilities-set-all-message.xpl -n 2>&1
65 --let $send_in_single_call= query_get_value(SHOW STATUS LIKE 'Mysqlx_bytes_received', Value, 1)
66
67 --source include/xplugin_reset_global_status.inc
68 --disable_query_log
69 --disable_result_log
70
71 --exec $MYSQLXTEST -u x_root --file=$MYSQL_TMP_DIR/mysqlx-capabilities-set-parts-message.xpl -n 2>&1
72 --let $send_in_two_calls= query_get_value(SHOW STATUS LIKE 'Mysqlx_bytes_received', Value, 1)
73
74 SHOW STATUS LIKE 'Mysqlx_bytes_received';
75
76 if ( $send_in_two_calls == 0) {
77 --die Reported size shouldn't be zero
78 }
79
80 if ( $send_in_two_calls != $send_in_single_call) {
81 --echo Message send in single call xplugin-reported data: $send_in_single_call
82 --echo Message send in two calls xplugin-reported data: $send_in_two_calls
83 --die Wrong size reported
84 }
85 --echo Message sizes match
86
87 ## Cleanup
88 --source ../include/xplugin_cleanup.inc