diff options
author | stuconnolly <stuart02@gmail.com> | 2009-07-01 18:23:51 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-07-01 18:23:51 +0000 |
commit | d53b0df83b77422a2f37e8c53843313ae1a186b5 (patch) | |
tree | 34ae64aaee084e3e27a6bbaca0772ae43143506d /Source/TablesList.m | |
parent | cdafb3e3ebcb3e6ef1fad77347916fd69a84a1cb (diff) | |
download | sequelpro-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/TablesList.m')
-rw-r--r-- | Source/TablesList.m | 11 |
1 files changed, 5 insertions, 6 deletions
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 |