############################################################ ## Test mysqlxtest executable help printout ## Copyright DATE Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. 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) --no-connect-attrs Skip send session connection attributes --plain-auth Use PLAIN text authentication mechanism --cached-auth Use SHA256_MEMORY authentication mechanism --mysql41-auth Use MYSQL41 authentication mechanism --using-cap-auth Get capabilities to check which authentication mechanism are supported --mysql57-compatible Use features that are 5.7 compatible: * limit auth-mechanisms -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-mode SSL configuration (default: "") "" - require encryption when at last one ssl option is set, otherwise is should be disabled. "PREFERRED" - encryption is optional, client tries to set it up "DISABLED" - encryption is disabled "REQUIRED" - encryption is required "VERIFY_CA" - verify server certificate "VERIFY_IDENTITY" - verify certificate issuer --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 --ssl-fips-mode Fips mode to use --connect-expired-password Allow expired password --client-interactive Connect in interactive mode --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) --expect-error= Default connection must fail with specified code (default: OFF) -B, --bindump Dump binary representation of messages sent, in format suitable for --trace-protocol Enable X Protocol tracing --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 --protocol_type=[MYSQLX|GALAXYX] specify the protocol type 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. -->macro_delimiter_compress TRUE|FALSE|0|1 Enable/disable grouping of adjacent delimiters into single one at "callmacro" command. -->do_ssl_handshake Execute SSL handshake, 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 -->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 -->switchsid -->recvtype ( [] [] [be-quiet])| - In case when user specified - read one message and print it, checks if its type is , additionally its fields may be matched. - In case when user specified - read one message and print the ID, checks the RAW message ID if its match . -->recvok Expect to receive 'Mysqlx.Ok' message. Works with 'expecterror' command. -->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 -->shutdown_server [timeout] Shutdown the server associated with current session, in case when the 'timeout' argument was set to '0'(for now it only supported option), the command kills the server. -->nowarnings/-->yeswarnings Whether to print warnings generated by the statement (default no) -->recvuntildisc [show-received] Receive all messages until server drops current connection. show-received - received messages are printed to standard output. -->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. All expected errors are ignored. -->fatalwarnings [yes|no|true|false|1|0] Whether to immediately exit on MySQL warnings. All expected warnings are ignored. -->expectwarnings [,[,...]] Expect a specific warning for the next command. Fails if warning other than specified occurred. When this command was not used then all warnings are expected. Works for: recvresult, SQL -->expecterror [,[,...]] Expect a specific error for the next command. Fails if error other than specified occurred Works for: newsession, closesession, recvresult, recvok, SQL -->newsession Create a new connection which is going to be authenticate using sequence of mechanisms (AUTO). Use '-' in place of the user for raw connection. -->newsession_mysql41 Create a new connection which is going to be authenticate using MYSQL41 mechanism. -->newsession_memory Create a new connection which is going to be authenticate using SHA256_MEMORY mechanism. -->newsession_plain Create a new connection which is going to be authenticate using PLAIN mechanism. -->reconnect Try to restore the connection/session. Default connection is restored or session established by '-->newsession*'. -->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 Ensure that expression described by argument parameters is true can take following values: "==" ensures that expected value and tested value are equal "!=" ensures that expected value and tested value are not equal ">=" ensures that expected value is greater or equal to tested value "<=" ensures that expected value is less or equal to tested value "<" ensures that expected value is less than tested value ">" ensures that expected value is grater than tested value For example: -->assert 1 < %SOME_VARIABLE% -->assert %V1% == %V2% -->assert_eq Ensure that 'TESTED' value equals 'EXPECTED' by comparing strings lexicographically -->assert_ne Ensure that 'TESTED' value doesn't 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) -->varreplace Replace all occurrence of with in value. -->varescape Escape end-line and backslash characters. -->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 -->clear_received Clear number of received messages. -->recvresult_store_metadata [print-columnsinfo] [be-quiet] Receive result and store metadata for future use; if print-columnsinfo is present also print short columns status -->recv_with_stored_metadata Receive a message using a previously stored metadata -->clear_stored_metadata Clear metadata information stored by the recvresult_store_metadata # comment