mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug #30396.
The bug caused memory corruption for some queries with top OR level in the WHERE condition if they contained equality predicates and other sargable predicates in disjunctive parts of the condition. The corruption happened because the upper bound of the memory allocated for KEY_FIELD and SARGABLE_PARAM internal structures containing info about potential lookup keys was calculated incorrectly in some cases. In particular it was calculated incorrectly when the WHERE condition was an OR formula with disjuncts being AND formulas including equalities and other sargable predicates.
This commit is contained in:
@ -533,7 +533,8 @@ public:
|
||||
*/
|
||||
uint select_n_having_items;
|
||||
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 */
|
||||
uint between_count; /* number of between predicates in where/having/on */
|
||||
uint max_equal_elems; /* maximal number of elements in multiple equalities */
|
||||
/*
|
||||
Number of fields used in select list or where clause of current select
|
||||
and all inner subselects.
|
||||
|
Reference in New Issue
Block a user