Debian Codegraph @

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

raw
1 CREATE USER xtest_client@localhost;
2 GRANT ALL ON *.* TO xtest_client@localhost;
3
4
5 ## I. Check the session_connect_attrs capability with Session.Reset with keep_open=false.
6 #
7 # 1. Set session_connect_attrs capability, then reset session and verify that the connection attributes are not present in the PFS.
8 # 2. Set session_connect_attrs capability, then reset session and set new session_connect_attrs, after that verify that only the later connection attributes are present in the PFS.
9
10 ## II. Check Session.Reset with different capabilities.
11 #
12 # 1. Set session_connect_attrs capability, then reset session, after that try to set capability of a type different than session_connect_attrs and verify that it fails.
13 # 2. Set session_connect_attrs capability, then reset session, after that try to set session_connect_attrs and other valid capability and verify that it fails and no connection attributes are added to the PFS.
14 # 3. Set session_connect_attrs capability, then reset session, after that try to set capability of a type different than session_connect_attrs and verify that it fails. After that send a session_connect_attrs cabapibility and verify if it succeeded.
15
16
17 ## III. Check the session_connect_attrs capability with Session.Reset with keep_open=true.
18 #
19 # 1. Set session_connect_attr capability, then reset session with keep_open=true, verify that session connection attributes are still visible in the PFS.
20
21 #
22 # I.1
23 connecting...
24 active session is now 'test_session.I.1'
25 RUN recvok
26 Login OK
27 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someValue")]
28 RUN recvok
29 Login OK
30 [Verify that session_connect_attrs does not contain the following pair ("custom_test_key","someValue")]
31 closing session test_session.I.1
32 Mysqlx.Ok {
33 msg: "bye!"
34 }
35 switched to session default
36
37 #
38 # I.2
39 connecting...
40 active session is now 'test_session.I.2'
41 RUN recvok
42 Login OK
43 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someValue")]
44 RUN recvok
45 RUN recvok
46 Login OK
47 [Verify that session_connect_attrs contains the following pair ("custom_test_key","nextValue")]
48 [Verify that session_connect_attrs does not contain the following pair ("custom_test_key","someValue")]
49 closing session test_session.I.2
50 Mysqlx.Ok {
51 msg: "bye!"
52 }
53 switched to session default
54 Verify [Global status variable "Mysqlx_sessions" needs to have a value of 1]
55
56 #
57 # II.1
58 connecting...
59 active session is now 'test_session.II.1'
60 RUN recvok
61 Login OK
62 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someValue")]
63 RUN recvok
64 Got expected error:
65 Mysqlx.Error {
66 severity: FATAL
67 code: 5009
68 msg: "Only session_connect_attr capability is allowed after Session.Reset"
69 sql_state: "HY000"
70 }
71
72
73 #
74 # II.2
75 connecting...
76 active session is now 'test_session.II.2'
77 RUN recvok
78 Login OK
79 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someValue")]
80 RUN recvok
81 Got expected error:
82 Mysqlx.Error {
83 severity: FATAL
84 code: 5009
85 msg: "Only session_connect_attr capability is allowed after Session.Reset"
86 sql_state: "HY000"
87 }
88
89 Login OK
90 [Verify that session_connect_attrs does not contain the following pair ("custom_test_key","someValue")]
91 [Verify that session_connect_attrs does not contain the following pair ("custom_test_key","nextValue")]
92 closing session test_session.II.2
93 Mysqlx.Ok {
94 msg: "bye!"
95 }
96 switched to session default
97
98 #
99 # II.3
100 connecting...
101 active session is now 'test_session.II.3'
102 RUN recvok
103 Login OK
104 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someValue")]
105 RUN recvok
106 Got expected error:
107 Mysqlx.Error {
108 severity: FATAL
109 code: 5009
110 msg: "Only session_connect_attr capability is allowed after Session.Reset"
111 sql_state: "HY000"
112 }
113
114 RUN recvok
115 Login OK
116 [Verify that session_connect_attrs contains the following pair ("custom_test_key","nextValue")]
117 closing session test_session.II.3
118 Mysqlx.Ok {
119 msg: "bye!"
120 }
121 switched to session default
122
123 #
124 # III.1
125 connecting...
126 active session is now 'test_session.III.1'
127 RUN recvok
128 Login OK
129 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someValue")]
130 RUN recvok
131 [Verify that session_connect_attrs contains the following pair ("custom_test_key","someValue")]
132 closing session test_session.III.1
133 Mysqlx.Ok {
134 msg: "bye!"
135 }
136 ok
137 DROP USER xtest_client@localhost;