This could have been fixed in upstream 5.5.42/5.6.24 by
"The server could exit due to an optimizer failure to allocate enough memory for resolving outer references. (Bug #18782905, Bug #19892803)"
Is it possible to verify?
commit c9f7948bc47edc7ddc3b3693b9a3e4b623a97ca6
Author: Mithun C Y <email address hidden>
Date: Fri Jan 30 16:36:23 2015 +0530
Bug #19892803: ASSERTION FAILED: N < M_SIZE WITH DISTINCT TIME
ISSUE:
------
We pre-allocate the ref_pointer_array before we resolve outer
references. This means that in some cases the
ref_pointer_array may not be large enough to hold all
references created. One such case is aggregate functions in
having clause of a subquery which may add items to select list
of outer query. So it is necessary to consider
select_n_having_items for subqueries while allocating
ref_pointer_array else we will get buffer overflow.
SOLUTION:
---------
Allocate a larger ref_pointer_array by aggregating
select_n_having_items for subqueries.
The fix in sql_yacc.yy is a backport from bug fix 18782905.
This could have been fixed in upstream 5.5.42/5.6.24 by
"The server could exit due to an optimizer failure to allocate enough memory for resolving outer references. (Bug #18782905, Bug #19892803)"
Is it possible to verify?
commit c9f7948bc47edc7 ddc3b3693b9a3e4 b623a97ca6
Author: Mithun C Y <email address hidden>
Date: Fri Jan 30 16:36:23 2015 +0530
Bug #19892803: ASSERTION FAILED: N < M_SIZE WITH DISTINCT TIME
ISSUE: pointer_ array may not be large enough to hold all n_having_ items for subqueries while allocating pointer_ array else we will get buffer overflow.
------
We pre-allocate the ref_pointer_array before we resolve outer
references. This means that in some cases the
ref_
references created. One such case is aggregate functions in
having clause of a subquery which may add items to select list
of outer query. So it is necessary to consider
select_
ref_
SOLUTION: n_having_ items for subqueries.
---------
Allocate a larger ref_pointer_array by aggregating
select_
The fix in sql_yacc.yy is a backport from bug fix 18782905.