Debian Codegraph @

mysql-test/suite/x/r/session_reset_keep_open.result

raw
1
2 Basic reset scenario
3 --------------------
4 send Mysqlx.Session.Reset {
5 keep_open: true
6 }
7
8 RUN recvok
9
10 Check the pipelining
11 --------------------
12 RUN select 2.1 as value
13 RUN select 2.2 as value
14 send Mysqlx.Session.Reset {
15 keep_open: true
16 }
17
18 value
19 2.1
20 0 rows affected
21 value
22 2.2
23 0 rows affected
24 RUN recvok
25
26 Reset session variable
27 ----------------------
28 RUN set lc_messages= pl_PL
29
30 0 rows affected
31 send Mysqlx.Session.Reset {
32 keep_open: true
33 }
34
35 RUN recvok
36 RUN SELECT IF(@@lc_messages NOT LIKE 'pl_PL', 'OK', 'FAIL') AS result;;
37 Verify ["SELECT IF(@@lc_messages NOT LIKE 'pl_PL', 'OK', 'FAIL') AS result;" returns in "result" column, following value OK]
38
39 Reset user variable
40 -------------------
41 RUN set @secret = 12345
42
43 0 rows affected
44 send Mysqlx.Session.Reset {
45 keep_open: true
46 }
47
48 RUN recvok
49 RUN SELECT IF(@secret IS NULL, 'OK', 'FAIL') AS result;;
50 Verify ["SELECT IF(@secret IS NULL, 'OK', 'FAIL') AS result;" returns in "result" column, following value OK]
51
52 Reset prepare statments
53 -----------------------
54 send Mysqlx.Prepare.Prepare {
55 stmt_id: 123
56 stmt {
57 type: STMT
58 stmt_execute {
59 stmt: "select 2.3"
60 }
61 }
62 }
63
64 RUN recvok
65 RUN SHOW STATUS LIKE 'Prepared_stmt_count';
66 Verify [Status variable "Prepared_stmt_count" needs to have a value of 1]
67 send Mysqlx.Session.Reset {
68 keep_open: true
69 }
70
71 RUN recvok
72 send Mysqlx.Prepare.Execute {
73 stmt_id: 123
74 }
75
76 Got expected error:
77 Mysqlx.Error {
78 severity: ERROR
79 code: 5110
80 msg: "Statement with ID=123 was not prepared"
81 sql_state: "HY000"
82 }
83
84 RUN SHOW STATUS LIKE 'Prepared_stmt_count';
85 Verify [Status variable "Prepared_stmt_count" needs to have a value of 0]
86
87 Reset table lock
88 ----------------
89 RUN CREATE TABLE test.example1(value INT)
90
91 0 rows affected
92 RUN CREATE TABLE test.example2(value INT)
93
94 0 rows affected
95 RUN LOCK TABLES test.example2 READ
96
97 0 rows affected
98 RUN SELECT COUNT(*) FROM test.example2
99 COUNT(*)
100 0
101 0 rows affected
102 RUN SELECT COUNT(*) FROM test.example1;
103 Got expected error:
104 Mysqlx.Error {
105 severity: ERROR
106 code: 1100
107 msg: "Table \'example1\' was not locked with LOCK TABLES"
108 sql_state: "HY000"
109 }
110
111 send Mysqlx.Session.Reset {
112 keep_open: true
113 }
114
115 RUN recvok
116 RUN SELECT COUNT(*) FROM test.example1
117 COUNT(*)
118 0
119 0 rows affected
120 RUN SELECT COUNT(*) FROM test.example2
121 COUNT(*)
122 0
123 0 rows affected
124 RUN DROP TABLE test.example1
125
126 0 rows affected
127 RUN DROP TABLE test.example2
128
129 0 rows affected
130
131 Expect block is not reset
132 -------------------------
133 send Mysqlx.Expect.Open {
134 cond {
135 condition_key: 1
136 }
137 }
138
139 RUN recvok
140 send Mysqlx.Session.Reset {
141 keep_open: true
142 }
143
144 RUN recvok
145 send Mysqlx.Expect.Close {
146 }
147
148 RUN recvok
149
150 Reset global variable
151 ---------------------
152 RUN set global max_connections = 1234
153
154 0 rows affected
155 send Mysqlx.Session.Reset {
156 keep_open: true
157 }
158
159 RUN recvok
160 RUN SELECT IF(@@global.max_connections = 1234, 'OK', 'FAIL') AS result;;
161 Verify ["SELECT IF(@@global.max_connections = 1234, 'OK', 'FAIL') AS result;" returns in "result" column, following value OK]
162 Mysqlx.Ok {
163 msg: "bye!"
164 }
165 ok
166 set @@global.max_connections = default;