From e4100928d17f8d73002e51f1f5d08b46904213ca Mon Sep 17 00:00:00 2001 From: Gagan Goel Date: Mon, 20 Feb 2023 13:04:13 -0500 Subject: [PATCH] MDEV-25080 DISABLE pushdown of SELECT_LEX_UNIT for the prepare phase of PS/SP statements. --- dbcon/mysql/ha_mcs_pushdown.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dbcon/mysql/ha_mcs_pushdown.cpp b/dbcon/mysql/ha_mcs_pushdown.cpp index 9bfb428b6..9a8242e2e 100644 --- a/dbcon/mysql/ha_mcs_pushdown.cpp +++ b/dbcon/mysql/ha_mcs_pushdown.cpp @@ -1038,6 +1038,11 @@ select_handler* create_columnstore_unit_handler(THD* thd, SELECT_LEX_UNIT* sel_u if (thd->lex->sql_command == SQLCOM_CREATE_VIEW) return nullptr; + if (thd->stmt_arena && thd->stmt_arena->is_stmt_prepare()) + { + return nullptr; + } + return create_columnstore_select_handler_(thd, 0, sel_unit); }