summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-10-16 14:25:28 -0700
committerunknown <igor@rurik.mysql.com>2006-10-16 14:25:28 -0700
commit6101fd25d0cafcdd785ca701ed9988cb3db61249 (patch)
treec755b3845678ed695f8e44409dbc4d067cb57de5 /sql/sql_lex.h
parent40197cd33f7695acd32f75b1d2a5f259f9f12ec5 (diff)
downloadmariadb-git-6101fd25d0cafcdd785ca701ed9988cb3db61249.tar.gz
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables. In some cases this resulted in choosing non-optimal execution plans. Now info of such potentially saragable predicates is saved in an array and after reading const tables we check whether this predicates has become saragable. mysql-test/r/select.result: Added a test case for bug #19579. mysql-test/t/select.test: Added a test case for bug #19579. sql/item_cmpfunc.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_base.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_lex.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_lex.h: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Added a counter of between predicates. sql/sql_select.cc: Fixed bug #19579: at range analysis optimizer did not take into account predicates that become sargable after reading const tables. Now info of such potentially saragable predicates is saved in an array and after reading const tables we check whether this predicates has become saragable.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index fdf14c691e9..a3173b73d6d 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -530,7 +530,8 @@ public:
list during split_sum_func
*/
uint select_n_having_items;
- uint cond_count; /* number of arguments of and/or/xor in where/having */
+ uint cond_count; /* number of arguments of and/or/xor in where/having/on */
+ uint between_count; /* number of between predicates in where/having/on */
enum_parsing_place parsing_place; /* where we are parsing expression */
bool with_sum_func; /* sum function indicator */
/*