Skip to content

Commit

Permalink
Set sys_errno upon exec command
Browse files Browse the repository at this point in the history
  • Loading branch information
elenst committed Feb 1, 2017
1 parent c46d140 commit 923d7d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3341,6 +3341,8 @@ void do_exec(struct st_command *command)
DBUG_ENTER("do_exec");
DBUG_PRINT("enter", ("cmd: '%s'", cmd));

var_set_int("$sys_errno",0);

/* Skip leading space */
while (*cmd && my_isspace(charset_info, *cmd))
cmd++;
Expand Down Expand Up @@ -3457,6 +3459,7 @@ void do_exec(struct st_command *command)
report_or_die("command \"%s\" failed with wrong error: %d",
command->first_argument, status);
}
var_set_int("$sys_errno",status);
}
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
command->expected_errors.err[0].code.errnum != 0)
Expand Down

0 comments on commit 923d7d0

Please sign in to comment.