From a4579c3ef37ee2a17c71ea33f0a0261b0b49de05 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 12 Jan 2011 15:55:06 +0200 Subject: Fix for LP#697622 Assertion `! is_set()' failed when preparing a HANDLER statement mysql-test/suite/handler/interface.result: Test case mysql-test/suite/handler/interface.test: Test case sql/sql_prepare.cc: Fix for LP#697622 Assertion `! is_set()' failed when preparing a HANDLER statement Return TRUE if mysql_test_handler_read() fails. --- sql/sql_prepare.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sql/sql_prepare.cc') diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 8a9870e2865..9bfa8d61e0a 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2004,11 +2004,8 @@ static bool check_prepared_statement(Prepared_statement *stmt) case SQLCOM_HA_READ: res= mysql_test_handler_read(stmt, tables); - { - /* Statement and field info has already been sent */ - DBUG_RETURN(FALSE); - } - break; + /* Statement and field info has already been sent */ + DBUG_RETURN(res == 1 ? TRUE : FALSE); /* Note that we don't need to have cases in this list if they are -- cgit v1.2.1