diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2005-01-18 23:13:29 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2005-01-18 23:13:29 +0200 |
commit | 59ef5bede94cb0955590b16ead9352c17a5fd7ac (patch) | |
tree | 3745ddbae8ff106a48ef6b3f77094016b5c662cf /sql/sql_union.cc | |
parent | e46d235a08a35bdd5536b4b2b99ed3a5b6910cdf (diff) | |
download | mariadb-git-59ef5bede94cb0955590b16ead9352c17a5fd7ac.tar.gz |
fixing wrong value for "examined rows" when UNION's are used.
mysql-test/r/union.result:
result for a test case for the wrong examined rows with UNION's
mysql-test/t/union.test:
test case for the wrong examined rows with UNION's
sql/sql_union.cc:
a patch for the wrong examined rows with UNION's
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index f89b234f5b0..027a21db7ac 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -466,11 +466,14 @@ int st_select_lex_unit::exec() } res= sl->join->error; offset_limit_cnt= sl->offset_limit; - if (!res && union_result->flush()) + if (!res) { - examined_rows+= thd->examined_row_count; - thd->lex->current_select= lex_select_save; - DBUG_RETURN(1); + examined_rows+= thd->examined_row_count; + if (union_result->flush()) + { + thd->lex->current_select= lex_select_save; + DBUG_RETURN(1); + } } } if (res) |