aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2017-03-09 03:39:29 +0100
committerMax <post@wickenrode.com>2017-03-09 03:39:29 +0100
commit7c56b11d8bdead768e86643a4b61e3f293820330 (patch)
tree413e33bb2f9ab97d5e71532585447a7fb928d836 /Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories
parent6c3ab14a0cb89e64256c1d3e7db57adb3d45057c (diff)
downloadsequelpro-7c56b11d8bdead768e86643a4b61e3f293820330.tar.gz
sequelpro-7c56b11d8bdead768e86643a4b61e3f293820330.tar.bz2
sequelpro-7c56b11d8bdead768e86643a4b61e3f293820330.zip
* Turn `-[SPMySQLConnection checkConnectionIfNecessary]` into a public method, since it is actually the preferable way to `-[SPMySQLConnection checkConnection]` (which forces network IO in a new thread each time)
* Change `-[SPDatabaseStructure queryDbStructureWithUserInfo:]` doing a forced connection check inside a tight loop (#2306)
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m4
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m4
2 files changed, 4 insertions, 4 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m
index d96ebe52..594756be 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m
@@ -79,7 +79,7 @@
// Ensure per-thread variables are set up
[self _validateThreadSetup];
- if (![self _checkConnectionIfNecessary]) return nil;
+ if (![self checkConnectionIfNecessary]) return nil;
// Perform a lossy conversion to bytes, using NSData to do the hard work. Preserves
// nul characters correctly.
@@ -259,7 +259,7 @@
[self _validateThreadSetup];
// Check the connection if necessary, returning nil if the state couldn't be validated
- if (![self _checkConnectionIfNecessary]) return nil;
+ if (![self checkConnectionIfNecessary]) return nil;
// Determine whether a maximum query size needs to be restored from a previous query
if (queryActionShouldRestoreMaxQuerySize != NSNotFound) {
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m
index db846929..d8d87931 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m
@@ -107,7 +107,7 @@
if (state != SPMySQLConnected) return nil;
// Check the connection if appropriate
- if (![self _checkConnectionIfNecessary]) return nil;
+ if (![self checkConnectionIfNecessary]) return nil;
// Lock the connection before using it
[self _lockConnection];
@@ -153,7 +153,7 @@
- (BOOL)serverShutdown
{
- if([self _checkConnectionIfNecessary]) {
+ if([self checkConnectionIfNecessary]) {
[self _lockConnection];
// Ensure per-thread variables are set up
[self _validateThreadSetup];