diff options
-rw-r--r-- | sql/sql_prepare.cc | 3 | ||||
-rw-r--r-- | tests/mysql_client_test.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 31e3baca764..94a35db3a2d 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -3769,7 +3769,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor) if (state == Query_arena::PREPARED) state= Query_arena::EXECUTED; - if (this->lex->sql_command == SQLCOM_CALL) + if (error == 0 && this->lex->sql_command == SQLCOM_CALL) { if (is_sql_prepare()) thd->protocol_text.send_out_parameters(&this->lex->param_list); @@ -3777,7 +3777,6 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor) thd->protocol->send_out_parameters(&this->lex->param_list); } - /* Log COM_EXECUTE to the general log. Note, that in case of SQL prepared statements this causes two records to be output: diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 8f4c44e2c82..8112a2a3c0d 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -19373,7 +19373,7 @@ static struct my_tests_st my_tests[]= { #endif { "test_bug41078", test_bug41078 }, { "test_bug44495", test_bug44495 }, - /* XXX { "test_bug49972", test_bug49972 }, */ + { "test_bug49972", test_bug49972 }, { 0, 0 } }; |