From eec292b2a6a348f061630bebc5bfd7d39aa57ea0 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Fri, 14 Jan 2011 01:04:22 +0000 Subject: - Fix problems correctly resetting state when a query affects no rows on creating new tables; this could be responsible for -release errors in SPDataStorage, as well as out-of-bounds errors in SPDataStorage or SPTableContent. - Fix incorrect reporting of affected rows in MCPKit due to the use of meta/status queries; only track affected rows for framework-usage queries (already largely implemented in previous revisions) --- Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Frameworks/MCPKit/MCPFoundationKit') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index af5e6123..3556e9d7 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -1899,13 +1899,14 @@ void pingThreadCleanup(MCPConnectionPingDetails *pingDetails) } /** - * Returns the number of affected rows by the last query. + * Returns the number of affected rows by the last query. Only actual queries + * supplied via queryString:, streamingQueryString:, streamingQueryString:useLowMemoryBlockingStreaming: + * or queryString:usingEncoding:streamingResult: will have their affected rows + * returned, not any "meta" type queries. */ - (my_ulonglong)affectedRows { - if (mConnected) { - return mysql_affected_rows(mConnection); - } + if (mConnected) return lastQueryAffectedRows; return 0; } -- cgit v1.2.3