You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#35913841: Queries from stored procedures not offloading to secondary engine when we have OUT arguments
Before this patch, RAPID could not handle queries of the type
SELECT ... INTO <list of variables>. The reason for this was that these
kind of queries were set up with a special Query_result interceptor
(Query_dumpvar), whereas regular SELECT queries were set up with
Query_result_send, which was substituted on the RAPID side with a
special protocol adapter. However, RAPID has also implemented another
protocol adapter (an Item wrapper), which is used for INSERT INTO
and CREATE TABLE ... SELECT statements.
It was noted that this adapter could also be used for SELECT INTO,
where the Item wrapper is used as an intermediary for Query_dumpvar.
Two new property functions on class Query_result are implemented:
use_protocol_adapter() returns true for Query_result_send and
use_protocol_wrapper() returns true for Query_dumpvar.
An alternative implementation may check these functions for when to use
adapters resp. wrappers instead of the original Query result classes.
The function is_interceptor() is no longer used and is hence removed.
We identify this new requirement in IsSupportedProtocol(), where
we explicitly allow Query_dumpvar and Query_result_send query results,
and in CreateQEP() where we create the Item wrapper for Query_dumpvar.
Notice that this implements SELECT ... INTO both as regular statements,
as prepared statements and as procedure statements.
Notice also that the syntax variants SELECT ... INTO OUTFILE and
SELECT ... INTO DUMPFILE are still not supported.
Most of the changes are in the test suite where we have eliminated the
earlier ER_SECONDARY_ENGINE_PLUGIN error code.
A couple of test lines were removed from the tests rapid.sp and
rapid.cp_sp because they gave different results in dict and varlen
modes.
Change-Id: Icd56cb6fbc32e121a59599a7e5b7d651747804f5
0 commit comments