| 1 |
|
| 2 |
|
| 3 |
## I. Validate multiple compression-configuration changes |
| 4 |
# |
| 5 |
# 1. Set first lz4, then deflate, and verify that deflate is the final algorithm that server uses |
| 6 |
# 2. Set first lz4, then deflate, and verify that deflate is the final algorithm that client uses |
| 7 |
# 3. Set first server_combine_mixed_msg to true, then set it to false, and verify that server places |
| 8 |
# only concrete message types into the compressed message |
| 9 |
# 4. Set first server_combine_limit to 10, then set it to 3, and verify that server compresses max |
| 10 |
# three X messages per compression message |
| 11 |
# 5. Set first server_combine_limit to 1, then set server_combine_mixed_msg to true, and verify that |
| 12 |
# server uses second mixed_msg and sends single compressed message which contains whole resultset |
| 13 |
|
| 14 |
## II. Verify that compression is not used before authentication |
| 15 |
# |
| 16 |
# 1. Enable compression, send compressed frame before authentication |
| 17 |
# 2. Enable compression, check that server didn't send any compressed frames before authentication |
| 18 |
|
| 19 |
|
| 20 |
# |
| 21 |
# I.1 |
| 22 |
connecting... |
| 23 |
active session is now 's1.1' |
| 24 |
########################################################## |
| 25 |
## Scenario: algorithm=lz4_message |
| 26 |
########################################################## |
| 27 |
## Scenario: algorithm=deflate_stream |
| 28 |
Login OK |
| 29 |
RUN SELECT 1 |
| 30 |
1 |
| 31 |
1 |
| 32 |
0 rows affected |
| 33 |
# Asserting [ Mysqlx_bytes_sent_compressed_payload > 0 ] |
| 34 |
Verify ["SELECT VARIABLE_VALUE > 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_sent_compressed_payload'" returns in first column, following value 1] |
| 35 |
# Asserting [ Mysqlx_bytes_received_compressed_payload = 0 ] |
| 36 |
Verify ["SELECT VARIABLE_VALUE = 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_received_compressed_payload'" returns in first column, following value 1] |
| 37 |
|
| 38 |
# |
| 39 |
# I.2 |
| 40 |
connecting... |
| 41 |
active session is now 's1.2' |
| 42 |
########################################################## |
| 43 |
## Scenario: algorithm=lz4_message |
| 44 |
########################################################## |
| 45 |
## Scenario: algorithm=deflate_stream |
| 46 |
Login OK |
| 47 |
1 |
| 48 |
1 |
| 49 |
0 rows affected |
| 50 |
# Asserting [ Mysqlx_bytes_received_compressed_payload > 0 ] |
| 51 |
Verify ["SELECT VARIABLE_VALUE > 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_received_compressed_payload'" returns in first column, following value 1] |
| 52 |
|
| 53 |
# |
| 54 |
# I.3 |
| 55 |
connecting... |
| 56 |
active session is now 's1.3' |
| 57 |
########################################################## |
| 58 |
## Scenario: algorithm=lz4_message, server_combine_mixed_messages=1 |
| 59 |
########################################################## |
| 60 |
## Scenario: algorithm=lz4_message, server_combine_mixed_messages=0 |
| 61 |
Login OK |
| 62 |
RUN SELECT 1,2,3 |
| 63 |
[ASSERT COMPRESSION] |
| 64 |
[ASSERT COMPRESSION] |
| 65 |
[ASSERT COMPRESSION] |
| 66 |
[ASSERT COMPRESSION] |
| 67 |
[ASSERT Mysqlx.Sql.StmtExecuteOk] |
| 68 |
# Asserting [ Mysqlx_bytes_sent_compressed_payload > 0 ] |
| 69 |
Verify ["SELECT VARIABLE_VALUE > 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_sent_compressed_payload'" returns in first column, following value 1] |
| 70 |
# Asserting [ Mysqlx_bytes_received_compressed_payload = 0 ] |
| 71 |
Verify ["SELECT VARIABLE_VALUE = 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_received_compressed_payload'" returns in first column, following value 1] |
| 72 |
1 |
| 73 |
1 |
| 74 |
0 rows affected |
| 75 |
|
| 76 |
# |
| 77 |
# I.4 |
| 78 |
connecting... |
| 79 |
active session is now 's1.4' |
| 80 |
########################################################## |
| 81 |
## Scenario: algorithm=lz4_message, server_max_combine_messages=10 |
| 82 |
########################################################## |
| 83 |
## Scenario: algorithm=lz4_message, server_max_combine_messages=3 |
| 84 |
Login OK |
| 85 |
RUN SELECT 1,2,3 |
| 86 |
[ASSERT COMPRESSION] |
| 87 |
[ASSERT COMPRESSION] |
| 88 |
[ASSERT Mysqlx.Sql.StmtExecuteOk] |
| 89 |
1 |
| 90 |
1 |
| 91 |
0 rows affected |
| 92 |
# Asserting [ Mysqlx_bytes_received_compressed_payload > 0 ] |
| 93 |
Verify ["SELECT VARIABLE_VALUE > 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_received_compressed_payload'" returns in first column, following value 1] |
| 94 |
|
| 95 |
# |
| 96 |
# I.5 |
| 97 |
connecting... |
| 98 |
active session is now 's1.5' |
| 99 |
########################################################## |
| 100 |
## Scenario: algorithm=lz4_message, server_max_combine_messages=1 |
| 101 |
########################################################## |
| 102 |
## Scenario: algorithm=lz4_message, server_combine_mixed_messages=1 |
| 103 |
Login OK |
| 104 |
RUN SELECT 1,2,3 |
| 105 |
[ASSERT COMPRESSION] |
| 106 |
[ASSERT Mysqlx.Sql.StmtExecuteOk] |
| 107 |
1 |
| 108 |
1 |
| 109 |
0 rows affected |
| 110 |
# Asserting [ Mysqlx_bytes_received_compressed_payload > 0 ] |
| 111 |
Verify ["SELECT VARIABLE_VALUE > 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_received_compressed_payload'" returns in first column, following value 1] |
| 112 |
|
| 113 |
# |
| 114 |
# II.1 |
| 115 |
connecting... |
| 116 |
active session is now 's2.1' |
| 117 |
########################################################## |
| 118 |
## Scenario: algorithm=lz4_message |
| 119 |
Got expected error: |
| 120 |
Mysqlx.Error { |
| 121 |
severity: FATAL |
| 122 |
code: 5170 |
| 123 |
msg: "Client didn\'t enable the compression." |
| 124 |
sql_state: "HY000" |
| 125 |
} |
| 126 |
|
| 127 |
closing session s2.1 |
| 128 |
switched to session default |
| 129 |
|
| 130 |
# |
| 131 |
# II.2 |
| 132 |
connecting... |
| 133 |
active session is now 's2.2' |
| 134 |
########################################################## |
| 135 |
## Scenario: algorithm=lz4_message |
| 136 |
Login OK |
| 137 |
# Asserting [ Mysqlx_bytes_sent_compressed_payload = 0 ] |
| 138 |
Verify ["SELECT VARIABLE_VALUE = 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_sent_compressed_payload'" returns in first column, following value 1] |
| 139 |
# Asserting [ Mysqlx_bytes_received_compressed_payload = 0 ] |
| 140 |
Verify ["SELECT VARIABLE_VALUE = 0 FROM performance_schema.session_status WHERE VARIABLE_NAME LIKE 'Mysqlx_bytes_received_compressed_payload'" returns in first column, following value 1] |
| 141 |
closing session s2.2 |
| 142 |
Mysqlx.Ok { |
| 143 |
msg: "bye!" |
| 144 |
} |
| 145 |
ok |