diff options
author | rowanbeentje <rowan@beent.je> | 2011-01-14 01:04:22 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-01-14 01:04:22 +0000 |
commit | eec292b2a6a348f061630bebc5bfd7d39aa57ea0 (patch) | |
tree | bab76a82233b0a2bf28bf013d5f8b03394bae6cf /Frameworks | |
parent | ae9a0c3c701429a6e0cd379245a4690e1933818a (diff) | |
download | sequelpro-eec292b2a6a348f061630bebc5bfd7d39aa57ea0.tar.gz sequelpro-eec292b2a6a348f061630bebc5bfd7d39aa57ea0.tar.bz2 sequelpro-eec292b2a6a348f061630bebc5bfd7d39aa57ea0.zip |
- 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)
Diffstat (limited to 'Frameworks')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |