config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/x/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : /home/usr.opt/mysql57/mysql-test/suite/x/r/connection_unixsocket.result

install plugin mysqlx soname "mysqlx.so";
call mtr.add_suppression("Plugin mysqlx reported: .Failed at SSL configuration: .SSL context is not usable without certificate and private key..");
call mtr.add_suppression("Plugin mysqlx reported: .SSL_CTX_load_verify_locations failed.");
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 '';
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;
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`)
);
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: Invalid user or password (code 1045)
not ok
Application terminated with expected error: Invalid user or password (code 1045)
not 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
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[0].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"
      }
    }
  }
}

#
# 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[0].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"
      }
    }
  }
}

#
# 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
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;
UNINSTALL PLUGIN mysqlx;

Man Man