aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-07-08 00:22:16 +0000
committerrowanbeentje <rowan@beent.je>2009-07-08 00:22:16 +0000
commit9818e55d8d240314fa05f76ba8b7c9ed5ba43d00 (patch)
tree57f6bfe5eb885e85f4c951bb3d3f90383f60a134 /Source/CMMCPConnection.m
parente169667bc113a6f6f8b75448dbe450a84e275f63 (diff)
downloadsequelpro-9818e55d8d240314fa05f76ba8b7c9ed5ba43d00.tar.gz
sequelpro-9818e55d8d240314fa05f76ba8b7c9ed5ba43d00.tar.bz2
sequelpro-9818e55d8d240314fa05f76ba8b7c9ed5ba43d00.zip
- Ensure that error IDs are available from CMMCPConnection after connection or database selection problems
- Detect connection errors due to "Access denied" problems and show a clearer, more appropriate error message
Diffstat (limited to 'Source/CMMCPConnection.m')
-rw-r--r--Source/CMMCPConnection.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index b9bffd9b..df71ff82 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -266,6 +266,7 @@ static void forcePingTimeout(int signalNumber);
thePass = NULL;
if (theRet != mConnection) {
[self setLastErrorMessage:nil];
+ lastQueryErrorId = mysql_errno(mConnection);
return mConnected = NO;
}
@@ -278,6 +279,7 @@ static void forcePingTimeout(int signalNumber);
if (![self fetchMaxAllowedPacket]) {
[self setLastErrorMessage:nil];
+ lastQueryErrorId = mysql_errno(mConnection);
return mConnected = NO;
}
@@ -688,6 +690,7 @@ static void forcePingTimeout(int signalNumber);
return YES;
}
[self setLastErrorMessage:nil];
+ lastQueryErrorId = mysql_errno(mConnection);
if (connectionTunnel) {
[connectionTunnel disconnect];
[delegate setTitlebarStatus:@"SSH Disconnected"];