| 1 |
DROP DATABASE IF EXISTS xplugintest; |
| 2 |
Warnings: |
| 3 |
Note 1008 Can't drop database 'xplugintest'; database doesn't exist |
| 4 |
CREATE DATABASE xplugintest; |
| 5 |
USE xplugintest; |
| 6 |
CREATE TABLE test.counttest1 ( i INT ); |
| 7 |
Send SELECT SLEEP (?) |
| 8 |
send Mysqlx.Sql.StmtExecute { |
| 9 |
stmt: " SELECT SLEEP (?) " |
| 10 |
args { |
| 11 |
type: SCALAR |
| 12 |
scalar { |
| 13 |
type: V_UINT |
| 14 |
v_unsigned_int: 5 |
| 15 |
} |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
send SELECT (100+?) |
| 20 |
send Mysqlx.Sql.StmtExecute { |
| 21 |
stmt: "SELECT (100+?) " |
| 22 |
args { |
| 23 |
type: SCALAR |
| 24 |
scalar { |
| 25 |
type: V_UINT |
| 26 |
v_unsigned_int: 10 |
| 27 |
} |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
retrive result of send message at once |
| 32 |
SLEEP (5) |
| 33 |
0 |
| 34 |
0 rows affected |
| 35 |
|
| 36 |
command ok |
| 37 |
(100+10) |
| 38 |
110 |
| 39 |
0 rows affected |
| 40 |
send Insert |
| 41 |
send Mysqlx.Crud.Insert { |
| 42 |
collection { |
| 43 |
name: "table2" |
| 44 |
schema: "xplugintest" |
| 45 |
} |
| 46 |
data_model: DOCUMENT |
| 47 |
row { |
| 48 |
field { |
| 49 |
type: LITERAL |
| 50 |
literal { |
| 51 |
type: V_STRING |
| 52 |
v_string { |
| 53 |
value: "\n{\n \"_id\": \"1\",\n \"name\": \"Omar Bras\", \"id\": \"1\"\n}" |
| 54 |
} |
| 55 |
} |
| 56 |
} |
| 57 |
} |
| 58 |
row { |
| 59 |
field { |
| 60 |
type: LITERAL |
| 61 |
literal { |
| 62 |
type: V_STRING |
| 63 |
v_string { |
| 64 |
value: "\n{\n \"_id\": \"2\",\n \"name\": \"Omar Mex\", \"id\": \"2\"\n}" |
| 65 |
} |
| 66 |
} |
| 67 |
} |
| 68 |
} |
| 69 |
} |
| 70 |
|
| 71 |
Send SELECT SLEEP (?) |
| 72 |
send Mysqlx.Sql.StmtExecute { |
| 73 |
stmt: " SELECT SLEEP (?) " |
| 74 |
args { |
| 75 |
type: SCALAR |
| 76 |
scalar { |
| 77 |
type: V_UINT |
| 78 |
v_unsigned_int: 2 |
| 79 |
} |
| 80 |
} |
| 81 |
} |
| 82 |
|
| 83 |
Send SELECT FROM table2 |
| 84 |
send Mysqlx.Sql.StmtExecute { |
| 85 |
stmt: " SELECT doc FROM xplugintest.table2" |
| 86 |
} |
| 87 |
|
| 88 |
Send SELECT FROM table2 |
| 89 |
send Mysqlx.Sql.StmtExecute { |
| 90 |
stmt: " DROP DATABASE xplugintest" |
| 91 |
} |
| 92 |
|
| 93 |
retrive result of send message at once |
| 94 |
|
| 95 |
2 rows affected |
| 96 |
Records: 2 Duplicates: 0 Warnings: 0 |
| 97 |
SLEEP (2) |
| 98 |
0 |
| 99 |
0 rows affected |
| 100 |
doc |
| 101 |
{"id": "1", "_id": "1", "name": "Omar Bras"} |
| 102 |
{"id": "2", "_id": "2", "name": "Omar Mex"} |
| 103 |
0 rows affected |
| 104 |
|
| 105 |
1 rows affected |
| 106 |
Mysqlx.Ok { |
| 107 |
msg: "bye!" |
| 108 |
} |
| 109 |
ok |
| 110 |
DROP TABLE test.counttest1; |