diff --git a/dbcon/mysql/ha_mcs_pushdown.cpp b/dbcon/mysql/ha_mcs_pushdown.cpp index 2e26e65bc..c0578ba52 100644 --- a/dbcon/mysql/ha_mcs_pushdown.cpp +++ b/dbcon/mysql/ha_mcs_pushdown.cpp @@ -64,36 +64,6 @@ void restore_optimizer_flags(THD *thd_) } } -int save_group_list(THD* thd, SELECT_LEX* select_lex, Group_list_ptrs **group_list_ptrs) -{ - if (select_lex->group_list.first) - { - void *mem = thd->stmt_arena->alloc(sizeof(Group_list_ptrs)); - - if (!mem || !((*group_list_ptrs) = new (mem) Group_list_ptrs(thd->stmt_arena->mem_root)) || - (*group_list_ptrs)->reserve(select_lex->group_list.elements)) - { - return 1; - } - - for (ORDER *order = select_lex->group_list.first; order; order = order->next) - { - (*group_list_ptrs)->push_back(order); - } - } - return 0; -} - -void restore_group_list(SELECT_LEX* select_lex, Group_list_ptrs *group_list_ptrs) -{ - select_lex->group_list.empty(); - for (size_t i = 0; i < group_list_ptrs->size(); i++) - { - ORDER *order = (*group_list_ptrs)[i]; - select_lex->group_list.link_in_list(order, &order->next); - } -} - /*@brief find_tables - This traverses Item */ /********************************************************** * DESCRIPTION: @@ -779,16 +749,8 @@ create_columnstore_select_handler(THD* thd, SELECT_LEX* select_lex) return handler; } - // Remove this in 1.4.3 - // Save the original group_list as it can be mutated by the - // optimizer which calls the remove_const() function - Group_list_ptrs *group_list_ptrs = NULL; - if (save_group_list(thd, select_lex, &group_list_ptrs)) - { - return handler; - } - bool unsupported_feature = false; + // Select_handler use the short-cut that effectively disables // INSERT..SELECT, LDI, SELECT..INTO OUTFILE if ((thd->lex)->sql_command == SQLCOM_INSERT_SELECT @@ -834,12 +796,6 @@ create_columnstore_select_handler(THD* thd, SELECT_LEX* select_lex) } } - // Restore back the saved group_list - if (group_list_ptrs) - { - restore_group_list(select_lex, group_list_ptrs); - } - // Iterate and traverse through the item list and do not create SH // if the unsupported (set/get_user_var) functions are present. TABLE_LIST* table_ptr = select_lex->get_table_list();