Bug #2247 | mysql_stmt_affected_rows returns affected rows from last command | ||
---|---|---|---|
Submitted: | 1 Jan 2004 6:35 | Modified: | 20 Feb 2004 2:15 |
Reporter: | Georg Richter | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.2 | OS: | Any (any) |
Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
[1 Jan 2004 6:35]
Georg Richter
[5 Jan 2004 15:47]
Dean Ellis
Verifying, though this sounds more like a matter that needs internal discussion.
[5 Jan 2004 16:43]
Konstantin Osipov
This is description of 2291 which is a copy of this bug: Description: Implementation of mysql_stmt_affected_rows() is the following: /* Return total affected rows from the last statement */ my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt) { return stmt->mysql->last_used_con->affected_rows; } We should return statement-local variable here, otherwise that call is nothing but usual mysql_affected_rows How to repeat: - Suggested fix: Add statement-local variable affected_rows and copy it from mysql->last_used_conn->affected_rows in execute() function of libmysql.c
[20 Feb 2004 2:15]
Konstantin Osipov
Fixed in 4.1.2, bk commit - 4.1 tree (konstantin:1.1694)