aboutsummaryrefslogtreecommitdiffstats
path: root/sequel-pro.xcodeproj
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-02-18 21:47:29 +0000
committerrowanbeentje <rowan@beent.je>2009-02-18 21:47:29 +0000
commit3ca168863ddbdc3ac3bba0cfd9a64ce262cbfea8 (patch)
tree19639d2095efd7c3d48ac2dedf893653f8a60c2e /sequel-pro.xcodeproj
parent2525366dbfed3aef78beaed89630ea543389cec1 (diff)
downloadsequelpro-3ca168863ddbdc3ac3bba0cfd9a64ce262cbfea8.tar.gz
sequelpro-3ca168863ddbdc3ac3bba0cfd9a64ce262cbfea8.tar.bz2
sequelpro-3ca168863ddbdc3ac3bba0cfd9a64ce262cbfea8.zip
Sets and enforces a connection timeout, and handles connection timeouts appropriately - offering to retry, reconnect, or disconnect. This fixes Issue #93, Issue #69, and Issue #77.
The gory details: Previously, MCPKit was correctly running mysql_ping to ensure a connection still existed before running a query, and aborted the query if the connection was no longer active.However the code very rarely checked the response of this, so if a query failed subsequent queries would continue to be run and the program would end up checking non-existent results, throwing Cocoa exceptions and generally breaking. However, mysql_ping would also use the default timeout (30 seconds) for each check - when running the (previous to r333) 14 queries to switch tables, this resulted in a long hang before the program even broke. To exacerbate the issue, certain situations triggered a bug present in mysql_ping in the old client binaries we're using (http://bugs.mysql.com/bug.php?id=9678), causing mysql_ping to never return despite the presence of a timeout, and so causing an indefinite hang. This issue has been fixed by: - Setting a new 10 second connection timeout for both new connections (Issue #69) and for mysql_pings. Once preferences have been redesigned we'll probably make this value editable. - Enforce the 10 second timeout even if mysql_ping hangs by using interrupts. - Wrap mysql_ping in a new method to do the above and also catch re-established connections without reporting false failures. - When a connection has failed, prompt the user to Retry, Reconnect, or Disconnect. Reconnect uses the original details for the old connection to establish a new connection, also attempting to preserve the current encoding. - Do not return control to the main loop until a connection has been reestablished (or disconnected) - this ensures the program is never in a broken state without having to rewrite all query usage. Much of the above patches the MCPKit connection methods as necessary.
Diffstat (limited to 'sequel-pro.xcodeproj')
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj13
1 files changed, 13 insertions, 0 deletions
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index 0c4f7839..52a315eb 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -93,6 +93,7 @@
4DECC48F0EC2B436008D359E /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4DECC3320EC2A170008D359E /* Sparkle.framework */; };
4DECC4900EC2B436008D359E /* MCPKit_bundled.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4DECC3330EC2A170008D359E /* MCPKit_bundled.framework */; };
4DECC4910EC2B436008D359E /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4DECC3340EC2A170008D359E /* Growl.framework */; };
+ 58186D210F4CB38900851FE9 /* ConnectionErrorDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 58186D1F0F4CB38900851FE9 /* ConnectionErrorDialog.xib */; };
58C56EF50F438E120035701E /* SPDataCellFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 58C56EF40F438E120035701E /* SPDataCellFormatter.m */; };
58FEF16D0F23D66600518E8E /* SPSQLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 58FEF16C0F23D66600518E8E /* SPSQLParser.m */; };
58FEF57E0F3B4E9700518E8E /* SPTableData.m in Sources */ = {isa = PBXBuildFile; fileRef = 58FEF57D0F3B4E9700518E8E /* SPTableData.m */; };
@@ -248,6 +249,7 @@
4DECC3320EC2A170008D359E /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = "<group>"; };
4DECC3330EC2A170008D359E /* MCPKit_bundled.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MCPKit_bundled.framework; path = Frameworks/MCPKit_bundled.framework; sourceTree = "<group>"; };
4DECC3340EC2A170008D359E /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = Frameworks/Growl.framework; sourceTree = "<group>"; };
+ 58186D200F4CB38900851FE9 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Interfaces/English.lproj/ConnectionErrorDialog.xib; sourceTree = "<group>"; };
58C56EF30F438E120035701E /* SPDataCellFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDataCellFormatter.h; sourceTree = "<group>"; };
58C56EF40F438E120035701E /* SPDataCellFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDataCellFormatter.m; sourceTree = "<group>"; };
58FEF16B0F23D66600518E8E /* SPSQLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPSQLParser.h; sourceTree = "<group>"; };
@@ -540,6 +542,7 @@
children = (
17E642060EF020CB001BC333 /* DBView.xib */,
1761FD460EF03A6F00331368 /* MainMenu.xib */,
+ 58186D1F0F4CB38900851FE9 /* ConnectionErrorDialog.xib */,
);
path = Interfaces;
sourceTree = "<group>";
@@ -688,6 +691,7 @@
17E6423E0EF0218B001BC333 /* InfoPlist.strings in Resources */,
1761FD480EF03A6F00331368 /* MainMenu.xib in Resources */,
B5E2C5FA0F2353B5007446E0 /* TablePropertyIcon.png in Resources */,
+ 58186D210F4CB38900851FE9 /* ConnectionErrorDialog.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -777,6 +781,15 @@
name = InfoPlist.strings;
sourceTree = "<group>";
};
+ 58186D1F0F4CB38900851FE9 /* ConnectionErrorDialog.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 58186D200F4CB38900851FE9 /* English */,
+ );
+ name = ConnectionErrorDialog.xib;
+ path = ..;
+ sourceTree = "<group>";
+ };
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */