[Commits] 5451240f57b: ANALYZE SELECT with PS fix
revision-id: 5451240f57bf17851d3f486b0c1c895748f479b7 (mariadb-10.4.3-43-g5451240f57b) parent(s): acc8c7068fa3d866305763cf6f62175ad1525650 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2019-03-07 16:18:31 +0100 message: ANALYZE SELECT with PS fix --- sql/sql_prepare.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 94f87a88155..cb06dee0cd5 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2548,8 +2548,12 @@ static bool check_prepared_statement(Prepared_statement *stmt) { if (lex->describe || lex->analyze_stmt) { - if (!lex->result && - !(lex->result= new (stmt->mem_root) select_send(thd))) + /* + With EXPAIN (describe) and ANALYZE STATEMENT we ignore original + result sending class and always send special result set to the + client + */ + if (!(lex->result= new (stmt->mem_root) select_send(thd))) DBUG_RETURN(TRUE); List<Item> field_list; res= thd->prepare_explain_fields(lex->result, &field_list,
participants (1)
-
Oleksandr Byelkin