diff options
author | rowanbeentje <rowan@beent.je> | 2009-08-26 00:46:24 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-08-26 00:46:24 +0000 |
commit | 7de1a9a8517c2004e6a97543fbb1462d9c32f4d1 (patch) | |
tree | e5fe038f9dc6d55652e4e109adca542e468b2073 /Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | |
parent | d4294235a11548d4712cf3174b0887eea50a5e4c (diff) | |
download | sequelpro-7de1a9a8517c2004e6a97543fbb1462d9c32f4d1.tar.gz sequelpro-7de1a9a8517c2004e6a97543fbb1462d9c32f4d1.tar.bz2 sequelpro-7de1a9a8517c2004e6a97543fbb1462d9c32f4d1.zip |
Alter CustomQuery to use StreamingResult to download and process result sets:
- Significantly improve memory usage
- Minor speedup (1.1x faster?) to overall query/display times
- Improvements to MCPStreamingResult and MCPConnection to accurately report affected row count
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index 4413e1c0..2463041a 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -1365,6 +1365,8 @@ static void forcePingTimeout(int signalNumber) // On success, capture the results if (0 == queryResultCode) { + queryAffectedRows = mysql_affected_rows(mConnection); + if (mysql_field_count(mConnection) != 0) { // For normal result sets, fetch the results and unlock the connection @@ -1391,10 +1393,8 @@ static void forcePingTimeout(int signalNumber) queryErrorMessage = [[NSString alloc] initWithString:@""]; queryErrorId = 0; - if (streamResultType == MCP_NO_STREAMING) { + if (streamResultType == MCP_NO_STREAMING && queryAffectedRows == -1) { queryAffectedRows = mysql_affected_rows(mConnection); - } else { - queryAffectedRows = 0; } // On failure, set the error messages and IDs |