diff options
author | Elena Stepanova <elenst@montyprogram.com> | 2017-01-29 00:50:28 +0200 |
---|---|---|
committer | Elena Stepanova <elenst@montyprogram.com> | 2017-02-01 02:12:55 +0200 |
commit | 923d7d0ad20c665fd195928c116ef388ddfd4b99 (patch) | |
tree | d4de9e891d7c0a586f100234fd56999a13074149 /client/mysqltest.cc | |
parent | c46d140961b4797509fc83b2d04120e179bc2431 (diff) | |
download | mariadb-git-923d7d0ad20c665fd195928c116ef388ddfd4b99.tar.gz |
Set sys_errno upon exec command
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r-- | client/mysqltest.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 15db5759ac9..ecc8c07605e 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -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) |