Commit f53afa23 authored by unknown's avatar unknown

Improve mysqltest

Add comment's for enable/disable_query_log and enable/disable_result_log
Update comment for "check_result"
Add check in "handle_error" that detects if the server crashed when running a "require" query to check if a certain feature is available


client/mysqltest.c:
  Add comment's for enable/disable_query_log and enable/disable_result_log
  Update comment for "check_result"
  Add check in "handle_error" that detects if the server crashed when running a "require" query to check if a certain feature is available
parent 26acf8d7
...@@ -393,8 +393,10 @@ const char *command_names[]= ...@@ -393,8 +393,10 @@ const char *command_names[]=
"enable_rpl_parse", "enable_rpl_parse",
"disable_rpl_parse", "disable_rpl_parse",
"eval_result", "eval_result",
/* Enable/disable that the _query_ is logged to result file */
"enable_query_log", "enable_query_log",
"disable_query_log", "disable_query_log",
/* Enable/disable that the _result_ from a query is logged to result file */
"enable_result_log", "enable_result_log",
"disable_result_log", "disable_result_log",
"server_start", "server_start",
...@@ -753,8 +755,8 @@ static int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname) ...@@ -753,8 +755,8 @@ static int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
check_result check_result
ds - content to be checked ds - content to be checked
fname - name of file to check against fname - name of file to check against
require_option - if set and check fails, the test will be aborted with the special require_option - if set and check fails, the test will be aborted
exit code "not supported test" with the special exit code "not supported test"
RETURN VALUES RETURN VALUES
error - the function will not return error - the function will not return
...@@ -3481,7 +3483,17 @@ static void handle_error(const char *query, struct st_query *q, ...@@ -3481,7 +3483,17 @@ static void handle_error(const char *query, struct st_query *q,
DBUG_ENTER("handle_error"); DBUG_ENTER("handle_error");
if (q->require_file) if (q->require_file)
{
/*
The query after a "--require" failed. This is fine as long the server
returned a valid reponse. Don't allow 2013 or 2006 to trigger an
abort_not_supported_test
*/
if (err_errno == CR_SERVER_LOST ||
err_errno == CR_SERVER_GONE_ERROR)
die("require query '%s' failed: %d: %s", query, err_errno, err_error);
abort_not_supported_test(); abort_not_supported_test();
}
if (q->abort_on_error) if (q->abort_on_error)
die("query '%s' failed: %d: %s", query, err_errno, err_error); die("query '%s' failed: %d: %s", query, err_errno, err_error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment