Bug#14013 mysql_stmt_store_result() bombs if a cursor is open
- Add code to 'mysql_stmt_store_result' to allow it to be called on a prepared statement with open server side cursor. - Add tests to mysql_client_test that uses 'mysql_stmt_store_result' client/mysqltest.c: Enable cursor protocol(remove the ifdef BUG14013_FIXED) When running in cursor mode, the warnings from execute needs to be extracted after mysql_stmt_execute, put them in a dynamic string for later use. Untabify some tabs. libmysql/libmysql.c: Allow 'mysql_stmt_store_result' to be called on a statement with an open server side cursor. Detect that a server side cursor is open and send a "fetch" to ask for all rows to be sent to the client. Read all binary rows as normal store. Check that server said last row was sent after all binary rows has been sent. tests/mysql_client_test.c: Update 'fetch_n' function to take parameter indicating if 'mysql_stmt_store_result' should be used on the statement. Call fetch_n with parameter set to use 'mysql_stmt_store_result'
Showing
Please register or sign in to comment