diff options
author | Igor Babaev <igor@askmonty.org> | 2019-02-09 22:54:26 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-02-09 22:54:26 -0800 |
commit | d11be23933def394585fae83a6f1ab561e3736f2 (patch) | |
tree | 867a809df45931d5c6ad00424c327cd47aae9392 /sql/select_handler.cc | |
parent | 3f9040085a0de4976f55bc7e4a2fa5fa8d923100 (diff) | |
download | mariadb-git-d11be23933def394585fae83a6f1ab561e3736f2.tar.gz |
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.
Diffstat (limited to 'sql/select_handler.cc')
-rw-r--r-- | sql/select_handler.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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()) |