diff options
author | unknown <msvensson@neptunus.(none)> | 2005-09-01 09:34:40 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-09-01 09:34:40 +0200 |
commit | 50cc21ea3e5f4ebcd3f9185c5f64746d5b0b7a98 (patch) | |
tree | f9a739c4ec38db5352892840450f16eca04a23ca /client | |
parent | 43422eceb516932603110a7b8665496d4132de35 (diff) | |
download | mariadb-git-50cc21ea3e5f4ebcd3f9185c5f64746d5b0b7a98.tar.gz |
Bug #12471 mysqltest, --error within loop affects wrong statement
- Move clearing of expected errors
client/mysqltest.c:
Move clear of expected errors to the query loop so that the expected error is reset even when the query is retrieved from the q_lines cache.
mysql-test/r/mysqltest.result:
Update test results
mysql-test/t/mysqltest.test:
Add test for bug#12471
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index bd467e821ab..3b13084081e 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2385,8 +2385,6 @@ int read_query(struct st_query** q_ptr) sizeof(global_expected_errno)); q->expected_errors= global_expected_errors; q->abort_on_error= (global_expected_errors == 0 && abort_on_error); - bzero((gptr) global_expected_errno, sizeof(global_expected_errno)); - global_expected_errors=0; if (p[0] == '-' && p[1] == '-') { q->type= Q_COMMENT_WITH_COMMAND; @@ -4002,6 +4000,16 @@ int main(int argc, char **argv) else check_eol_junk(q->last_argument); + if (q->type != Q_ERROR) + { + /* + As soon as any non "error" command has been executed, + the array with expected errors should be cleared + */ + global_expected_errors= 0; + bzero((gptr) global_expected_errno, sizeof(global_expected_errno)); + } + parser.current_line += current_line_inc; } |