diff options
author | Max <post@wickenrode.com> | 2017-03-09 03:39:29 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2017-03-09 03:39:29 +0100 |
commit | 7c56b11d8bdead768e86643a4b61e3f293820330 (patch) | |
tree | 413e33bb2f9ab97d5e71532585447a7fb928d836 /Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories | |
parent | 6c3ab14a0cb89e64256c1d3e7db57adb3d45057c (diff) | |
download | sequelpro-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.m | 4 | ||||
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m | 4 |
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]; |