~maria-captains/maria/5.1

Viewing all changes in revision 2502.1137.167.

  • Committer: Mayank Prasad
  • Date: 2012-04-06 11:33:13 UTC
  • mto: (2502.1194.1 mysql-5.1.64-release)
  • mto: This revision was merged to the branch mainline in revision 3149.
  • Revision ID: mayank.prasad@oracle.com-20120406113313-lml74mkqh1bj6icm
BUG#13738989 : 62136 : FAILED TO FETCH SELECT RESULT USING EMBEDDED MYSQLD

Background : 
In mysql-5.1, in a fix for bug#47485, code has been changed for 
mysql client (libmysql/libmysql.c) but corresponding code was not
changed for embedded mysql. In that code change, after execution
of a statement, mysql_stmt_store_result() checks for mysql->state
to be MYSQL_STATUS_STATEMENT_GET_RESULT, instead of
MYSQL_STATUS_GET_RESULT (earlier).

Reason:
In embedded mysql code, after execution, mysql->state was not
set to MYSQL_STATUS_STATEMENT_GET_RESULT, so it was throwing
OUT_OF_SYNC error.

Fix:
Fixed the code in libmysqld/lib_sql.cc to have mysql->state
to be set to MYSQL_STATUS_STATEMENT_GET_RESULT after execution.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: