From d11be23933def394585fae83a6f1ab561e3736f2 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sat, 9 Feb 2019 22:54:26 -0800 Subject: MDEV-17096 Pushdown of simple derived tables to storage engines Resolved the problem of forming a proper query string for FEDERATEDX. Added test cases. Cleanup of extra spaces. --- sql/select_handler.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sql/select_handler.cc') diff --git a/sql/select_handler.cc b/sql/select_handler.cc index 17475f4907d..9a8d3914b21 100644 --- a/sql/select_handler.cc +++ b/sql/select_handler.cc @@ -6,7 +6,7 @@ Pushdown_select::Pushdown_select(SELECT_LEX *sel, select_handler *h) : select(sel), handler(h) -{ +{ is_analyze= handler->thd->lex->analyze_stmt; } @@ -35,7 +35,7 @@ bool Pushdown_select::init() DBUG_RETURN(true); if (handler->table->fill_item_list(&result_columns)) DBUG_RETURN(true); - DBUG_RETURN(false); + DBUG_RETURN(false); } bool Pushdown_select::send_result_set_metadata() @@ -74,7 +74,7 @@ bool Pushdown_select::send_data() protocol->remove_last_row(); DBUG_RETURN(true); } - + thd->inc_sent_row_count(1); if (thd->vio_ok()) @@ -88,13 +88,13 @@ bool Pushdown_select::send_eof() THD *thd= handler->thd; DBUG_ENTER("Pushdown_select::send_eof"); - /* + /* Don't send EOF if we're in error condition (which implies we've already sent or are sending an error) */ if (thd->is_error()) DBUG_RETURN(true); - ::my_eof(thd); + ::my_eof(thd); DBUG_RETURN(false); } @@ -113,10 +113,10 @@ int Pushdown_select::execute() handler->end_scan(); DBUG_RETURN(0); } - + if (send_result_set_metadata()) DBUG_RETURN(-1); - + while (!(err= handler->next_row())) { if (thd->check_killed() || send_data()) -- cgit v1.2.1