1Preamble
2install plugin mysqlx soname "mysqlx.so";
3call mtr.add_suppression("Plugin mysqlx reported: .Failed at SSL configuration: .SSL context is not usable without certificate and private key..");
4call mtr.add_suppression("Plugin mysqlx reported: .SSL_CTX_load_verify_locations failed.");
5SHOW VARIABLES LIKE 'mysqlx_connect_timeout';
6Variable_name	Value
7mysqlx_connect_timeout	30
8show status like 'Mysqlx_conn%';
9Variable_name	Value
10Mysqlx_connection_accept_errors	0
11Mysqlx_connection_errors	0
12Mysqlx_connections_accepted	0
13Mysqlx_connections_closed	0
14Mysqlx_connections_rejected	0
15SET GLOBAL mysqlx_connect_timeout = 4;
16show status like 'Mysqlx_conn%';
17Variable_name	Value
18Mysqlx_connection_accept_errors	0
19Mysqlx_connection_errors	0
20Mysqlx_connections_accepted	0
21Mysqlx_connections_closed	0
22Mysqlx_connections_rejected	0
23Disconnect user on idle connection after timeout
24ok
25Disconnect user without session after timeout
26connecting...
27active session is now 'idle_session'
28send Mysqlx.Connection.CapabilitiesGet {
29}
30
31closing session idle_session
32switched to session default
33Mysqlx.Ok {
34  msg: "bye!"
35}
36ok
37Inactivity timer disabled after session setup (commands executed after 1s should be processed)
38
39command ok
40
41command ok
42Mysqlx.Ok {
43  msg: "bye!"
44}
45ok
46Disconnect user on idle connection after new timeout
47SET GLOBAL mysqlx_connect_timeout = 2;
48show status like 'Mysqlx_conn%';
49Variable_name	Value
50Mysqlx_connection_accept_errors	0
51Mysqlx_connection_errors	2
52Mysqlx_connections_accepted	4
53Mysqlx_connections_closed	4
54Mysqlx_connections_rejected	0
55ok
56SET GLOBAL mysqlx_connect_timeout = 4;
57Inactivity timer restarted with Session.Reset Message
58
59command ok
60send Mysqlx.Session.Reset {
61}
62
63Mysqlx.Ok {
64}
65
66Login OK
67
68command ok
69send Mysqlx.Session.Reset {
70}
71
72Mysqlx.Ok {
73}
74
75Login OK
76Mysqlx.Ok {
77  msg: "bye!"
78}
79ok
80Cleanup
81SET GLOBAL mysqlx_connect_timeout = 300;
82show status like 'Mysqlx_conn%';
83Variable_name	Value
84Mysqlx_connection_accept_errors	0
85Mysqlx_connection_errors	3
86Mysqlx_connections_accepted	6
87Mysqlx_connections_closed	6
88Mysqlx_connections_rejected	0
89UNINSTALL PLUGIN mysqlx;
90