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

426 lines
9.0 KiB
Plaintext

call mtr.add_suppression("Maximum number of authentication attempts reached");
call mtr.add_suppression("Access denied for user .*");
CREATE USER user_127_0_0_1@127.0.0.1 IDENTIFIED WITH 'mysql_native_password' BY '';
CREATE USER user_8_8_8_8@8.8.8.8 IDENTIFIED WITH 'mysql_native_password' BY '';
CREATE USER user_all@'%' IDENTIFIED WITH 'mysql_native_password' BY '';
CREATE USER user_localhost@localhost IDENTIFIED WITH 'mysql_native_password' BY '';
CREATE USER user_localhost_8_8_8_8@localhost IDENTIFIED WITH 'mysql_native_password' BY '';
CREATE USER user_localhost_8_8_8_8@8.8.8.8 IDENTIFIED WITH 'mysql_native_password' BY '';
CREATE USER user_requires_ssl IDENTIFIED WITH 'mysql_native_password' BY '' REQUIRE SSL;
GRANT ALL ON *.* TO user_127_0_0_1@127.0.0.1;
GRANT ALL ON *.* TO user_8_8_8_8@8.8.8.8;
GRANT ALL ON *.* TO user_all@'%';
GRANT ALL ON *.* TO user_localhost@localhost;
GRANT ALL ON *.* TO user_localhost_8_8_8_8@8.8.8.8;
GRANT ALL ON *.* TO user_localhost_8_8_8_8@localhost;
GRANT ALL ON *.* TO user_requires_ssl;
CREATE TABLE `city` (
`ID` int(11) NOT NULL auto_increment,
`Name` char(35) NOT NULL default '',
`CountryCode` char(3) NOT NULL default '',
`District` char(20) NOT NULL default '',
`Population` int(11) NOT NULL default '0',
PRIMARY KEY (`ID`)
);
Warnings:
Warning 1681 Integer display width is deprecated and will be removed in a future release.
Warning 1681 Integer display width is deprecated and will be removed in a future release.
INSERT INTO `city` VALUES (1,'Kabul','AFG','Kabol',1780);
INSERT INTO `city` VALUES (2,'Qandahar','AFG','Qandahar',237);
INSERT INTO `city` VALUES (3,'Herat','AFG','Herat',186);
INSERT INTO `city` VALUES (4,'Mazar-e-Sharif','AFG','Balkh',127);
INSERT INTO `city` VALUES (5,'Amsterdam','NLD','Noord-Holland',731);
INSERT INTO `city` VALUES (6,'Rotterdam','NLD','Zuid-Holland',593);
call mtr.add_suppression("Plugin mysqlx reported: '1.1: Unsuccessful login attempt: Invalid user or password'");
call mtr.add_suppression("Plugin mysqlx reported: '2.1: Unsuccessful login attempt: Invalid user or password'");
Application terminated with expected error: Access denied for user 'user_127_0_0_1'@'localhost' (using password: NO) (code 1045)
ok
Application terminated with expected error: Access denied for user 'user_8_8_8_8'@'localhost' (using password: NO) (code 1045)
ok
send Mysqlx.Sql.StmtExecute {
stmt: "ping"
namespace: "mysqlx"
}
command ok
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
send Mysqlx.Crud.Find {
collection {
name: "city"
schema: "test"
}
data_model: TABLE
criteria {
type: OPERATOR
operator {
name: "<"
param {
type: IDENT
identifier {
name: "Population"
}
}
param {
type: LITERAL
literal {
type: V_SINT
v_signed_int: 250
}
}
}
}
}
ID Name CountryCode District Population
2 Qandahar AFG Qandahar 237
3 Herat AFG Herat 186
4 Mazar-e-Sharif AFG Balkh 127
command ok
Mysqlx.Ok {
msg: "bye!"
}
ok
send Mysqlx.Sql.StmtExecute {
stmt: "ping"
namespace: "mysqlx"
}
command ok
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
send Mysqlx.Crud.Find {
collection {
name: "city"
schema: "test"
}
data_model: TABLE
criteria {
type: OPERATOR
operator {
name: "<"
param {
type: IDENT
identifier {
name: "Population"
}
}
param {
type: LITERAL
literal {
type: V_SINT
v_signed_int: 250
}
}
}
}
}
ID Name CountryCode District Population
2 Qandahar AFG Qandahar 237
3 Herat AFG Herat 186
4 Mazar-e-Sharif AFG Balkh 127
command ok
Mysqlx.Ok {
msg: "bye!"
}
ok
send Mysqlx.Sql.StmtExecute {
stmt: "ping"
namespace: "mysqlx"
}
command ok
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
send Mysqlx.Crud.Find {
collection {
name: "city"
schema: "test"
}
data_model: TABLE
criteria {
type: OPERATOR
operator {
name: "<"
param {
type: IDENT
identifier {
name: "Population"
}
}
param {
type: LITERAL
literal {
type: V_SINT
v_signed_int: 250
}
}
}
}
}
ID Name CountryCode District Population
2 Qandahar AFG Qandahar 237
3 Herat AFG Herat 186
4 Mazar-e-Sharif AFG Balkh 127
command ok
Mysqlx.Ok {
msg: "bye!"
}
ok
Application terminated with expected error: Access denied for user 'user_requires_ssl'@'localhost' (using password: NO) (code 1045)
ok
send Mysqlx.Sql.StmtExecute {
stmt: "ping"
namespace: "mysqlx"
}
command ok
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
SSL/TLS
0 rows affected
send Mysqlx.Crud.Find {
collection {
name: "city"
schema: "test"
}
data_model: TABLE
criteria {
type: OPERATOR
operator {
name: "<"
param {
type: IDENT
identifier {
name: "Population"
}
}
param {
type: LITERAL
literal {
type: V_SINT
v_signed_int: 250
}
}
}
}
}
ID Name CountryCode District Population
2 Qandahar AFG Qandahar 237
3 Herat AFG Herat 186
4 Mazar-e-Sharif AFG Balkh 127
command ok
Mysqlx.Ok {
msg: "bye!"
}
ok
Check if mysqlx_socket has correct value
result
1
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
connecting...
active session is now 'session2'
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
connecting...
active session is now 'session3'
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
switched to session session3
RUN select '3_1';
switched to session session2
RUN select '2_1';
switched to session default
RUN select '1_1';
switched to session session2
2_1
2_1
0 rows affected
switched to session session3
3_1
3_1
0 rows affected
switched to session default
1_1
1_1
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# Match capabilities with the result file,
# must contain PLAIN and MYSQL41
#
Mysqlx.Connection.Capabilities(capabilities[1].value.array) = Mysqlx.Datatypes.Array {
value {
type: SCALAR
scalar {
type: V_STRING
v_string {
value: "MYSQL41"
}
}
}
value {
type: SCALAR
scalar {
type: V_STRING
v_string {
value: "PLAIN"
}
}
}
value {
type: SCALAR
scalar {
type: V_STRING
v_string {
value: "SHA256_MEMORY"
}
}
}
}
#
# Do plain authentication (must be available)
#
Mysqlx.Session.AuthenticateOk {
auth_data: ""
}
ok
#
# Lets confirm that user can connect through UNIX socket connection is secure one
#
SET GLOBAL require_secure_transport:=1;
send Mysqlx.Sql.StmtExecute {
stmt: "ping"
namespace: "mysqlx"
}
command ok
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
send Mysqlx.Crud.Find {
collection {
name: "city"
schema: "test"
}
data_model: TABLE
criteria {
type: OPERATOR
operator {
name: "<"
param {
type: IDENT
identifier {
name: "Population"
}
}
param {
type: LITERAL
literal {
type: V_SINT
v_signed_int: 250
}
}
}
}
}
ID Name CountryCode District Population
2 Qandahar AFG Qandahar 237
3 Herat AFG Herat 186
4 Mazar-e-Sharif AFG Balkh 127
command ok
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# Match capabilities with the result file,
# must contain PLAIN and MYSQL41
#
Mysqlx.Connection.Capabilities(capabilities[1].value.array) = Mysqlx.Datatypes.Array {
value {
type: SCALAR
scalar {
type: V_STRING
v_string {
value: "MYSQL41"
}
}
}
value {
type: SCALAR
scalar {
type: V_STRING
v_string {
value: "PLAIN"
}
}
}
value {
type: SCALAR
scalar {
type: V_STRING
v_string {
value: "SHA256_MEMORY"
}
}
}
}
#
# Do plain authentication (must be available)
#
Mysqlx.Session.AuthenticateOk {
auth_data: ""
}
ok
SET GLOBAL require_secure_transport:=0;
# restart: --mysqlx-socket=SOCKET
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query';
CONNECTION_TYPE
Socket
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
DROP TABLE `city`;
DROP USER user_127_0_0_1@127.0.0.1,user_8_8_8_8@8.8.8.8, user_all@'%', user_localhost@localhost, user_localhost_8_8_8_8@8.8.8.8, user_localhost_8_8_8_8@localhost;