aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-06-25 23:56:25 +0000
committerrowanbeentje <rowan@beent.je>2012-06-25 23:56:25 +0000
commit0770ecf46cb1072e3327598fe8aa850cdd818302 (patch)
treeed3897d709a762193f04aaebbfd82f941b32fc0c /Source/SPDatabaseDocument.m
parent2776ee20e178628a7802a0fc603e06b5d1b24d0a (diff)
downloadsequelpro-0770ecf46cb1072e3327598fe8aa850cdd818302.tar.gz
sequelpro-0770ecf46cb1072e3327598fe8aa850cdd818302.tar.bz2
sequelpro-0770ecf46cb1072e3327598fe8aa850cdd818302.zip
- Allow table check/optimize/analyze etc operations to be performed on MySQL 4.1 servers which return results as NSData
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index a6d7bfd8..d9bdcd24 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -1777,6 +1777,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
if([selectedItems count] == 0) return;
SPMySQLResult *theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"CHECK TABLE %@", [selectedItems componentsJoinedAndBacktickQuoted]]];
+ [theResult setReturnDataAsStrings:YES];
NSString *what = ([selectedItems count]>1) ? NSLocalizedString(@"selected items", @"selected items") : [NSString stringWithFormat:@"%@ '%@'", NSLocalizedString(@"table", @"table"), [self table]];
@@ -1853,6 +1854,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
if([selectedItems count] == 0) return;
SPMySQLResult *theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"ANALYZE TABLE %@", [selectedItems componentsJoinedAndBacktickQuoted]]];
+ [theResult setReturnDataAsStrings:YES];
NSString *what = ([selectedItems count]>1) ? NSLocalizedString(@"selected items", @"selected items") : [NSString stringWithFormat:@"%@ '%@'", NSLocalizedString(@"table", @"table"), [self table]];
@@ -1929,6 +1931,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
if([selectedItems count] == 0) return;
SPMySQLResult *theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"OPTIMIZE TABLE %@", [selectedItems componentsJoinedAndBacktickQuoted]]];
+ [theResult setReturnDataAsStrings:YES];
NSString *what = ([selectedItems count]>1) ? NSLocalizedString(@"selected items", @"selected items") : [NSString stringWithFormat:@"%@ '%@'", NSLocalizedString(@"table", @"table"), [self table]];
@@ -2004,6 +2007,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
if([selectedItems count] == 0) return;
SPMySQLResult *theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"REPAIR TABLE %@", [selectedItems componentsJoinedAndBacktickQuoted]]];
+ [theResult setReturnDataAsStrings:YES];
NSString *what = ([selectedItems count]>1) ? NSLocalizedString(@"selected items", @"selected items") : [NSString stringWithFormat:@"%@ '%@'", NSLocalizedString(@"table", @"table"), [self table]];
@@ -2079,6 +2083,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase";
if([selectedItems count] == 0) return;
SPMySQLResult *theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"FLUSH TABLE %@", [selectedItems componentsJoinedAndBacktickQuoted]]];
+ [theResult setReturnDataAsStrings:YES];
NSString *what = ([selectedItems count]>1) ? NSLocalizedString(@"selected items", @"selected items") : [NSString stringWithFormat:@"%@ '%@'", NSLocalizedString(@"table", @"table"), [self table]];