mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Set sys_errno upon exec command
This commit is contained in:
parent
c46d140961
commit
923d7d0ad2
1 changed files with 3 additions and 0 deletions
|
|
@ -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++;
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue