diff options
author | rowanbeentje <rowan@beent.je> | 2012-03-14 01:50:43 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-03-14 01:50:43 +0000 |
commit | a9f95273a69035e6be8249a42322350df695870f (patch) | |
tree | 32084c4b0947ad7a8c17fa79445a13464c712d44 /Source | |
parent | 79eff5bf42154da8d7730e0e0159160f68ec4e16 (diff) | |
download | sequelpro-a9f95273a69035e6be8249a42322350df695870f.tar.gz sequelpro-a9f95273a69035e6be8249a42322350df695870f.tar.bz2 sequelpro-a9f95273a69035e6be8249a42322350df695870f.zip |
SPMySQL integration bugfixes:
- Fix a bug where the socket path would not be autodetected if an empty string was supplied
- Fix a bug fetching primary key column names for tables
- Fix a bug building database structures on MySQL 3.x servers
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPDatabaseStructure.m | 11 | ||||
-rw-r--r-- | Source/SPTableData.m | 1 |
2 files changed, 5 insertions, 7 deletions
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]; |