MariaDB 5.1

MariaDB 5.1 added new options and commands to mysqltest

New startup option --connect-timeout

MariaDB 5.1 added a new startup option to mysqltest:

--connect-timeout=N

This can be used to set the MYSQL_OPT_CONNECT_TIMEOUT parameter of mysql_options, to change the number of seconds before an unsuccessful connection attempt times out.

New test commands for handling warnings during prepare statement

MariaDB 5.1 added two new commands for controlling which warnings are printed when using the prepared statement protocol:

  • enable_prepare_warnings;
  • disable_prepare_warnings;

Normally, when running with the prepared statement protocol with warnings enabled and executing a statement that returns a result set (like SELECT), warnings that occur during the execute phase are shown, but warnings that occur during the prepare phase are ''not'' shown. The reason for this is that some warnings are returned both during prepare and execute; if both copies of warnings were shown, then test cases would show different number of warnings between prepared statement execution and normal execution (where there is no prepare phase).

The enable_prepare_warnings command changes this so that warnings from both the prepare and execute phase are shown, regardless of whether the statement produces a result set in the execute phase. The disable_prepare_warnings command reverts to the default behaviour.

These commands only have effect when running with the prepared statement protocol (--ps-protocol) and with warnings enabled (enable_warnings). Furthermore, they only have effects for statements that return a result set (as for statements without result sets, warnings from are always shown when warnings are enabled).

Comments

Comments loading...