1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed mdev-14960 [ERROR] mysqld got signal 11 with join_buffer and join_cache

In the function JOIN::shrink_join_buffers the iteration over joined
tables was organized in a wrong way. This could cause a crash if
the optimizer chose to materialize a semi-join that used join caches
for which the sizes must be adjusted.
This commit is contained in:
Igor Babaev
2018-01-18 09:20:55 -08:00
parent fafdac3365
commit 4f96b401d9
3 changed files with 107 additions and 1 deletions

View File

@ -2085,8 +2085,11 @@ bool JOIN::shrink_join_buffers(JOIN_TAB *jt,
ulonglong curr_space,
ulonglong needed_space)
{
JOIN_TAB *tab;
JOIN_CACHE *cache;
for (JOIN_TAB *tab= join_tab+const_tables; tab < jt; tab++)
for (tab= first_linear_tab(this, WITHOUT_BUSH_ROOTS, WITHOUT_CONST_TABLES);
tab != jt;
tab= next_linear_tab(this, tab, WITHOUT_BUSH_ROOTS))
{
cache= tab->cache;
if (cache)