From 761ee77727eb18e0ed6980ea98ea723cb8b3e817 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 9 Apr 2012 16:37:31 +0000 Subject: - Upgrade to the MySQL 5.5.22 client libraries, updating to a much more up-to-date codebase. - Update the build-mysql-client.sh MySQL build script within SPMySQL.framework to allow it to easily build 5.5 client libraries - Fix reconnection within SPMySQL.framework after a connection is lost for MySQL servers < 5 when a query is cancelled by killing the connection --- .../Source/SPMySQLConnection Categories/Querying & Preparation.m | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m') diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m index 686be183..5df71e96 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m @@ -339,6 +339,13 @@ if (lastQueryWasCancelled) { theErrorMessage = NSLocalizedString(@"Query cancelled.", @"Query cancelled error"); theErrorID = 1317; + + // If the query was cancelled on a MySQL <5 server, check the connection to allow reconnects + // after query kills. This is also handled within the class for internal cancellations, but + // as other external classes may also cancel the query. + if (![self serverVersionIsGreaterThanOrEqualTo:5 minorVersion:0 releaseVersion:0]) { + [self checkConnection]; + } } // Unlock the connection if appropriate - if not a streaming result type. -- cgit v1.2.3