ERROR 1064 ER_
PARSE_ ERROR: Unhandled exception Type: ER_ PARSE_ ERROR (1064)
SET statement inside a stored procedure returns an error.
BEGINSET @@sql_mode = PIPES_AS_CONCAT;...<some_statement_that_uses_pipes_for_concatenation>
When you run this stored procedure for the first time, it returns a syntax error.
When a SingleStore query is run, its plan is generated and then compiled.
SET queries, this delay in compiling means that the stored procedure will be generated as though the variable specified in the
SET statement was not set.
On the first run, these queries are compiled, which causes the stored procedure to recompile.
SET statements inside a stored procedure, especially for setting those variables that can potentially affect query execution.
Last modified: July 5, 2021