aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-11-16 23:35:20 +0000
committerrowanbeentje <rowan@beent.je>2009-11-16 23:35:20 +0000
commit02097a03b20a58957149e68ad484fd2769831481 (patch)
tree3ffb01ce1aaa4d9b8950ea8f83c87a49baed0b54 /Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
parentcd0ac7f9878e2649846e46f559a7ba5ee3047e72 (diff)
downloadsequelpro-02097a03b20a58957149e68ad484fd2769831481.tar.gz
sequelpro-02097a03b20a58957149e68ad484fd2769831481.tar.bz2
sequelpro-02097a03b20a58957149e68ad484fd2769831481.zip
- Correctly report errors triggered *during* result download for streaming results. This improves partial content displays (using the new code as of r1530) and also improves custom query error reporting.
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m11
1 files changed, 10 insertions, 1 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 7db3ec2d..07ea4c39 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -1126,6 +1126,15 @@ void performThreadedKeepAlive(void *ptr)
return NO;
}
+/**
+ * Update error messages - for example after a streaming result has finished processing.
+ */
+- (void)updateErrorStatuses
+{
+ [self setLastErrorMessage:nil];
+ lastQueryErrorId = mysql_errno(mConnection);
+}
+
#pragma mark -
#pragma mark Queries
@@ -1405,7 +1414,7 @@ void performThreadedKeepAlive(void *ptr)
if (queryCancelled) {
queryErrorMessage = [[NSString alloc] initWithString:NSLocalizedString(@"Query cancelled.", @"Query cancelled error")];
- queryErrorId = 1152;
+ queryErrorId = 1317;
} else {
queryErrorMessage = [[NSString alloc] initWithString:[self stringWithCString:mysql_error(mConnection)]];
queryErrorId = mysql_errno(mConnection);