From eb155661383bcf215d38baf5ff2c5b4413a5552d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 27 Jan 2016 15:26:12 +0100 Subject: [PATCH] fix failures of ps and ps_1general in --ps-protocol --- sql/sql_prepare.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 84173e003fa..ee0aa2d73fd 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1836,12 +1836,16 @@ static int mysql_test_show_create_table(Prepared_statement *stmt, if (mysqld_show_create_get_fields(thd, tables, &fields, &buffer)) goto err_exit; - if (send_prep_stmt(stmt, fields.elements) || - thd->protocol->send_result_set_metadata(&fields, Protocol::SEND_EOF) || - thd->protocol->flush()) - goto err_exit; + if (!stmt->is_sql_prepare()) + { + if (send_prep_stmt(stmt, fields.elements) || + thd->protocol->send_result_set_metadata(&fields, Protocol::SEND_EOF) || + thd->protocol->flush()) + goto err_exit; - DBUG_RETURN(2); + DBUG_RETURN(2); + } + DBUG_RETURN(0); err_exit: DBUG_RETURN(1);