73 lines
1.3 KiB
Plaintext
73 lines
1.3 KiB
Plaintext
## generated
|
|
## Ping
|
|
|
|
--source include/xplugin_preamble.inc
|
|
--source include/xplugin_create_user.inc
|
|
|
|
create user abc@localhost identified by 'abc';
|
|
## Test starts here
|
|
--let $xtest_file= $MYSQL_TMP_DIR/admin_ping_mysqlx.tmp
|
|
--write_file $xtest_file
|
|
-->quiet
|
|
|
|
-->stmtadmin ping
|
|
-->recvresult
|
|
|
|
|
|
-->stmtadmin ping {}
|
|
-->recvresult
|
|
|
|
|
|
-->stmtadmin ping {"schema":"xtest"}
|
|
-->expecterror ER_X_CMD_NUM_ARGUMENTS
|
|
-->recvresult
|
|
|
|
|
|
-->stmtadmin ping "xtest"
|
|
-->expecterror ER_X_CMD_ARGUMENT_TYPE
|
|
-->recvresult
|
|
|
|
|
|
-->stmtadmin ping 42
|
|
-->expecterror ER_X_CMD_ARGUMENT_TYPE
|
|
-->recvresult
|
|
|
|
|
|
-->stmtadmin ping [42]
|
|
-->expecterror ER_X_CMD_ARGUMENT_TYPE
|
|
-->recvresult
|
|
|
|
|
|
-->stmtadmin ping null
|
|
-->expecterror ER_X_CMD_ARGUMENT_TYPE
|
|
-->recvresult
|
|
|
|
-->sql
|
|
SHOW STATUS LIKE 'Mysqlx_stmt_execute_mysqlx';
|
|
-->endsql
|
|
|
|
-->echo create and activate new session abc
|
|
-->echo expect Mysqlx_stmt_execute_mysqlx=1
|
|
-->newsession abc abc abc
|
|
|
|
Mysqlx.Sql.StmtExecute {
|
|
stmt: "ping"
|
|
namespace: "mysqlx"
|
|
}
|
|
|
|
## expect Mysqlx.Sql.StmtExecuteOk
|
|
-->recvresult
|
|
-->sql
|
|
SHOW STATUS LIKE 'Mysqlx_stmt_execute_mysqlx';
|
|
-->endsql
|
|
EOF
|
|
--exec $MYSQLXTEST -ux_root --password='' --file=$xtest_file 2>&1
|
|
|
|
## To Get total count of Mysqlx_stmt_execute_mysqlx for all sessions.
|
|
SHOW STATUS LIKE 'Mysqlx_stmt_execute_mysqlx';
|
|
|
|
## Cleanup
|
|
DROP USER abc@localhost;
|
|
--remove_file $xtest_file
|
|
--source include/xplugin_drop_user.inc
|