From 90692c8cc24c704b4dc53ca17b72054182a494f5 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 9 May 2020 01:03:52 +0000 Subject: [PATCH] MCOL-3813 Count with view is incorrect --- dbcon/mysql/ha_mcs_execplan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index 6c438744c..21ec8eddb 100755 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -1303,7 +1303,7 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex) // View is already processed in view::transform // @bug5319. view is sometimes treated as derived table and // fromSub::transform does not build outer join filters. - if (!table_ptr->derived && table_ptr->view) + if (!table_ptr->derived && table_ptr->view && !gwi.subQuery) continue; CalpontSystemCatalog:: TableAliasName tan = make_aliasview(