aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m2
-rw-r--r--Source/SPDatabaseStructure.m11
-rw-r--r--Source/SPTableData.m1
3 files changed, 6 insertions, 8 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
index 4f1e8a74..6308a3f5 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
@@ -656,7 +656,7 @@ const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RS
// If set to use a socket and a socket was supplied, use it; otherwise, search for a socket to use
if (useSocket) {
- if (socketPath) {
+ if ([socketPath length]) {
theSocket = [self _cStringForString:socketPath];
} else {
theSocket = [self _cStringForString:[SPMySQLConnection findSocketPath]];
diff --git a/Source/SPDatabaseStructure.m b/Source/SPDatabaseStructure.m
index 35637093..42896b55 100644
--- a/Source/SPDatabaseStructure.m
+++ b/Source/SPDatabaseStructure.m
@@ -400,13 +400,10 @@
NSString *key = [row objectAtIndex:4];
NSString *def = [row objectAtIndex:5];
NSString *extra = [row objectAtIndex:6];
- NSString *priv = [row objectAtIndex:7];
- NSString *comment;
- if ([row count] > 8) {
- comment = [row objectAtIndex:8];
- } else {
- comment = @"";
- }
+ NSString *priv = @"";
+ NSString *comment = @"";
+ if ([row count] > 7) priv = [row objectAtIndex:7];
+ if ([row count] > 8) comment = [row objectAtIndex:8];
NSString *charset = @"";
if (![collation isNSNull]) {
diff --git a/Source/SPTableData.m b/Source/SPTableData.m
index 5f043548..582ad9d2 100644
--- a/Source/SPTableData.m
+++ b/Source/SPTableData.m
@@ -1301,6 +1301,7 @@
// MySQL before 5.0.3 does not support the WHERE syntax
r = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM %@ /*!50003 WHERE `key` = 'PRI'*/", [selectedTable backtickQuotedString]]];
[r setReturnDataAsStrings:YES];
+ [r setDefaultRowReturnType:SPMySQLResultRowAsArray];
if ([r numberOfRows] < 1) {
if (changeEncoding && [mySQLConnection isConnected]) [mySQLConnection restoreStoredEncoding];