1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

A fix for Bug#11901 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY join in

subqry order by server crash": failing DBUG_ASSERT(curr_join == this)
when opening a cursor.
Ensure that for top-level join curr_join == join (always), 
and thus fix the failing assert.
curr_join is a hack to ensure that uncacheable subqueries can be
re-evaluated safely, and should be never different from main join
in case of top-level join.
This commit is contained in:
konstantin@mysql.com
2005-08-10 12:25:26 +04:00
parent ec5ceecab7
commit f6306a8db1
3 changed files with 132 additions and 5 deletions

View File

@@ -366,6 +366,11 @@ class JOIN :public Sql_alloc
!group_list);
}
bool change_result(select_result *result);
bool is_top_level_join() const
{
return (unit == &thd->lex->unit && (unit->fake_select_lex == 0 ||
select_lex == unit->fake_select_lex));
}
};