156 lines
2.6 KiB
Plaintext
156 lines
2.6 KiB
Plaintext
RUN CREATE USER 'x_root'@'galaxy' IDENTIFIED WITH 'mysql_native_password'
|
|
|
|
0 rows affected
|
|
RUN GRANT ALL ON *.*TO 'x_root'@'galaxy' WITH GRANT OPTION
|
|
|
|
0 rows affected
|
|
RUN FLUSH PRIVILEGES
|
|
|
|
0 rows affected
|
|
RUN drop schema if exists xtest
|
|
|
|
0 rows affected
|
|
RUN create schema xtest
|
|
|
|
1 rows affected
|
|
RUN use xtest
|
|
|
|
0 rows affected
|
|
RUN create table mytable (pk int primary key auto_increment, data varchar(100))
|
|
|
|
0 rows affected
|
|
RUN create procedure result_and_error ()
|
|
begin
|
|
select 1;
|
|
select * from invalid_table;
|
|
end
|
|
|
|
0 rows affected
|
|
send Mysqlx.Session.NewSession {
|
|
}
|
|
|
|
Mysqlx.Ok {
|
|
}
|
|
|
|
send Mysqlx.Sql.GalaxyStmtExecute {
|
|
stmt: "insert into mytable values (DEFAULT, \'one\')"
|
|
db_name: "xtest"
|
|
}
|
|
|
|
|
|
1 rows affected
|
|
last insert id: 1
|
|
send Mysqlx.Sql.GalaxyStmtExecute {
|
|
stmt: "insert into mytable values (DEFAULT, \'two\')"
|
|
}
|
|
|
|
|
|
1 rows affected
|
|
last insert id: 2
|
|
send Mysqlx.Sql.GalaxyStmtExecute {
|
|
stmt: "insert into mytable values (DEFAULT, \'three\')"
|
|
}
|
|
|
|
|
|
1 rows affected
|
|
last insert id: 3
|
|
send Mysqlx.Sql.GalaxyStmtExecute {
|
|
stmt: "select * from mytable"
|
|
token: 10000
|
|
}
|
|
|
|
Mysqlx.Resultset.ColumnMetaData {
|
|
type: SINT
|
|
name: "pk"
|
|
original_name: "pk"
|
|
table: "mytable"
|
|
original_table: "mytable"
|
|
schema: "xtest"
|
|
catalog: "def"
|
|
fractional_digits: 0
|
|
length: 11
|
|
flags: 304
|
|
original_type: MYSQL_TYPE_LONG
|
|
}
|
|
|
|
Mysqlx.Resultset.ColumnMetaData {
|
|
type: BYTES
|
|
name: "data"
|
|
original_name: "data"
|
|
table: "mytable"
|
|
original_table: "mytable"
|
|
schema: "xtest"
|
|
catalog: "def"
|
|
collation: 33
|
|
fractional_digits: 0
|
|
length: 400
|
|
original_type: MYSQL_TYPE_VARCHAR
|
|
}
|
|
|
|
Mysqlx.Resultset.Row {
|
|
field: "\002"
|
|
field: "one\000"
|
|
}
|
|
|
|
Mysqlx.Resultset.Row {
|
|
field: "\004"
|
|
field: "two\000"
|
|
}
|
|
|
|
Mysqlx.Resultset.Row {
|
|
field: "\006"
|
|
field: "three\000"
|
|
}
|
|
|
|
Mysqlx.Resultset.FetchDone {
|
|
}
|
|
|
|
Mysqlx.Notice.Frame {
|
|
type: 3
|
|
scope: LOCAL
|
|
payload: "Mysqlx.Notice.SessionStateChanged { param: ROWS_AFFECTED\nvalue {\n type: V_UINT\n v_unsigned_int: 0\n}\n }"
|
|
}
|
|
|
|
Mysqlx.Sql.StmtExecuteOk {
|
|
}
|
|
|
|
send Mysqlx.Sql.GalaxyStmtExecute {
|
|
stmt: "drop table if exists `not_exist`"
|
|
token: 10000
|
|
}
|
|
|
|
Mysqlx.Notice.Frame {
|
|
type: 1
|
|
scope: LOCAL
|
|
payload: "Mysqlx.Notice.Warning { level: NOTE\ncode: 1051\nmsg: \"Unknown table \\\'xtest.not_exist\\\'\"\n }"
|
|
}
|
|
|
|
Mysqlx.Notice.Frame {
|
|
type: 3
|
|
scope: LOCAL
|
|
payload: "Mysqlx.Notice.SessionStateChanged { param: ROWS_AFFECTED\nvalue {\n type: V_UINT\n v_unsigned_int: 0\n}\n }"
|
|
}
|
|
|
|
Mysqlx.Sql.StmtExecuteOk {
|
|
}
|
|
|
|
send Mysqlx.Session.Close {
|
|
}
|
|
|
|
Mysqlx.Ok {
|
|
}
|
|
|
|
RUN drop schema if exists xtest
|
|
|
|
1 rows affected
|
|
RUN DROP USER 'x_root'@'galaxy'
|
|
|
|
0 rows affected
|
|
RUN FLUSH PRIVILEGES
|
|
|
|
0 rows affected
|
|
Mysqlx.Ok {
|
|
msg: "bye!"
|
|
}
|
|
ok
|