aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-15 16:05:54 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-15 16:05:54 +0000
commit70d15ff4ecdfd3c6996b3b8b2259674f9e9c9345 (patch)
tree83480a09ef5d35003e1971ac9c341f578940f55e /Source/CMMCPConnection.m
parent39c34617b01f72c7466eee98675447e277e326cb (diff)
downloadsequelpro-70d15ff4ecdfd3c6996b3b8b2259674f9e9c9345.tar.gz
sequelpro-70d15ff4ecdfd3c6996b3b8b2259674f9e9c9345.tar.bz2
sequelpro-70d15ff4ecdfd3c6996b3b8b2259674f9e9c9345.zip
• deleted the drag&drop feature of file path or content from SPTextViewAdditions
- that feature should be added by subclassing NSTextView • fixed focus setting of editSheet • fixed general issue if SP tries to execute a query which is longer than max_allowed_packet - now it reconnects after changing max_allowed_packet (if it's editable) - the user will be informed via a log entry about that change - the new max_allowed_packet size will be valid during the current session; after reconnection to that db the default size will be used
Diffstat (limited to 'Source/CMMCPConnection.m')
-rw-r--r--Source/CMMCPConnection.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index 4e897056..ca86fbd7 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -697,6 +697,7 @@ static void forcePingTimeout(int signalNumber);
if(isMaxAllowedPacketEditable && queryResultCode == 1 && queryErrorID == 2006) {
currentMaxAllowedPacket = [self getMaxAllowedPacket];
[self setMaxAllowedPacketTo:strlen(theCQuery)+1024];
+ [self reconnect];
}
// The connection has been restored - re-run the query
@@ -1074,7 +1075,8 @@ static void forcePingTimeout(int signalNumber)
if(![self isMaxAllowedPacketEditable] || newSize < 1024) return [self getMaxAllowedPacket];
mysql_query(mConnection, [[NSString stringWithFormat:@"SET GLOBAL max_allowed_packet = %d", newSize] UTF8String]);
-
+ // Inform the user via a log entry about that change
+ [delegate queryGaveError:[NSString stringWithFormat:@"Query too large; max_allowed_packet temporarily set to %d for the current session to allow query to succeed", newSize]];
return [self getMaxAllowedPacket];
}