From 7d201d7b3000bc7cf4e9a4360ad55ed4c85c60d8 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sat, 6 Jan 2018 09:32:47 -0800 Subject: Fixed mdev-14879 Lost rows for query using recursive CTE with recursive reference in subquery If a recursive CTE uses a subquery with recursive reference then the virtual function reset() must be called after each iteration performed at the execution of the CTE. --- sql/sql_union.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_union.cc') diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 7cbc69f2ee7..6f63cc5d0eb 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -1284,6 +1284,7 @@ bool st_select_lex_unit::exec_recursive() sq; sq= sq->next_with_rec_ref) { + sq->reset(); sq->engine->force_reexecution(); } -- cgit v1.2.1