summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2006-01-31 21:48:32 -0800
committerigor@rurik.mysql.com <>2006-01-31 21:48:32 -0800
commitd6370b48a7761b7e8716c92267458561dc77124c (patch)
tree8bf7ac2e42e3520d4fd076d65f554cba3db5c654 /sql/sql_lex.h
parent7e5108392d72aa755174da8f56dc42ccd1b82ee6 (diff)
downloadmariadb-git-d6370b48a7761b7e8716c92267458561dc77124c.tar.gz
FIxed bug #14927.
A query with a group by and having clauses could return a wrong result set if the having condition contained a constant conjunct evaluated to FALSE. It happened because the pushdown condition for table with grouping columns lost its constant conjuncts. Pushdown conditions are always built by the function make_cond_for_table that ignores constant conjuncts. This is apparently not correct when constant false conjuncts are present.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 47908ba8685..f5eb94ac93e 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -421,6 +421,7 @@ public:
char *db, *db1, *table1, *db2, *table2; /* For outer join using .. */
Item *where, *having; /* WHERE & HAVING clauses */
Item *prep_where; /* saved WHERE clause for prepared statement processing */
+ Item *prep_having;/* saved HAVING clause for prepared statement processing */
enum olap_type olap;
SQL_LIST table_list, group_list; /* FROM & GROUP BY clauses */
List<Item> item_list; /* list of fields & expressions */