From f60ebc4815f9fd7fedacfb849547edf73feee3a9 Mon Sep 17 00:00:00 2001 From: "konstantin@mysql.com" <> Date: Thu, 30 Jun 2005 16:17:10 +0400 Subject: A fix and a test case for Bug#10794 "mysql_stmt_attr_set no open cursor after mysql_stmt_execute" + post-review fixes. The bug was caused by wrong flags in stmt->server_status on the client side: if there was no cursor, the server didn't send server_status flags to the client, and the old flags were used to set up the fetch function of a statement. Consequently, stmt_read_row_from_cursor was used when there was no cursor. The fix fixes the server to always send server flags to the client. --- libmysql/libmysql.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libmysql') diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 8ee11519615..e33fd470582 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2726,7 +2726,6 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row) set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate); return 1; } - stmt->server_status= mysql->server_status; if (cli_read_binary_rows(stmt)) return 1; stmt->server_status= mysql->server_status; -- cgit v1.2.1