polardbxengine/mysql-test/suite/x/r/galaxy_connection.result

1399 lines
41 KiB
Plaintext

call mtr.add_suppression("Plugin mysqlx reported: 'Unable to switch context to user mysql.session'");
call mtr.add_suppression("Plugin mysqlx reported: 'Unable to accept connection, disconnecting client'");
call mtr.add_suppression("Plugin mysqlx reported: 'Could not open internal MySQL session'");
call mtr.add_suppression("Plugin mysqlx reported: '.*: Error initializing session for connection: Could not open session'");
call mtr.add_suppression("Plugin 'mysqlx' has ref_count=5 after shutdown");
call mtr.add_suppression("Plugin 'mysqlx' will be forced to shutdown");
#
# Login with valid account
#
RUN SELECT PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where PLUGIN_NAME LIKE '%mysqlx%'
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE
mysqlx 1.0 ACTIVE DAEMON
mysqlx_cache_cleaner 1.0 ACTIVE AUDIT
0 rows affected
RUN create user xplugin@localhost identified by 'xplugin'
0 rows affected
RUN alter user xplugin@localhost password expire
0 rows affected
RUN create user nonblank@localhost identified by 'nonblank'
0 rows affected
RUN create user blank@localhost identified by ''
0 rows affected
RUN CREATE USER 'abc'@'localhost' IDENTIFIED BY 'abc' ACCOUNT LOCK
0 rows affected
RUN create user ''@localhost identified by 'ramana'
0 rows affected
RUN create user special@localhost identified by '1aram@&Tpu'
0 rows affected
RUN create user session@localhost identified by 'session'
0 rows affected
RUN grant all on *.* to session@localhost
0 rows affected
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 0
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 1
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 0
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 1
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 1
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
#
# Try to login with bogus accounts that could match a valid account by collation
#
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
ok
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 3 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 3
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 3
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 2
#
# Try login with user having special characters in password when mysqlxplugin installed
#
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
special@localhost special@localhost *
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 3
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 4
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 2
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 4 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 4
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 4
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 2
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 2
#
# try login with invalid host when mysqx plugin is installed
#
Application terminated with expected error: No such host is known 'invalid' (code 2005)
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 4 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 4
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 4
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 2
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 2
#
# Trying with valid user when mysqlx is not installed
#
# restart: --skip-mysqlx
Application terminated with expected error:ERROR: Connection refused connecting to HOST:PORT (code 2002)
ok
show status like 'Mysqlx_connections_closed';
Variable_name Value
show status like 'Mysqlx_connections_accepted';
Variable_name Value
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
#
# Try login using mysqlx protocol when server and mysqlx loaded with super user
#
# restart:
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
x_root@localhost x_root@localhost *
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 0
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 0
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 1
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 1
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
#
# Try login with valid user but incorrect password
#
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 1 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 2
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 2
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 1
#
# Try login with user doesn't exists when mysqlx installed
#
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 2 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 3 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 3
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 3
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 2
#
# Try login with user whose password expired when mysqlx installed
#
Application terminated with expected error: Your password has expired. To log in you must change it using a client that supports expired passwords. (code 1862)
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 3 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 4 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 4
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 4
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 3
#
# Try login with user whose account is locked when mysqlx installed
#
Application terminated with expected error: Access denied for user 'abc'@'localhost'. Account is locked. (code 3118)
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 4 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 5 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 5
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 5
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 4
#
# Try login with internal user account and expect account is locked error
#
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510)
# Syncing with status [ 'Mysqlx_sessions_rejected' == 5 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 6 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 6
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 6
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 5
#
# Login with valid user and valid password when mysqlx installed
#
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@localhost nonblank@localhost *
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 6
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 7
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 5
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 7 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 7
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 7
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 2
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 5
#
# Login with valid user and blank password when mysqlx installed
#
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
blank@localhost blank@localhost *
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 7
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 8
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 3
Mysqlx_sessions_closed 2
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 5
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 3 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 8 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 8
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 8
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 3
Mysqlx_sessions_closed 3
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 5
#
# Try login with valid user when server started with localhost as bind-address and mysqlx loaded
#
# restart: --bind-address=localhost
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@localhost nonblank@localhost localhost
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 0
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 0
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@localhost nonblank@localhost localhost
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 2
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 2
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 2
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 2
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
#
# Try login with valid user when server started with 127.0.0.1 as bind-address and mysqlx loaded
#
# restart: --bind-address=127.0.0.1
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@localhost nonblank@localhost 127.0.0.1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 0
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 0
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 1
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 1
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@localhost nonblank@localhost 127.0.0.1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 2
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 2 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 2
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 2
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 2
Mysqlx_sessions_closed 2
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
#
# Try login with valid non-super and super user when server is in offline mode and mysqlx loaded
#
# restart: --offline_mode=ON
Application terminated with expected error: The server is currently in offline mode (code 3032)
ok
# Syncing with status [ 'Mysqlx_sessions_rejected' == 1 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 1
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 1
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 0
Mysqlx_sessions_closed 0
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 1
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
x_root@localhost x_root@localhost *
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 1
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 2
0 rows affected
Got expected error (code 0)
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Got expected error (code 0)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 0
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 1
0 rows affected
Got expected error (code 0)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 2
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 2
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 1
#
# Start server with session tracking variables and monitor them using xprotocol
#
# restart:
RUN SET @@session.session_track_system_variables='mysqlx_port,mysqlx_idle_worker_thread_timeout,mysqlx_max_allowed_packet,mysqlx_max_connections,mysqlx_min_worker_threads'
0 rows affected
RUN show variables like '%session_track%'
Variable_name Value
session_track_gtids OFF
session_track_index OFF
session_track_schema ON
session_track_state_change OFF
session_track_system_variables mysqlx_port,mysqlx_idle_worker_thread_timeout,mysqlx_max_allowed_packet,mysqlx_max_connections,mysqlx_min_worker_threads
session_track_transaction_info OFF
0 rows affected
RUN uninstall plugin mysqlx;
Got expected error: Command not supported by pluggable protocols (code 3130)
RUN show warnings
Level Code Message
Error 3130 Command not supported by pluggable protocols
0 rows affected
RUN show variables like '%mysqlx_max_connections%'
Variable_name Value
mysqlx_max_connections 100
0 rows affected
RUN set @@global.mysqlx_max_connections=100
0 rows affected
RUN show variables like '%mysqlx_max_connections%'
Variable_name Value
mysqlx_max_connections 100
0 rows affected
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 0
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 1
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Variable_name Value
Mysqlx_sessions 1
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 0
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 1
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 1
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
#
# Try login with user whose password expired when mysqlx installed and when server started with skip-disconnect-on-expired-password option
#
# restart: --skip-disconnect-on-expired-password
NOTICE: Account password expired
RUN select user(),current_user(),@@bind_address
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
RUN show status like 'Mysqlx_connections_closed'
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
RUN show status like 'Mysqlx_connections_accepted'
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
RUN show status like 'Mysqlx_connection_accept_errors'
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
RUN show status where `Variable_name` like 'Mysqlx_sessions%' and not `Variable_name` like 'Mysqlx_sessions_fatal_error'
Got expected error: You must reset your password using ALTER USER statement before executing this statement. (code 1820)
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_sessions_closed' == 1 ]
# Syncing with status [ 'Mysqlx_connections_closed' == 1 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 1
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 1
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
show status where
`Variable_name`like 'Mysqlx_sessions%' and
not `Variable_name` like 'Mysqlx_sessions_fatal_error';
Variable_name Value
Mysqlx_sessions 0
Mysqlx_sessions_accepted 1
Mysqlx_sessions_closed 1
Mysqlx_sessions_killed 0
Mysqlx_sessions_rejected 0
#
# Try to open xprotocol sessions more than mysqlx_max_connections,
# expect error for last connection
#
# restart: --mysqlx_max_connections=2
RUN create user con1@localhost identified by 'con1'
0 rows affected
RUN create user con2@localhost identified by 'con2'
0 rows affected
RUN grant all on *.* to con2@localhost
0 rows affected
Test data
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
1 x_root localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
create and activate new session con1
connecting...
active session is now 'con1'
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
2 con1 localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
open 3rd xprotocol connection where 2 sessions already opened (may fail)
connecting...
active session is now 'con2'
closing session con2
switched to session default
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
client_id user host
1 x_root localhost
2 con1 localhost
command ok
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 0
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 2
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_connections_closed' == 2 ]
# Syncing with status [ 'Mysqlx_connections_accepted' == 2 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 2
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 2
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
#
# Try to open xprotocol sessions as that of mysqlx_max_connections set
#
drop user con1@localhost;
drop user con2@localhost;
# restart: --mysqlx_max_connections=3
RUN create user con1@localhost identified by 'con1'
0 rows affected
RUN create user con2@localhost identified by 'con2'
0 rows affected
RUN grant all on *.* to con2@localhost
0 rows affected
Test data
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
1 x_root localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
create and activate new session con1
connecting...
active session is now 'con1'
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
2 con1 localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
open 3rd xprotocol connection where 2 sessions already opened
connecting...
active session is now 'con2'
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
client_id user host
1 x_root localhost
2 con1 localhost
3 con2 localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 0
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 3
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
closing session con2
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_connections_closed' == 3 ]
# Syncing with status [ 'Mysqlx_connections_accepted' == 3 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 3
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 3
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
#
# Open max allowed connections and expect error for new connections and changes value and connect again,expect success
#
RUN create user xcon1@localhost identified by 'xcon1'
0 rows affected
RUN create user xcon2@localhost identified by 'xcon2'
0 rows affected
RUN grant all on *.* to xcon2@localhost
0 rows affected
RUN set @@global.mysqlx_max_connections=2
0 rows affected
Test data
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
4 x_root localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 3
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 4
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
create and activate new session con1
connecting...
active session is now 'xcon1'
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
5 xcon1 localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 3
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 5
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
open 3rd xprotocol connection where 2 sessions already opened
this scenario is related to Bug#21374656
connecting...
active session is now 'xcon2'
closing session xcon2
switched to session default
switched to session default
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
client_id user host
4 x_root localhost
5 xcon1 localhost
command ok
RUN set @@global.mysqlx_max_connections=3
0 rows affected
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 3
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 5
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
connecting...
active session is now 'xcon2'
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
client_id user host
4 x_root localhost
5 xcon1 localhost
7 xcon2 localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
RUN drop user xcon1@localhost
0 rows affected
RUN drop user xcon2@localhost
0 rows affected
RUN set @@global.mysqlx_max_connections=100
0 rows affected
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 3
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 6
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
closing session xcon2
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_connections_closed' == 6 ]
# Syncing with status [ 'Mysqlx_connections_accepted' == 6 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 6
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 6
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
kill xprotocol session when some operations are going on there using mysqx protocol
RUN create user xcon1@localhost identified by 'xcon1'
0 rows affected
RUN create user xcon2@localhost identified by 'xcon2'
0 rows affected
RUN grant all on *.* to xcon2@localhost
0 rows affected
RUN SET GLOBAL mysqlx_connect_timeout = 300
0 rows affected
Test data
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
8 x_root localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 6
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 7
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
create and activate new session con1
connecting...
active session is now 'xcon1'
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 6
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 8
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
client_id user host
9 xcon1 localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
send Mysqlx.Sql.StmtExecute {
stmt: "select sleep(100);"
}
open 3rd xprotocol connection where 2 sessions already opened
connecting...
active session is now 'xcon2'
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 6
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 9
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
switched to session default
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
client_id user host
8 x_root localhost
9 xcon1 localhost
10 xcon2 localhost
command ok
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 6
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 9
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
connecting...
active session is now 'xcon3'
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
client_id user host
8 x_root localhost
9 xcon1 localhost
10 xcon2 localhost
11 xcon2 localhost
command ok
Namespace 'xplugin' is deprecated, please use 'mysqlx' instead
send Mysqlx.Sql.StmtExecute {
stmt: "kill_client"
args {
type: SCALAR
scalar {
type: V_UINT
v_unsigned_int: 9
}
}
namespace: "xplugin"
}
expect Mysqlx.Sql.StmtExecuteOk
command ok
switched to session xcon1
Server disconnected
closing session xcon1
switched to session default
send Mysqlx.Sql.StmtExecute {
stmt: "list_clients"
namespace: "xplugin"
}
client_id user host
8 x_root localhost
10 xcon2 localhost
11 xcon2 localhost
command ok
RUN drop user xcon1@localhost
0 rows affected
RUN drop user xcon2@localhost
0 rows affected
RUN show status like 'Mysqlx_connections_closed'
Variable_name Value
Mysqlx_connections_closed 7
0 rows affected
RUN show status like 'Mysqlx_connections_accepted'
Variable_name Value
Mysqlx_connections_accepted 10
0 rows affected
RUN show status like 'Mysqlx_connection_accept_errors'
Variable_name Value
Mysqlx_connection_accept_errors 0
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
# Syncing with status [ 'Mysqlx_connections_closed' == 10 ]
# Syncing with status [ 'Mysqlx_connections_accepted' == 10 ]
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 10
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 10
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
connecting...
Got expected error: Access denied for user 'abc'@'localhost'. Account is locked. (code 3118)
ok
drop user xplugin@localhost;
drop user nonblank@localhost;
drop user blank@localhost;
drop user abc@localhost;
drop user con1@localhost;
drop user con2@localhost;
show status like 'Mysqlx_connections_closed';
Variable_name Value
Mysqlx_connections_closed 12
show status like 'Mysqlx_connections_accepted';
Variable_name Value
Mysqlx_connections_accepted 12
show status like 'Mysqlx_connection_accept_errors';
Variable_name Value
Mysqlx_connection_accept_errors 0
SET GLOBAL mysqlx_connect_timeout = DEFAULT;