| 1 |
## generated |
| 2 |
## Ping |
| 3 |
|
| 4 |
--source include/xplugin_preamble.inc |
| 5 |
--source include/xplugin_create_user.inc |
| 6 |
|
| 7 |
create user abc@localhost identified by 'abc'; |
| 8 |
## Test starts here |
| 9 |
--let $xtest_file= $MYSQL_TMP_DIR/admin_ping_mysqlx.xpl |
| 10 |
--write_file $xtest_file |
| 11 |
-->quiet |
| 12 |
|
| 13 |
-->stmtadmin ping |
| 14 |
-->recvresult |
| 15 |
|
| 16 |
|
| 17 |
-->stmtadmin ping {} |
| 18 |
-->recvresult |
| 19 |
|
| 20 |
|
| 21 |
-->stmtadmin ping {"schema":"xtest"} |
| 22 |
-->expecterror ER_X_CMD_INVALID_ARGUMENT |
| 23 |
-->recvresult |
| 24 |
|
| 25 |
|
| 26 |
-->stmtadmin ping "xtest" |
| 27 |
-->expecterror ER_X_CMD_ARGUMENT_TYPE |
| 28 |
-->recvresult |
| 29 |
|
| 30 |
|
| 31 |
-->stmtadmin ping 42 |
| 32 |
-->expecterror ER_X_CMD_ARGUMENT_TYPE |
| 33 |
-->recvresult |
| 34 |
|
| 35 |
|
| 36 |
-->stmtadmin ping [42] |
| 37 |
-->expecterror ER_X_CMD_ARGUMENT_TYPE |
| 38 |
-->recvresult |
| 39 |
|
| 40 |
|
| 41 |
-->stmtadmin ping null |
| 42 |
-->expecterror ER_X_CMD_ARGUMENT_TYPE |
| 43 |
-->recvresult |
| 44 |
|
| 45 |
-->sql |
| 46 |
SHOW STATUS LIKE 'Mysqlx_stmt_execute_mysqlx'; |
| 47 |
-->endsql |
| 48 |
|
| 49 |
-->echo create and activate new session abc |
| 50 |
-->echo expect Mysqlx_stmt_execute_mysqlx=1 |
| 51 |
-->newsession abc abc abc |
| 52 |
|
| 53 |
Mysqlx.Sql.StmtExecute { |
| 54 |
stmt: "ping" |
| 55 |
namespace: "mysqlx" |
| 56 |
} |
| 57 |
|
| 58 |
## expect Mysqlx.Sql.StmtExecuteOk |
| 59 |
-->recvresult |
| 60 |
-->sql |
| 61 |
SHOW STATUS LIKE 'Mysqlx_stmt_execute_mysqlx'; |
| 62 |
-->endsql |
| 63 |
EOF |
| 64 |
--exec $MYSQLXTEST -ux_root --password='' --file=$xtest_file 2>&1 |
| 65 |
|
| 66 |
## To Get total count of Mysqlx_stmt_execute_mysqlx for all sessions. |
| 67 |
SHOW STATUS LIKE 'Mysqlx_stmt_execute_mysqlx'; |
| 68 |
|
| 69 |
## Cleanup |
| 70 |
DROP USER abc@localhost; |
| 71 |
--source ../include/xplugin_cleanup.inc |