diff options
author | Max <post@wickenrode.com> | 2015-10-30 01:59:39 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-10-30 01:59:39 +0100 |
commit | d82dc7bbd87c29895910ae7ff7382d98687eba00 (patch) | |
tree | 7f537489f64778e198823ae1a6a1c8e8bd57f8f2 /Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m | |
parent | 07b2773ec7c74334922577cb7259fcb44da7a888 (diff) | |
download | sequelpro-d82dc7bbd87c29895910ae7ff7382d98687eba00.tar.gz sequelpro-d82dc7bbd87c29895910ae7ff7382d98687eba00.tar.bz2 sequelpro-d82dc7bbd87c29895910ae7ff7382d98687eba00.zip |
Use more reliable way of detecting server version
backport from c7b5e880003153e599a452151ee1f3a3e40aff4c and b2d798ba9282d3acf1a2d65de30849e529d4d255
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m index 4f1f1b7b..db1b2ba9 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Max Packet Size.m @@ -108,6 +108,10 @@ // Make a standard query to the server to retrieve the information SPMySQLResult *result = [self queryString:packetQueryString]; + if(!result) { // query fails on sphinxql, mysqld after upgrade without running mysql_upgrade + NSLog(@"Query for max_allowed_packet failed: %@ (%lu) (on %@)", [self lastErrorMessage], [self lastErrorID], [self serverVersionString]); + return; + } [result setReturnDataAsStrings:YES]; // Get the maximum size string |