############################################################ ## Test mysqlxtest executable help printout ## mysqlxtest [SCHEMA] Options: -f, --file= Reads input from file -I, --import= Reads macro files from dir; required by -->import --sql= Use SQL as input and execute it like in -->sql block -e=, --execute= Aliases for "--sql" option -n, --no-auth Skip authentication which is required by -->sql block (run mode) --plain-auth Use PLAIN text authentication mechanism -u, --user= Connection user -p, --password= Connection password -h, --host= Connection host -P, --port= Connection port (default:33060) --ipv= Force internet protocol (default:4): 0 - allow system to resolve IPv6 and IPv4, for example resolving of 'localhost' can return both '::1' and '127.0.0.1' 4 - allow system to resolve only IPv4, for example resolving of 'localhost' is going to return '127.0.0.1' 6 - allow system to resolve only IPv6, for example resolving of 'localhost' is going to return '::1' -t, --timeout= I/O timeouts in milliseconds --close-no-sync Do not wait for connection to be closed by server(disconnect first) --schema= Default schema to connect to --uri= Connection URI URI takes precedence before options like: user, host, password, port --socket= Connection through UNIX socket --use-socket Connection through UNIX socket, using default file name 'SOCK' --use-socket* options take precedence before options like: uri, user, host, password, port --ssl-key X509 key in PEM format --ssl-ca CA file in PEM format --ssl-ca_path CA directory --ssl-cert X509 cert in PEM format --ssl-cipher SSL cipher to use --tls-version TLS version to use --connect-expired-password Allow expired password --quiet Don't print out messages sent -vVARIABLE_NAME=VALUE Set variable VARIABLE_NAME from command line --fatal-errors=<0|1> Mysqlxtest is started with ignoring or stopping on fatal error (default: 1) -B, --bindump Dump binary representation of messages sent, in format suitable for the "-->binsend" command --verbose Enable extra verbose messages --daemon Work as a daemon (unix only) --help Show command line help --help-commands Show help for input commands -V, --version Show version of mysqlxtest Only one option that changes run mode is allowed. ############################################################ ## Test mysqlxtest executable help-command printout ## Input may be a file (or if no --file is specified, it stdin will be used) The following commands may appear in the input script: -->echo Prints the text (allows variables) -->title Prints the text with an underline, using the character -->sql Begins SQL block. SQL statements that appear will be executed and results printed (allows variables). -->endsql End SQL block. End a block of SQL started by -->sql -->macro ... Start a block of text to be defined as a macro. Must be terminated with -->endmacro -->endmacro Ends a macro block -->callmacro ... Executes the macro text, substituting argument values with the provided ones (args separated by tabs). -->import Loads macros from the specified file. The file must be in the directory specified by --import option in command line. -->enablessl Enables ssl on current connection Encodes the text format protobuf message and sends it to the server (allows variables). -->recv [quiet|] quiet - received message isn't printed - print only selected part of the message using "field-path" filter: field_name1 field_name1.field_name2 repeated_field_name1[1].field_name1.field_name2 -->recvresult [print-columnsinfo] [be-quiet] Read and print one resultset from the server; if print-columnsinfo is present also print short columns status -->recvtovar [COLUMN_NAME] Read first row and first column (or column with name COLUMN_NAME) of resultset and set the variable -->recverror Read a message and ensure that it's an error of the expected type -->recvtype [be-quiet] Read one message and print it, checking that its type is the specified one -->recvuntil [do_not_show_intermediate] Read messages and print them, until a msg of the specified type (or Error) is received do_not_show_intermediate - if this argument is present then printing of intermediate message should be omitted -->repeat [] Begin block of instructions that should be repeated N times -->endrepeat End block of instructions that should be repeated - next iteration -->stmtsql Send StmtExecute with sql command -->stmtadmin [json_string] Send StmtExecute with admin command with given aguments (formated as json object) -->system Execute application or script (dev only) -->exit Stops reading commands, disconnects and exits (same as /^D) -->abort Exit immediately, without performing cleanup -->nowarnings/-->yeswarnings Whether to print warnings generated by the statement (default no) -->peerdisc [TOLERANCE] Expect that xplugin disconnects after given number of milliseconds and tolerance -->sleep Stops execution of mysqlxtest for given number of seconds (may be fractional) -->login ] Performs authentication steps (use with --no-auth) -->loginerror Performs authentication steps expecting an error (use with --no-auth) -->fatalerrors/nofatalerrors Whether to immediately exit on MySQL errors -->expecterror Expect a specific error for the next command and fail if something else occurs Works for: newsession, closesession, recvresult -->newsession Create a new connection with given name and account (use - as user for no-auth) -->newsessionplain Create a new connection with given name and account and force it to NOT use ssl, even if its generally enabled -->setsession Activate the named session -->closesession [abort] Close the active session (unless its the default session) -->wait_for Wait until SQL query returns value matches expected value (time limit 30 second) -->assert_eq Ensure that 'TESTED' value equals 'EXPECTED' by comparing strings lexicographically -->assert_gt Ensure that 'TESTED' value is greater than 'EXPECTED' (only when the both are numeric values) -->assert_ge Ensure that 'TESTED' value is greater or equal to 'EXPECTED' (only when the both are numeric values) -->varfile Assigns the contents of the file to the named variable -->varlet Assign the value (can be another variable) to the variable -->varinc Increment the value of varname by n (assuming both convert to integral) -->varsub Add a variable to the list of variables to replace for the next recv or sql command (value is replaced by the name) -->binsend [...] Sends one or more binary message dumps to the server (generate those with --bindump) -->binsendoffset [offset-begin[percent]> [offset-end[percent]]] Same as binsend with begin and end offset of data to be send -->binparse MESSAGE.NAME { MESSAGE.DATA } Dump given message to variable %MESSAGE_DUMP% -->quiet/noquiet Toggle verbose messages -->query_result/noquery_result Toggle visibility for query results -->received Assigns number of received messages of indicated type (in active session) to a variable # comment