Skip to content

Commit 13ed097

Browse files
Anushree Prakash Bdahlerlend
authored andcommitted
Bug#36365067 - EXPLAIN queries in MLE stored program causes
assertion failure - Executing EXPLAIN/DESCRIBE statements from MLE SP using prepared statement execution causes a crash. - To address this issue temporarily, the solution is to disable the cursor for such statements. - The proper fix should be implemented in Bug#36332426. - Additionally, include extra test cases to cover scenarios involving these statements. Change-Id: Ibda9995a60ff2a74548342f0fda8f1c768726726
1 parent 8d5718a commit 13ed097

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sql/statement/statement.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,13 @@ bool Prepared_statement_handle::enable_cursor() {
473473
m_thd->server_status & SERVER_MORE_RESULTS_EXISTS);
474474

475475
Sql_cmd *sql_cmd = m_stmt->m_lex->m_sql_cmd;
476+
477+
/*
478+
Note: Temporary fix to disable cursor for EXPLAIN in prepared statement
479+
till Bug#36332426 is resolved.
480+
*/
481+
if (m_stmt->m_lex->is_explain()) return false;
482+
476483
/*
477484
Enable cursors only when results are not directly relayed to the client and
478485
only command is suitable for cursors.

0 commit comments

Comments
 (0)