aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-07-01 18:23:51 +0000
committerstuconnolly <stuart02@gmail.com>2009-07-01 18:23:51 +0000
commitd53b0df83b77422a2f37e8c53843313ae1a186b5 (patch)
tree34ae64aaee084e3e27a6bbaca0772ae43143506d /Source
parentcdafb3e3ebcb3e6ef1fad77347916fd69a84a1cb (diff)
downloadsequelpro-d53b0df83b77422a2f37e8c53843313ae1a186b5.tar.gz
sequelpro-d53b0df83b77422a2f37e8c53843313ae1a186b5.tar.bz2
sequelpro-d53b0df83b77422a2f37e8c53843313ae1a186b5.zip
When displaying the add new table sheet use SPDatabaseData to get the available storage engines instead of the information_schema.engines table, which doesn't exist in versions other than MySQL 5.
Diffstat (limited to 'Source')
-rw-r--r--Source/TablesList.h1
-rw-r--r--Source/TablesList.m11
2 files changed, 6 insertions, 6 deletions
diff --git a/Source/TablesList.h b/Source/TablesList.h
index 032f7f15..8a13e487 100644
--- a/Source/TablesList.h
+++ b/Source/TablesList.h
@@ -46,6 +46,7 @@ enum sp_table_types
IBOutlet id tableDumpInstance;
IBOutlet id tableDataInstance;
IBOutlet id extendedTableInfoInstance;
+ IBOutlet id databaseDataInstance;
IBOutlet id tableWindow;
IBOutlet id copyTableSheet;
diff --git a/Source/TablesList.m b/Source/TablesList.m
index d07fe544..ae438dec 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -35,6 +35,7 @@
#import "SPStringAdditions.h"
#import "SPArrayAdditions.h"
#import "RegexKitLite.h"
+#import "SPDatabaseData.h"
@implementation TablesList
@@ -209,17 +210,15 @@
// Populate the table type (engine) popup button
[tableTypeButton removeAllItems];
- CMMCPResult *engines = [mySQLConnection queryString:@"SELECT engine FROM information_schema.engines"];
-
- [engines dataSeek:0];
-
+ NSArray *engines = [databaseDataInstance getDatabaseStorageEngines];
+
// Add default menu item
[tableTypeButton addItemWithTitle:@"Default"];
[[tableTypeButton menu] addItem:[NSMenuItem separatorItem]];
- for (int i = 0; i < [engines numOfRows]; i++)
+ for (NSDictionary *engine in engines)
{
- [tableTypeButton addItemWithTitle:[[engines fetchRowAsArray] objectAtIndex:0]];
+ [tableTypeButton addItemWithTitle:[engine objectForKey:@"Engine"]];
}
[NSApp beginSheet:tableSheet