Commit 3fcb770f authored by Sergei Petrunia's avatar Sergei Petrunia

Fix federated.federatedx_create_handler with --ps-protocol, for CLX-77

CLX-77 code used "thd->lex->result!=NULL" to check if the SELECT has
an INTO part. This is not correct, as the condition also holds when
we're using the PS protocol.
Use a more generic check: check whether the SELECT has any side effect.
parent d414f8a9
......@@ -185,10 +185,11 @@ create_federatedx_select_handler(THD* thd, SELECT_LEX *sel)
/*
Currently, ha_federatedx_select_handler::init_scan just takes the
thd->query and sends it to the backend.
This obviously won't work if the SELECT has an INTO part.
Refuse to work in this case.
This obviously won't work if the SELECT uses an "INTO @var" or
"INTO OUTFILE". It is also unlikely to work if the select has some
other kind of side effect.
*/
if (thd->lex->result)
if (sel->uncacheable & UNCACHEABLE_SIDEEFFECT)
return NULL;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment