diff options
author | unknown <monty@mishka.local> | 2005-06-27 20:31:00 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2005-06-27 20:31:00 +0300 |
commit | 76d444fcb64d0272c0f8efd450edc7087a105723 (patch) | |
tree | 11c3f63ec13344e241e69b6178f65e8bd56e71b1 /client/mysqltest.c | |
parent | 6c46a993d7efe183d931ce2f25287afedf223544 (diff) | |
download | mariadb-git-76d444fcb64d0272c0f8efd450edc7087a105723.tar.gz |
Portability fixes
Fixes while reviewing new pushed code
NULL as argument to encrypt/decrypt should return NULL without a warning
client/mysqldump.c:
Cleanup
Ensure we free allocated memory
Portability fixes
client/mysqltest.c:
Cleanup of code during review
Portability fixes (Don't use 'bool')
mysql-test/r/func_encrypt.result:
NULL as argument to encrypt/decrypt should return NULL without a warning
mysql-test/r/func_encrypt_nossl.result:
Added test of NULL argument
mysql-test/t/func_encrypt_nossl.test:
Added test of NULL argument
sql/handler.cc:
Cleanup during code review
sql/item_strfunc.cc:
NULL as argument to encrypt/decrypt should return NULL without a warning
sql/sql_parse.cc:
Fix wrong merge (fix was not needed as the previous code was reverted)
sql/sql_table.cc:
Removed extra new line
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r-- | client/mysqltest.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index fd8f19332ec..87c34591b89 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -964,28 +964,27 @@ static void do_exec(struct st_query* q) error= pclose(res_file); if (error != 0) { - uint status= WEXITSTATUS(error); - if(q->abort_on_error) + uint status= WEXITSTATUS(error), i; + my_bool ok= 0; + + if (q->abort_on_error) die("At line %u: command \"%s\" failed", start_lineno, cmd); - else + + DBUG_PRINT("info", + ("error: %d, status: %d", error, status)); + for (i=0 ; (uint) i < q->expected_errors ; i++) { - DBUG_PRINT("info", - ("error: %d, status: %d", error, status)); - bool ok= 0; - uint i; - for (i=0 ; (uint) i < q->expected_errors ; i++) - { - DBUG_PRINT("info", ("expected error: %d", q->expected_errno[i].code.errnum)); - if ((q->expected_errno[i].type == ERR_ERRNO) && - (q->expected_errno[i].code.errnum == status)) - ok= 1; - verbose_msg("At line %u: command \"%s\" failed with expected error: %d", - start_lineno, cmd, status); - } - if (!ok) - die("At line: %u: command \"%s\" failed with wrong error: %d", - start_lineno, cmd, status); + DBUG_PRINT("info", ("expected error: %d", + q->expected_errno[i].code.errnum)); + if ((q->expected_errno[i].type == ERR_ERRNO) && + (q->expected_errno[i].code.errnum == status)) + ok= 1; + verbose_msg("At line %u: command \"%s\" failed with expected error: %d", + start_lineno, cmd, status); } + if (!ok) + die("At line: %u: command \"%s\" failed with wrong error: %d", + start_lineno, cmd, status); } else if (q->expected_errno[0].type == ERR_ERRNO && q->expected_errno[0].code.errnum != 0) |