1call mtr.add_suppression("Plugin mysqlx reported: 'Unable to switch context to user mysql.session'");
2call mtr.add_suppression("Plugin mysqlx reported: 'Unable to accept connection, disconnecting client'");
3call mtr.add_suppression("Plugin mysqlx reported: 'Could not open internal MySQL session'");
4call mtr.add_suppression("Plugin mysqlx reported: '.*: Error initializing session for connection: Too many connections'");
5call mtr.add_suppression("Plugin 'mysqlx' has ref_count=5 after shutdown");
6call mtr.add_suppression("Plugin 'mysqlx' will be forced to shutdown");
7#
8# Login with valid account
9#
10RUN SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where PLUGIN_NAME LIKE '%mysqlx%'
11PLUGIN_NAME	PLUGIN_VERSION	PLUGIN_STATUS	PLUGIN_TYPE
12mysqlx_cache_cleaner	1.0	ACTIVE	AUDIT
13mysqlx	1.0	ACTIVE	DAEMON
140 rows affected
15RUN create user xplugin@localhost identified by 'xplugin'
16
170 rows affected
18RUN alter user xplugin@localhost password expire
19
200 rows affected
21RUN create user nonblank@localhost identified by 'nonblank'
22
230 rows affected
24RUN create user blank@localhost identified by ''
25
260 rows affected
27RUN CREATE USER 'abc'@'localhost' IDENTIFIED BY 'abc' ACCOUNT LOCK
28
290 rows affected
30RUN create user ''@localhost identified by 'ramana'
31
320 rows affected
33RUN create user special@localhost identified by '1aram@&Tpu'
34
350 rows affected
36RUN create user session@localhost identified by 'session'
37
380 rows affected
39RUN grant all on *.* to session@localhost
40
410 rows affected
42RUN show status like 'Mysqlx_connections_closed'
43Variable_name	Value
44Mysqlx_connections_closed	0
450 rows affected
46RUN show status like 'Mysqlx_connections_accepted'
47Variable_name	Value
48Mysqlx_connections_accepted	1
490 rows affected
50RUN show status like 'Mysqlx_connection_accept_errors'
51Variable_name	Value
52Mysqlx_connection_accept_errors	0
530 rows affected
54RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
55Variable_name	Value
56Mysqlx_sessions	1
57Mysqlx_sessions_accepted	1
58Mysqlx_sessions_closed	0
59Mysqlx_sessions_killed	0
60Mysqlx_sessions_rejected	0
610 rows affected
62Mysqlx.Ok {
63  msg: "bye!"
64}
65ok
66# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
67show status like 'Mysqlx_connections_closed';
68Variable_name	Value
69Mysqlx_connections_closed	1
70show status like 'Mysqlx_connections_accepted';
71Variable_name	Value
72Mysqlx_connections_accepted	1
73show status like 'Mysqlx_connection_accept_errors';
74Variable_name	Value
75Mysqlx_connection_accept_errors	0
76show status where
77`Variable_name`like  'Mysqlx_sessions%' and
78not `Variable_name` like  'Mysqlx_sessions_fatal_error';
79Variable_name	Value
80Mysqlx_sessions	0
81Mysqlx_sessions_accepted	1
82Mysqlx_sessions_closed	1
83Mysqlx_sessions_killed	0
84Mysqlx_sessions_rejected	0
85#
86# Try to login with bogus accounts that could match a valid account by collation
87#
88Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
89ok
90Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
91ok
92# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
93# Syncing with status [ 'Mysqlx_connections_closed' == 3 ]
94show status like 'Mysqlx_connections_closed';
95Variable_name	Value
96Mysqlx_connections_closed	3
97show status like 'Mysqlx_connections_accepted';
98Variable_name	Value
99Mysqlx_connections_accepted	3
100show status like 'Mysqlx_connection_accept_errors';
101Variable_name	Value
102Mysqlx_connection_accept_errors	0
103show status where
104`Variable_name`like  'Mysqlx_sessions%' and
105not `Variable_name` like  'Mysqlx_sessions_fatal_error';
106Variable_name	Value
107Mysqlx_sessions	0
108Mysqlx_sessions_accepted	1
109Mysqlx_sessions_closed	1
110Mysqlx_sessions_killed	0
111Mysqlx_sessions_rejected	2
112#
113# Try login with user having special characters in password when mysqlxplugin installed
114#
115RUN select user(),current_user(),@@bind_address
116user()	current_user()	@@bind_address
117special@localhost	special@localhost	*
1180 rows affected
119Got expected error (code 0)
120RUN show status like 'Mysqlx_connections_closed'
121Variable_name	Value
122Mysqlx_connections_closed	3
1230 rows affected
124Got expected error (code 0)
125RUN show status like 'Mysqlx_connections_accepted'
126Variable_name	Value
127Mysqlx_connections_accepted	4
1280 rows affected
129Got expected error (code 0)
130RUN show status like 'Mysqlx_connection_accept_errors'
131Variable_name	Value
132Mysqlx_connection_accept_errors	0
1330 rows affected
134Got expected error (code 0)
135RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
136Variable_name	Value
137Mysqlx_sessions	1
138Mysqlx_sessions_accepted	2
139Mysqlx_sessions_closed	1
140Mysqlx_sessions_killed	0
141Mysqlx_sessions_rejected	2
1420 rows affected
143Got expected error (code 0)
144Mysqlx.Ok {
145  msg: "bye!"
146}
147ok
148# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
149# Syncing with status [ 'Mysqlx_connections_closed' == 4 ]
150show status like 'Mysqlx_connections_closed';
151Variable_name	Value
152Mysqlx_connections_closed	4
153show status like 'Mysqlx_connections_accepted';
154Variable_name	Value
155Mysqlx_connections_accepted	4
156show status like 'Mysqlx_connection_accept_errors';
157Variable_name	Value
158Mysqlx_connection_accept_errors	0
159show status where
160`Variable_name`like  'Mysqlx_sessions%' and
161not `Variable_name` like  'Mysqlx_sessions_fatal_error';
162Variable_name	Value
163Mysqlx_sessions	0
164Mysqlx_sessions_accepted	2
165Mysqlx_sessions_closed	2
166Mysqlx_sessions_killed	0
167Mysqlx_sessions_rejected	2
168#
169# try login with invalid host when mysqx plugin is installed
170#
171Application terminated with expected error: No such host is known 'mtr_test_invalid_mysql_host' (code 2005)
172ok
173
174# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
175# Syncing with status [ 'Mysqlx_connections_closed' == 4 ]
176show status like 'Mysqlx_connections_closed';
177Variable_name	Value
178Mysqlx_connections_closed	4
179show status like 'Mysqlx_connections_accepted';
180Variable_name	Value
181Mysqlx_connections_accepted	4
182show status like 'Mysqlx_connection_accept_errors';
183Variable_name	Value
184Mysqlx_connection_accept_errors	0
185show status where
186`Variable_name`like  'Mysqlx_sessions%' and
187not `Variable_name` like  'Mysqlx_sessions_fatal_error';
188Variable_name	Value
189Mysqlx_sessions	0
190Mysqlx_sessions_accepted	2
191Mysqlx_sessions_closed	2
192Mysqlx_sessions_killed	0
193Mysqlx_sessions_rejected	2
194#
195# Trying with valid user when mysqlx is not installed
196#
197# restart: --skip-mysqlx
198Application terminated with expected error:ERROR: Connection refused connecting to HOST:PORT (code 2002)
199ok
200show status like 'Mysqlx_connections_closed';
201Variable_name	Value
202show status like 'Mysqlx_connections_accepted';
203Variable_name	Value
204show status like 'Mysqlx_connection_accept_errors';
205Variable_name	Value
206show status where
207`Variable_name`like  'Mysqlx_sessions%' and
208not `Variable_name` like  'Mysqlx_sessions_fatal_error';
209Variable_name	Value
210#
211# Try login using mysqlx protocol when server and mysqlx loaded with super user
212#
213# restart:
214RUN select user(),current_user(),@@bind_address
215user()	current_user()	@@bind_address
216x_root@localhost	x_root@localhost	*
2170 rows affected
218Got expected error (code 0)
219RUN show status like 'Mysqlx_connections_closed'
220Variable_name	Value
221Mysqlx_connections_closed	0
2220 rows affected
223Got expected error (code 0)
224RUN show status like 'Mysqlx_connections_accepted'
225Variable_name	Value
226Mysqlx_connections_accepted	1
2270 rows affected
228Got expected error (code 0)
229RUN show status like 'Mysqlx_connection_accept_errors'
230Variable_name	Value
231Mysqlx_connection_accept_errors	0
2320 rows affected
233Got expected error (code 0)
234RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
235Variable_name	Value
236Mysqlx_sessions	1
237Mysqlx_sessions_accepted	1
238Mysqlx_sessions_closed	0
239Mysqlx_sessions_killed	0
240Mysqlx_sessions_rejected	0
2410 rows affected
242Got expected error (code 0)
243Mysqlx.Ok {
244  msg: "bye!"
245}
246ok
247# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
248show status like 'Mysqlx_connections_closed';
249Variable_name	Value
250Mysqlx_connections_closed	1
251show status like 'Mysqlx_connections_accepted';
252Variable_name	Value
253Mysqlx_connections_accepted	1
254show status like 'Mysqlx_connection_accept_errors';
255Variable_name	Value
256Mysqlx_connection_accept_errors	0
257show status where
258`Variable_name`like  'Mysqlx_sessions%' and
259not `Variable_name` like  'Mysqlx_sessions_fatal_error';
260Variable_name	Value
261Mysqlx_sessions	0
262Mysqlx_sessions_accepted	1
263Mysqlx_sessions_closed	1
264Mysqlx_sessions_killed	0
265Mysqlx_sessions_rejected	0
266#
267# Try login with valid user but incorrect password
268#
269Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
270ok
271# Syncing with status [ 'Mysqlx_sessions_rejected' == 1 ]
272# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
273show status like 'Mysqlx_connections_closed';
274Variable_name	Value
275Mysqlx_connections_closed	2
276show status like 'Mysqlx_connections_accepted';
277Variable_name	Value
278Mysqlx_connections_accepted	2
279show status like 'Mysqlx_connection_accept_errors';
280Variable_name	Value
281Mysqlx_connection_accept_errors	0
282show status where
283`Variable_name`like  'Mysqlx_sessions%' and
284not `Variable_name` like  'Mysqlx_sessions_fatal_error';
285Variable_name	Value
286Mysqlx_sessions	0
287Mysqlx_sessions_accepted	1
288Mysqlx_sessions_closed	1
289Mysqlx_sessions_killed	0
290Mysqlx_sessions_rejected	1
291#
292# Try login with user doesn't exists when mysqlx installed
293#
294Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
295ok
296# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
297# Syncing with status [ 'Mysqlx_connections_closed' == 3 ]
298show status like 'Mysqlx_connections_closed';
299Variable_name	Value
300Mysqlx_connections_closed	3
301show status like 'Mysqlx_connections_accepted';
302Variable_name	Value
303Mysqlx_connections_accepted	3
304show status like 'Mysqlx_connection_accept_errors';
305Variable_name	Value
306Mysqlx_connection_accept_errors	0
307show status where
308`Variable_name`like  'Mysqlx_sessions%' and
309not `Variable_name` like  'Mysqlx_sessions_fatal_error';
310Variable_name	Value
311Mysqlx_sessions	0
312Mysqlx_sessions_accepted	1
313Mysqlx_sessions_closed	1
314Mysqlx_sessions_killed	0
315Mysqlx_sessions_rejected	2
316#
317# Try login with user whose password expired when mysqlx installed
318#
319Application terminated with expected error: Your password has expired. To log in you must change it using a client that supports expired passwords. (code 1862)
320ok
321# Syncing with status [ 'Mysqlx_sessions_rejected' == 3 ]
322# Syncing with status [ 'Mysqlx_connections_closed' == 4 ]
323show status like 'Mysqlx_connections_closed';
324Variable_name	Value
325Mysqlx_connections_closed	4
326show status like 'Mysqlx_connections_accepted';
327Variable_name	Value
328Mysqlx_connections_accepted	4
329show status like 'Mysqlx_connection_accept_errors';
330Variable_name	Value
331Mysqlx_connection_accept_errors	0
332show status where
333`Variable_name`like  'Mysqlx_sessions%' and
334not `Variable_name` like  'Mysqlx_sessions_fatal_error';
335Variable_name	Value
336Mysqlx_sessions	0
337Mysqlx_sessions_accepted	1
338Mysqlx_sessions_closed	1
339Mysqlx_sessions_killed	0
340Mysqlx_sessions_rejected	3
341#
342# Try login with user whose account is locked when mysqlx installed
343#
344Application terminated with expected error: Access denied for user 'abc'@'localhost'. Account is locked. (code 3118)
345ok
346# Syncing with status [ 'Mysqlx_sessions_rejected' == 4 ]
347# Syncing with status [ 'Mysqlx_connections_closed' == 5 ]
348show status like 'Mysqlx_connections_closed';
349Variable_name	Value
350Mysqlx_connections_closed	5
351show status like 'Mysqlx_connections_accepted';
352Variable_name	Value
353Mysqlx_connections_accepted	5
354show status like 'Mysqlx_connection_accept_errors';
355Variable_name	Value
356Mysqlx_connection_accept_errors	0
357show status where
358`Variable_name`like  'Mysqlx_sessions%' and
359not `Variable_name` like  'Mysqlx_sessions_fatal_error';
360Variable_name	Value
361Mysqlx_sessions	0
362Mysqlx_sessions_accepted	1
363Mysqlx_sessions_closed	1
364Mysqlx_sessions_killed	0
365Mysqlx_sessions_rejected	4
366#
367# Try login with internal user account and expect account is locked error
368#
369Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
370# Syncing with status [ 'Mysqlx_sessions_rejected' == 5 ]
371# Syncing with status [ 'Mysqlx_connections_closed' == 6 ]
372show status like 'Mysqlx_connections_closed';
373Variable_name	Value
374Mysqlx_connections_closed	6
375show status like 'Mysqlx_connections_accepted';
376Variable_name	Value
377Mysqlx_connections_accepted	6
378show status like 'Mysqlx_connection_accept_errors';
379Variable_name	Value
380Mysqlx_connection_accept_errors	0
381show status where
382`Variable_name`like  'Mysqlx_sessions%' and
383not `Variable_name` like  'Mysqlx_sessions_fatal_error';
384Variable_name	Value
385Mysqlx_sessions	0
386Mysqlx_sessions_accepted	1
387Mysqlx_sessions_closed	1
388Mysqlx_sessions_killed	0
389Mysqlx_sessions_rejected	5
390#
391# Login with valid user and valid password when mysqlx installed
392#
393RUN select user(),current_user(),@@bind_address
394user()	current_user()	@@bind_address
395nonblank@localhost	nonblank@localhost	*
3960 rows affected
397Got expected error (code 0)
398RUN show status like 'Mysqlx_connections_closed'
399Variable_name	Value
400Mysqlx_connections_closed	6
4010 rows affected
402Got expected error (code 0)
403RUN show status like 'Mysqlx_connections_accepted'
404Variable_name	Value
405Mysqlx_connections_accepted	7
4060 rows affected
407Got expected error (code 0)
408RUN show status like 'Mysqlx_connection_accept_errors'
409Variable_name	Value
410Mysqlx_connection_accept_errors	0
4110 rows affected
412Got expected error (code 0)
413RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
414Variable_name	Value
415Mysqlx_sessions	1
416Mysqlx_sessions_accepted	2
417Mysqlx_sessions_closed	1
418Mysqlx_sessions_killed	0
419Mysqlx_sessions_rejected	5
4200 rows affected
421Got expected error (code 0)
422Mysqlx.Ok {
423  msg: "bye!"
424}
425ok
426# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ]
427# Syncing with status [ 'Mysqlx_connections_closed' == 7 ]
428show status like 'Mysqlx_connections_closed';
429Variable_name	Value
430Mysqlx_connections_closed	7
431show status like 'Mysqlx_connections_accepted';
432Variable_name	Value
433Mysqlx_connections_accepted	7
434show status like 'Mysqlx_connection_accept_errors';
435Variable_name	Value
436Mysqlx_connection_accept_errors	0
437show status where
438`Variable_name`like  'Mysqlx_sessions%' and
439not `Variable_name` like  'Mysqlx_sessions_fatal_error';
440Variable_name	Value
441Mysqlx_sessions	0
442Mysqlx_sessions_accepted	2
443Mysqlx_sessions_closed	2
444Mysqlx_sessions_killed	0
445Mysqlx_sessions_rejected	5
446#
447# Login with valid user and blank password when mysqlx installed
448#
449RUN select user(),current_user(),@@bind_address
450user()	current_user()	@@bind_address
451blank@localhost	blank@localhost	*
4520 rows affected
453Got expected error (code 0)
454RUN show status like 'Mysqlx_connections_closed'
455Variable_name	Value
456Mysqlx_connections_closed	7
4570 rows affected
458Got expected error (code 0)
459RUN show status like 'Mysqlx_connections_accepted'
460Variable_name	Value
461Mysqlx_connections_accepted	8
4620 rows affected
463Got expected error (code 0)
464RUN show status like 'Mysqlx_connection_accept_errors'
465Variable_name	Value
466Mysqlx_connection_accept_errors	0
4670 rows affected
468Got expected error (code 0)
469RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
470Variable_name	Value
471Mysqlx_sessions	1
472Mysqlx_sessions_accepted	3
473Mysqlx_sessions_closed	2
474Mysqlx_sessions_killed	0
475Mysqlx_sessions_rejected	5
4760 rows affected
477Got expected error (code 0)
478Mysqlx.Ok {
479  msg: "bye!"
480}
481ok
482# Syncing with status [ 'Mysqlx_sessions_closed' == 3 ]
483# Syncing with status [ 'Mysqlx_connections_closed' == 8 ]
484show status like 'Mysqlx_connections_closed';
485Variable_name	Value
486Mysqlx_connections_closed	8
487show status like 'Mysqlx_connections_accepted';
488Variable_name	Value
489Mysqlx_connections_accepted	8
490show status like 'Mysqlx_connection_accept_errors';
491Variable_name	Value
492Mysqlx_connection_accept_errors	0
493show status where
494`Variable_name`like  'Mysqlx_sessions%' and
495not `Variable_name` like  'Mysqlx_sessions_fatal_error';
496Variable_name	Value
497Mysqlx_sessions	0
498Mysqlx_sessions_accepted	3
499Mysqlx_sessions_closed	3
500Mysqlx_sessions_killed	0
501Mysqlx_sessions_rejected	5
502#
503# Try login with valid user when server started with localhost as bind-address and mysqlx loaded
504#
505# restart: --bind-address=localhost
506RUN select user(),current_user(),@@bind_address
507user()	current_user()	@@bind_address
508nonblank@localhost	nonblank@localhost	localhost
5090 rows affected
510Got expected error (code 0)
511RUN show status like 'Mysqlx_connections_closed'
512Variable_name	Value
513Mysqlx_connections_closed	0
5140 rows affected
515Got expected error (code 0)
516RUN show status like 'Mysqlx_connections_accepted'
517Variable_name	Value
518Mysqlx_connections_accepted	1
5190 rows affected
520Got expected error (code 0)
521RUN show status like 'Mysqlx_connection_accept_errors'
522Variable_name	Value
523Mysqlx_connection_accept_errors	0
5240 rows affected
525Got expected error (code 0)
526RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
527Variable_name	Value
528Mysqlx_sessions	1
529Mysqlx_sessions_accepted	1
530Mysqlx_sessions_closed	0
531Mysqlx_sessions_killed	0
532Mysqlx_sessions_rejected	0
5330 rows affected
534Got expected error (code 0)
535Mysqlx.Ok {
536  msg: "bye!"
537}
538ok
539RUN select user(),current_user(),@@bind_address
540user()	current_user()	@@bind_address
541nonblank@localhost	nonblank@localhost	localhost
5420 rows affected
543Got expected error (code 0)
544RUN show status like 'Mysqlx_connections_closed'
545Variable_name	Value
546Mysqlx_connections_closed	1
5470 rows affected
548Got expected error (code 0)
549RUN show status like 'Mysqlx_connections_accepted'
550Variable_name	Value
551Mysqlx_connections_accepted	2
5520 rows affected
553Got expected error (code 0)
554RUN show status like 'Mysqlx_connection_accept_errors'
555Variable_name	Value
556Mysqlx_connection_accept_errors	0
5570 rows affected
558Got expected error (code 0)
559RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
560Variable_name	Value
561Mysqlx_sessions	1
562Mysqlx_sessions_accepted	2
563Mysqlx_sessions_closed	1
564Mysqlx_sessions_killed	0
565Mysqlx_sessions_rejected	0
5660 rows affected
567Got expected error (code 0)
568Mysqlx.Ok {
569  msg: "bye!"
570}
571ok
572# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ]
573# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
574show status like 'Mysqlx_connections_closed';
575Variable_name	Value
576Mysqlx_connections_closed	2
577show status like 'Mysqlx_connections_accepted';
578Variable_name	Value
579Mysqlx_connections_accepted	2
580show status like 'Mysqlx_connection_accept_errors';
581Variable_name	Value
582Mysqlx_connection_accept_errors	0
583show status where
584`Variable_name`like  'Mysqlx_sessions%' and
585not `Variable_name` like  'Mysqlx_sessions_fatal_error';
586Variable_name	Value
587Mysqlx_sessions	0
588Mysqlx_sessions_accepted	2
589Mysqlx_sessions_closed	2
590Mysqlx_sessions_killed	0
591Mysqlx_sessions_rejected	0
592#
593# Try login with valid user when server started with 127.0.0.1 as bind-address and mysqlx loaded
594#
595# restart: --bind-address=127.0.0.1
596RUN select user(),current_user(),@@bind_address
597user()	current_user()	@@bind_address
598nonblank@localhost	nonblank@localhost	127.0.0.1
5990 rows affected
600Got expected error (code 0)
601RUN show status like 'Mysqlx_connections_closed'
602Variable_name	Value
603Mysqlx_connections_closed	0
6040 rows affected
605Got expected error (code 0)
606RUN show status like 'Mysqlx_connections_accepted'
607Variable_name	Value
608Mysqlx_connections_accepted	1
6090 rows affected
610Got expected error (code 0)
611RUN show status like 'Mysqlx_connection_accept_errors'
612Variable_name	Value
613Mysqlx_connection_accept_errors	0
6140 rows affected
615Got expected error (code 0)
616RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
617Variable_name	Value
618Mysqlx_sessions	1
619Mysqlx_sessions_accepted	1
620Mysqlx_sessions_closed	0
621Mysqlx_sessions_killed	0
622Mysqlx_sessions_rejected	0
6230 rows affected
624Got expected error (code 0)
625Mysqlx.Ok {
626  msg: "bye!"
627}
628ok
629# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
630# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
631show status like 'Mysqlx_connections_closed';
632Variable_name	Value
633Mysqlx_connections_closed	1
634show status like 'Mysqlx_connections_accepted';
635Variable_name	Value
636Mysqlx_connections_accepted	1
637show status like 'Mysqlx_connection_accept_errors';
638Variable_name	Value
639Mysqlx_connection_accept_errors	0
640show status where
641`Variable_name`like  'Mysqlx_sessions%' and
642not `Variable_name` like  'Mysqlx_sessions_fatal_error';
643Variable_name	Value
644Mysqlx_sessions	0
645Mysqlx_sessions_accepted	1
646Mysqlx_sessions_closed	1
647Mysqlx_sessions_killed	0
648Mysqlx_sessions_rejected	0
649RUN select user(),current_user(),@@bind_address
650user()	current_user()	@@bind_address
651nonblank@localhost	nonblank@localhost	127.0.0.1
6520 rows affected
653Got expected error (code 0)
654RUN show status like 'Mysqlx_connections_closed'
655Variable_name	Value
656Mysqlx_connections_closed	1
6570 rows affected
658Got expected error (code 0)
659RUN show status like 'Mysqlx_connections_accepted'
660Variable_name	Value
661Mysqlx_connections_accepted	2
6620 rows affected
663Got expected error (code 0)
664RUN show status like 'Mysqlx_connection_accept_errors'
665Variable_name	Value
666Mysqlx_connection_accept_errors	0
6670 rows affected
668Got expected error (code 0)
669RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
670Variable_name	Value
671Mysqlx_sessions	1
672Mysqlx_sessions_accepted	2
673Mysqlx_sessions_closed	1
674Mysqlx_sessions_killed	0
675Mysqlx_sessions_rejected	0
6760 rows affected
677Got expected error (code 0)
678Mysqlx.Ok {
679  msg: "bye!"
680}
681ok
682# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ]
683# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
684show status like 'Mysqlx_connections_closed';
685Variable_name	Value
686Mysqlx_connections_closed	2
687show status like 'Mysqlx_connections_accepted';
688Variable_name	Value
689Mysqlx_connections_accepted	2
690show status like 'Mysqlx_connection_accept_errors';
691Variable_name	Value
692Mysqlx_connection_accept_errors	0
693show status where
694`Variable_name`like  'Mysqlx_sessions%' and
695not `Variable_name` like  'Mysqlx_sessions_fatal_error';
696Variable_name	Value
697Mysqlx_sessions	0
698Mysqlx_sessions_accepted	2
699Mysqlx_sessions_closed	2
700Mysqlx_sessions_killed	0
701Mysqlx_sessions_rejected	0
702#
703# Try login with valid non-super and super user when server is in offline mode and mysqlx loaded
704#
705# restart: --offline_mode=ON
706Application terminated with expected error: The server is currently in offline mode (code 3032)
707ok
708# Syncing with status [ 'Mysqlx_sessions_rejected' == 1 ]
709# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
710show status like 'Mysqlx_connections_closed';
711Variable_name	Value
712Mysqlx_connections_closed	1
713show status like 'Mysqlx_connections_accepted';
714Variable_name	Value
715Mysqlx_connections_accepted	1
716show status like 'Mysqlx_connection_accept_errors';
717Variable_name	Value
718Mysqlx_connection_accept_errors	0
719show status where
720`Variable_name`like  'Mysqlx_sessions%' and
721not `Variable_name` like  'Mysqlx_sessions_fatal_error';
722Variable_name	Value
723Mysqlx_sessions	0
724Mysqlx_sessions_accepted	0
725Mysqlx_sessions_closed	0
726Mysqlx_sessions_killed	0
727Mysqlx_sessions_rejected	1
728RUN select user(),current_user(),@@bind_address
729user()	current_user()	@@bind_address
730x_root@localhost	x_root@localhost	*
7310 rows affected
732Got expected error (code 0)
733RUN show status like 'Mysqlx_connections_closed'
734Variable_name	Value
735Mysqlx_connections_closed	1
7360 rows affected
737Got expected error (code 0)
738RUN show status like 'Mysqlx_connections_accepted'
739Variable_name	Value
740Mysqlx_connections_accepted	2
7410 rows affected
742Got expected error (code 0)
743RUN show status like 'Mysqlx_connection_accept_errors'
744Variable_name	Value
745Mysqlx_connection_accept_errors	0
7460 rows affected
747Got expected error (code 0)
748RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
749Variable_name	Value
750Mysqlx_sessions	1
751Mysqlx_sessions_accepted	1
752Mysqlx_sessions_closed	0
753Mysqlx_sessions_killed	0
754Mysqlx_sessions_rejected	1
7550 rows affected
756Got expected error (code 0)
757Mysqlx.Ok {
758  msg: "bye!"
759}
760ok
761# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
762# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
763show status like 'Mysqlx_connections_closed';
764Variable_name	Value
765Mysqlx_connections_closed	2
766show status like 'Mysqlx_connections_accepted';
767Variable_name	Value
768Mysqlx_connections_accepted	2
769show status like 'Mysqlx_connection_accept_errors';
770Variable_name	Value
771Mysqlx_connection_accept_errors	0
772show status where
773`Variable_name`like  'Mysqlx_sessions%' and
774not `Variable_name` like  'Mysqlx_sessions_fatal_error';
775Variable_name	Value
776Mysqlx_sessions	0
777Mysqlx_sessions_accepted	1
778Mysqlx_sessions_closed	1
779Mysqlx_sessions_killed	0
780Mysqlx_sessions_rejected	1
781#
782# Start server with session tracking variables and monitor them using xprotocol
783#
784# restart:
785RUN SET @@session.session_track_system_variables='mysqlx_port,mysqlx_idle_worker_thread_timeout,mysqlx_max_allowed_packet,mysqlx_max_connections,mysqlx_min_worker_threads'
786
7870 rows affected
788RUN show variables like '%session_track%'
789Variable_name	Value
790session_track_gtids	OFF
791session_track_schema	ON
792session_track_state_change	OFF
793session_track_system_variables	mysqlx_port,mysqlx_idle_worker_thread_timeout,mysqlx_max_allowed_packet,mysqlx_max_connections,mysqlx_min_worker_threads
794session_track_transaction_info	OFF
7950 rows affected
796RUN uninstall plugin mysqlx;
797Got expected error: Command not supported by pluggable protocols (code 3130)
798RUN show warnings
799Level	Code	Message
800Error	3130	Command not supported by pluggable protocols
8010 rows affected
802RUN show variables like '%mysqlx_max_connections%'
803Variable_name	Value
804mysqlx_max_connections	100
8050 rows affected
806RUN set @@global.mysqlx_max_connections=100
807
8080 rows affected
809RUN show variables like '%mysqlx_max_connections%'
810Variable_name	Value
811mysqlx_max_connections	100
8120 rows affected
813RUN show status like 'Mysqlx_connections_closed'
814Variable_name	Value
815Mysqlx_connections_closed	0
8160 rows affected
817RUN show status like 'Mysqlx_connections_accepted'
818Variable_name	Value
819Mysqlx_connections_accepted	1
8200 rows affected
821RUN show status like 'Mysqlx_connection_accept_errors'
822Variable_name	Value
823Mysqlx_connection_accept_errors	0
8240 rows affected
825RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
826Variable_name	Value
827Mysqlx_sessions	1
828Mysqlx_sessions_accepted	1
829Mysqlx_sessions_closed	0
830Mysqlx_sessions_killed	0
831Mysqlx_sessions_rejected	0
8320 rows affected
833Mysqlx.Ok {
834  msg: "bye!"
835}
836ok
837# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
838# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
839show status like 'Mysqlx_connections_closed';
840Variable_name	Value
841Mysqlx_connections_closed	1
842show status like 'Mysqlx_connections_accepted';
843Variable_name	Value
844Mysqlx_connections_accepted	1
845show status like 'Mysqlx_connection_accept_errors';
846Variable_name	Value
847Mysqlx_connection_accept_errors	0
848show status where
849`Variable_name`like  'Mysqlx_sessions%' and
850not `Variable_name` like  'Mysqlx_sessions_fatal_error';
851Variable_name	Value
852Mysqlx_sessions	0
853Mysqlx_sessions_accepted	1
854Mysqlx_sessions_closed	1
855Mysqlx_sessions_killed	0
856Mysqlx_sessions_rejected	0
857#
858# Try login with user whose password expired when mysqlx installed and when server started with skip-disconnect-on-expired-password option
859#
860# restart:  --skip-disconnect-on-expired-password
861NOTICE: Account password expired
862RUN select user(),current_user(),@@bind_address
863Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
864RUN show status like 'Mysqlx_connections_closed'
865Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
866RUN show status like 'Mysqlx_connections_accepted'
867Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
868RUN show status like 'Mysqlx_connection_accept_errors'
869Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
870RUN show status where `Variable_name` like  'Mysqlx_sessions%' and not `Variable_name` like  'Mysqlx_sessions_fatal_error'
871Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
872Mysqlx.Ok {
873  msg: "bye!"
874}
875ok
876# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
877# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
878show status like 'Mysqlx_connections_closed';
879Variable_name	Value
880Mysqlx_connections_closed	1
881show status like 'Mysqlx_connections_accepted';
882Variable_name	Value
883Mysqlx_connections_accepted	1
884show status like 'Mysqlx_connection_accept_errors';
885Variable_name	Value
886Mysqlx_connection_accept_errors	0
887show status where
888`Variable_name`like  'Mysqlx_sessions%' and
889not `Variable_name` like  'Mysqlx_sessions_fatal_error';
890Variable_name	Value
891Mysqlx_sessions	0
892Mysqlx_sessions_accepted	1
893Mysqlx_sessions_closed	1
894Mysqlx_sessions_killed	0
895Mysqlx_sessions_rejected	0
896#
897# Try to open xprotocol sessions more than mysqlx_max_connections,
898# expect error for last connection
899#
900# restart: --mysqlx_max_connections=2
901RUN create user con1@localhost identified by 'con1'
902
9030 rows affected
904RUN create user con2@localhost identified by 'con2'
905
9060 rows affected
907RUN grant all on *.* to con2@localhost
908
9090 rows affected
910Test data
911expect Mysqlx.Sql.StmtExecuteOk
912client_id	user	host
9131	x_root	localhost
914command ok
915create and activate new session con1
916connecting...
917active session is now 'con1'
918expect Mysqlx.Sql.StmtExecuteOk
919client_id	user	host
9202	con1	localhost
921command ok
922open 3rd xprotocol connection where 2 sessions already opened (may fail)
923connecting...
924active session is now 'con2'
925closing session con2
926switched to session default
927client_id	user	host
9281	x_root	localhost
9292	con1	localhost
930command ok
931RUN show status like 'Mysqlx_connections_closed'
932Variable_name	Value
933Mysqlx_connections_closed	0
9340 rows affected
935RUN show status like 'Mysqlx_connections_accepted'
936Variable_name	Value
937Mysqlx_connections_accepted	2
9380 rows affected
939RUN show status like 'Mysqlx_connection_accept_errors'
940Variable_name	Value
941Mysqlx_connection_accept_errors	0
9420 rows affected
943Mysqlx.Ok {
944  msg: "bye!"
945}
946ok
947# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
948# Syncing with status [ 'Mysqlx_connections_accepted' == 2 ]
949show status like 'Mysqlx_connections_closed';
950Variable_name	Value
951Mysqlx_connections_closed	2
952show status like 'Mysqlx_connections_accepted';
953Variable_name	Value
954Mysqlx_connections_accepted	2
955show status like 'Mysqlx_connection_accept_errors';
956Variable_name	Value
957Mysqlx_connection_accept_errors	0
958#
959# Try to open xprotocol sessions as that of mysqlx_max_connections set
960#
961drop user con1@localhost;
962drop user con2@localhost;
963# restart: --mysqlx_max_connections=3
964RUN create user con1@localhost identified by 'con1'
965
9660 rows affected
967RUN create user con2@localhost identified by 'con2'
968
9690 rows affected
970RUN grant all on *.* to con2@localhost
971
9720 rows affected
973Test data
974expect Mysqlx.Sql.StmtExecuteOk
975client_id	user	host
9761	x_root	localhost
977command ok
978create and activate new session con1
979connecting...
980active session is now 'con1'
981expect Mysqlx.Sql.StmtExecuteOk
982client_id	user	host
9832	con1	localhost
984command ok
985open 3rd xprotocol connection where 2 sessions already opened
986connecting...
987active session is now 'con2'
988client_id	user	host
9891	x_root	localhost
9902	con1	localhost
9913	con2	localhost
992command ok
993RUN show status like 'Mysqlx_connections_closed'
994Variable_name	Value
995Mysqlx_connections_closed	0
9960 rows affected
997RUN show status like 'Mysqlx_connections_accepted'
998Variable_name	Value
999Mysqlx_connections_accepted	3
10000 rows affected
1001RUN show status like 'Mysqlx_connection_accept_errors'
1002Variable_name	Value
1003Mysqlx_connection_accept_errors	0
10040 rows affected
1005closing session con2
1006Mysqlx.Ok {
1007  msg: "bye!"
1008}
1009ok
1010# Syncing with status [ 'Mysqlx_connections_closed' == 3 ]
1011# Syncing with status [ 'Mysqlx_connections_accepted' == 3 ]
1012show status like 'Mysqlx_connections_closed';
1013Variable_name	Value
1014Mysqlx_connections_closed	3
1015show status like 'Mysqlx_connections_accepted';
1016Variable_name	Value
1017Mysqlx_connections_accepted	3
1018show status like 'Mysqlx_connection_accept_errors';
1019Variable_name	Value
1020Mysqlx_connection_accept_errors	0
1021#
1022# Open max allowed connections and expect error for new connections and changes value and connect again,expect success
1023#
1024RUN create user xcon1@localhost identified by 'xcon1'
1025
10260 rows affected
1027RUN create user xcon2@localhost identified by 'xcon2'
1028
10290 rows affected
1030RUN grant all on *.* to xcon2@localhost
1031
10320 rows affected
1033RUN set @@global.mysqlx_max_connections=2
1034
10350 rows affected
1036Test data
1037expect Mysqlx.Sql.StmtExecuteOk
1038client_id	user	host
10394	x_root	localhost
1040command ok
1041RUN show status like 'Mysqlx_connections_closed'
1042Variable_name	Value
1043Mysqlx_connections_closed	3
10440 rows affected
1045RUN show status like 'Mysqlx_connections_accepted'
1046Variable_name	Value
1047Mysqlx_connections_accepted	4
10480 rows affected
1049RUN show status like 'Mysqlx_connection_accept_errors'
1050Variable_name	Value
1051Mysqlx_connection_accept_errors	0
10520 rows affected
1053create and activate new session con1
1054connecting...
1055active session is now 'xcon1'
1056expect Mysqlx.Sql.StmtExecuteOk
1057client_id	user	host
10585	xcon1	localhost
1059command ok
1060RUN show status like 'Mysqlx_connections_closed'
1061Variable_name	Value
1062Mysqlx_connections_closed	3
10630 rows affected
1064RUN show status like 'Mysqlx_connections_accepted'
1065Variable_name	Value
1066Mysqlx_connections_accepted	5
10670 rows affected
1068RUN show status like 'Mysqlx_connection_accept_errors'
1069Variable_name	Value
1070Mysqlx_connection_accept_errors	0
10710 rows affected
1072open 3rd xprotocol connection where 2 sessions already opened
1073this scenario is related to Bug#21374656
1074connecting...
1075active session is now 'xcon2'
1076closing session xcon2
1077switched to session default
1078switched to session default
1079client_id	user	host
10804	x_root	localhost
10815	xcon1	localhost
1082command ok
1083RUN set @@global.mysqlx_max_connections=3
1084
10850 rows affected
1086RUN show status like 'Mysqlx_connections_closed'
1087Variable_name	Value
1088Mysqlx_connections_closed	3
10890 rows affected
1090RUN show status like 'Mysqlx_connections_accepted'
1091Variable_name	Value
1092Mysqlx_connections_accepted	5
10930 rows affected
1094RUN show status like 'Mysqlx_connection_accept_errors'
1095Variable_name	Value
1096Mysqlx_connection_accept_errors	0
10970 rows affected
1098connecting...
1099active session is now 'xcon2'
1100client_id	user	host
11014	x_root	localhost
11025	xcon1	localhost
11037	xcon2	localhost
1104command ok
1105RUN drop user xcon1@localhost
1106
11070 rows affected
1108RUN drop user xcon2@localhost
1109
11100 rows affected
1111RUN set @@global.mysqlx_max_connections=100
1112
11130 rows affected
1114RUN show status like 'Mysqlx_connections_closed'
1115Variable_name	Value
1116Mysqlx_connections_closed	3
11170 rows affected
1118RUN show status like 'Mysqlx_connections_accepted'
1119Variable_name	Value
1120Mysqlx_connections_accepted	6
11210 rows affected
1122RUN show status like 'Mysqlx_connection_accept_errors'
1123Variable_name	Value
1124Mysqlx_connection_accept_errors	0
11250 rows affected
1126closing session xcon2
1127Mysqlx.Ok {
1128  msg: "bye!"
1129}
1130ok
1131# Syncing with status [ 'Mysqlx_connections_closed' == 6 ]
1132# Syncing with status [ 'Mysqlx_connections_accepted' == 6 ]
1133show status like 'Mysqlx_connections_closed';
1134Variable_name	Value
1135Mysqlx_connections_closed	6
1136show status like 'Mysqlx_connections_accepted';
1137Variable_name	Value
1138Mysqlx_connections_accepted	6
1139show status like 'Mysqlx_connection_accept_errors';
1140Variable_name	Value
1141Mysqlx_connection_accept_errors	0
1142kill xprotocol session when some operations are going on there using mysqx protocol
1143RUN create user xcon1@localhost identified by 'xcon1'
1144
11450 rows affected
1146RUN create user xcon2@localhost identified by 'xcon2'
1147
11480 rows affected
1149RUN grant all on *.* to xcon2@localhost
1150
11510 rows affected
1152RUN SET GLOBAL mysqlx_connect_timeout = 300
1153
11540 rows affected
1155Test data
1156expect Mysqlx.Sql.StmtExecuteOk
1157client_id	user	host
11588	x_root	localhost
1159command ok
1160RUN show status like 'Mysqlx_connections_closed'
1161Variable_name	Value
1162Mysqlx_connections_closed	6
11630 rows affected
1164RUN show status like 'Mysqlx_connections_accepted'
1165Variable_name	Value
1166Mysqlx_connections_accepted	7
11670 rows affected
1168RUN show status like 'Mysqlx_connection_accept_errors'
1169Variable_name	Value
1170Mysqlx_connection_accept_errors	0
11710 rows affected
1172create and activate new session con1
1173connecting...
1174active session is now 'xcon1'
1175RUN show status like 'Mysqlx_connections_closed'
1176Variable_name	Value
1177Mysqlx_connections_closed	6
11780 rows affected
1179RUN show status like 'Mysqlx_connections_accepted'
1180Variable_name	Value
1181Mysqlx_connections_accepted	8
11820 rows affected
1183RUN show status like 'Mysqlx_connection_accept_errors'
1184Variable_name	Value
1185Mysqlx_connection_accept_errors	0
11860 rows affected
1187expect Mysqlx.Sql.StmtExecuteOk
1188client_id	user	host
11899	xcon1	localhost
1190command ok
1191send Mysqlx.Sql.StmtExecute {
1192  stmt: "select sleep(100);"
1193}
1194
1195open 3rd xprotocol connection where 2 sessions already opened
1196connecting...
1197active session is now 'xcon2'
1198RUN show status like 'Mysqlx_connections_closed'
1199Variable_name	Value
1200Mysqlx_connections_closed	6
12010 rows affected
1202RUN show status like 'Mysqlx_connections_accepted'
1203Variable_name	Value
1204Mysqlx_connections_accepted	9
12050 rows affected
1206RUN show status like 'Mysqlx_connection_accept_errors'
1207Variable_name	Value
1208Mysqlx_connection_accept_errors	0
12090 rows affected
1210switched to session default
1211client_id	user	host
12128	x_root	localhost
12139	xcon1	localhost
121410	xcon2	localhost
1215command ok
1216RUN show status like 'Mysqlx_connections_closed'
1217Variable_name	Value
1218Mysqlx_connections_closed	6
12190 rows affected
1220RUN show status like 'Mysqlx_connections_accepted'
1221Variable_name	Value
1222Mysqlx_connections_accepted	9
12230 rows affected
1224RUN show status like 'Mysqlx_connection_accept_errors'
1225Variable_name	Value
1226Mysqlx_connection_accept_errors	0
12270 rows affected
1228connecting...
1229active session is now 'xcon3'
1230client_id	user	host
12318	x_root	localhost
12329	xcon1	localhost
123310	xcon2	localhost
123411	xcon2	localhost
1235command ok
1236expect Mysqlx.Sql.StmtExecuteOk
1237
1238command ok
1239switched to session xcon1
1240Server disconnected
1241closing session xcon1
1242switched to session default
1243client_id	user	host
12448	x_root	localhost
124510	xcon2	localhost
124611	xcon2	localhost
1247command ok
1248RUN drop user xcon1@localhost
1249
12500 rows affected
1251RUN drop user xcon2@localhost
1252
12530 rows affected
1254RUN show status like 'Mysqlx_connections_closed'
1255Variable_name	Value
1256Mysqlx_connections_closed	7
12570 rows affected
1258RUN show status like 'Mysqlx_connections_accepted'
1259Variable_name	Value
1260Mysqlx_connections_accepted	10
12610 rows affected
1262RUN show status like 'Mysqlx_connection_accept_errors'
1263Variable_name	Value
1264Mysqlx_connection_accept_errors	0
12650 rows affected
1266Mysqlx.Ok {
1267  msg: "bye!"
1268}
1269ok
1270# Syncing with status [ 'Mysqlx_connections_closed' == 10 ]
1271# Syncing with status [ 'Mysqlx_connections_accepted' == 10 ]
1272show status like 'Mysqlx_connections_closed';
1273Variable_name	Value
1274Mysqlx_connections_closed	10
1275show status like 'Mysqlx_connections_accepted';
1276Variable_name	Value
1277Mysqlx_connections_accepted	10
1278show status like 'Mysqlx_connection_accept_errors';
1279Variable_name	Value
1280Mysqlx_connection_accept_errors	0
1281open more xconnections than specified max_connections,expect error
1282RUN create user mysqlcon1@localhost identified by 'mysqlcon1'
1283
12840 rows affected
1285RUN create user mysqlcon2@localhost identified by 'mysqlcon2'
1286
12870 rows affected
1288RUN set @@global.max_connections=2
1289
12900 rows affected
1291Test data
1292expect Mysqlx.Sql.StmtExecuteOk
1293client_id	user	host
129412	x_root	localhost
1295command ok
1296create and activate new session con1
1297connecting...
1298active session is now 'con1'
1299expect Mysqlx.Sql.StmtExecuteOk
1300client_id	user	host
130113	mysqlcon1	localhost
1302command ok
1303open 3rd xprotocol connection where 2 sessions already opened
1304connecting...
1305active session is now 'con2'
1306Mysqlx.Error {
1307  severity: FATAL
1308  code: 1040
1309  msg: "Too many connections"
1310  sql_state: "HY000"
1311}
1312
1313closing session con2
1314switched to session default
1315client_id	user	host
131612	x_root	localhost
131713	mysqlcon1	localhost
1318command ok
1319RUN show status like 'Mysqlx_connections_closed'
1320Variable_name	Value
1321Mysqlx_connections_closed	11
13220 rows affected
1323RUN show status like 'Mysqlx_connections_accepted'
1324Variable_name	Value
1325Mysqlx_connections_accepted	13
13260 rows affected
1327RUN show status like 'Mysqlx_connection_accept_errors'
1328Variable_name	Value
1329Mysqlx_connection_accept_errors	0
13300 rows affected
1331RUN set @@global.max_connections=150
1332
13330 rows affected
1334Mysqlx.Ok {
1335  msg: "bye!"
1336}
1337ok
1338connecting...
1339Got expected error: Access denied for user 'abc'@'localhost'. Account is locked. (code 3118)
1340ok
1341show status like 'Mysqlx_connections_closed';
1342Variable_name	Value
1343Mysqlx_connections_closed	15
1344show status like 'Mysqlx_connections_accepted';
1345Variable_name	Value
1346Mysqlx_connections_accepted	15
1347show status like 'Mysqlx_connection_accept_errors';
1348Variable_name	Value
1349Mysqlx_connection_accept_errors	0
1350# restart:
1351drop user xplugin@localhost;
1352drop user nonblank@localhost;
1353drop user blank@localhost;
1354drop user abc@localhost;
1355drop user con1@localhost;
1356drop user con2@localhost;
1357drop user mysqlcon1@localhost;
1358drop user mysqlcon2@localhost;
1359drop user ''@localhost;
1360drop user special@localhost;
1361drop user session@localhost;
1362SET GLOBAL mysqlx_connect_timeout = DEFAULT;
1363