| 1 |
SET GLOBAL mysqlx_connect_timeout = 300; |
| 2 |
SET GLOBAL mysqlx_wait_timeout = 300; |
| 3 |
|
| 4 |
|
| 5 |
## I. Handling of unparsable |
| 6 |
# |
| 7 |
# 1. Send message with not-parsable data and verify that parsable part was properly handled |
| 8 |
# 2. Send message normal query to verify that data from previous call was properly discarded |
| 9 |
|
| 10 |
# |
| 11 |
# I.1 |
| 12 |
# Protobuf uses tags to mark its message fields, |
| 13 |
# in general \x00 is not a valid tag, still in this test its |
| 14 |
# used as end-of-message tag: |
| 15 |
# |
| 16 |
# ===================PROPER MESSAGE================>EOM==>not-parsed=> |
| 17 |
# MSG_LENGTH_FIVE_BYTES_LONGER MSG_TYPE MSG_BODY \x00 MSG_LENGTH |
| 18 |
# |
| 19 |
# Where last MSG_LENGTH is not parsed garbage. |
| 20 |
|
| 21 |
# Sending message with not-parsable data, and receive an error: |
| 22 |
Sending 20 bytes raw data... |
| 23 |
Got expected error: |
| 24 |
Mysqlx.Error { |
| 25 |
severity: FATAL |
| 26 |
code: 5000 |
| 27 |
msg: "Invalid message-frame." |
| 28 |
sql_state: "HY000" |
| 29 |
} |
| 30 |
|
| 31 |
# Wait until server disconnects because of the error |
| 32 |
ok |
| 33 |
SET GLOBAL mysqlx_connect_timeout= DEFAULT; |
| 34 |
SET GLOBAL mysqlx_wait_timeout = DEFAULT; |