From aaff3d6c35f51dde60907f3c0fc4b2a40bc63c38 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Tue, 20 Dec 2016 10:25:25 +0100 Subject: MDEV-10172: UNION query returns incorrect rows outside conditional evaluation count duplicate of UNION SELECT separately to awoid influence on lokal LIMIT clause. --- sql/sql_select.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sql/sql_select.h') diff --git a/sql/sql_select.h b/sql/sql_select.h index 4650bc24c68..0623672840e 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1018,7 +1018,8 @@ public: table_map outer_join; /* Bitmap of tables used in the select list items */ table_map select_list_used_tables; - ha_rows send_records,found_records,examined_rows,row_limit, select_limit; + ha_rows send_records, found_records, examined_rows, + row_limit, select_limit, duplicate_rows; /** Used to fetch no more than given amount of rows per one fetch operation of server side cursor. @@ -1272,7 +1273,7 @@ public: sort_and_group= 0; first_record= 0; do_send_rows= 1; - send_records= 0; + duplicate_rows= send_records= 0; found_records= 0; fetch_limit= HA_POS_ERROR; examined_rows= 0; -- cgit v1.2.1