aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTablesList.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-01-13 00:51:39 +0000
committerrowanbeentje <rowan@beent.je>2011-01-13 00:51:39 +0000
commit15ad4cdf44427d5a9595a0d7a15257ed79eae8ae (patch)
tree247e33de73bd9fb41291c3bea7cb1c08256be03f /Source/SPTablesList.m
parentff134517f81971fce5ee5636aab9d2051ffa7705 (diff)
downloadsequelpro-15ad4cdf44427d5a9595a0d7a15257ed79eae8ae.tar.gz
sequelpro-15ad4cdf44427d5a9595a0d7a15257ed79eae8ae.tar.bz2
sequelpro-15ad4cdf44427d5a9595a0d7a15257ed79eae8ae.zip
- Add a new -engineTypeQueryName method to SPServerSupport, with a correct split between TYPE or ENGINE depending on database version.
- Update CREATE TABLE and ALERT TABLE queries to use this, fixing custom-type table creation on MySQL <4 and table type changes on MySQL >= 5.5. This addresses Issue #947.
Diffstat (limited to 'Source/SPTablesList.m')
-rw-r--r--Source/SPTablesList.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m
index da787a6d..6d96956c 100644
--- a/Source/SPTablesList.m
+++ b/Source/SPTablesList.m
@@ -2007,7 +2007,7 @@
// If there is a type selected other than the default we must specify it in CREATE TABLE statement
if ([tableTypeButton indexOfSelectedItem] > 0) {
- engineStatement = [NSString stringWithFormat:@"ENGINE = %@", [tableType backtickQuotedString]];
+ engineStatement = [NSString stringWithFormat:@"%@ = %@", [[tableDocumentInstance serverSupport] engineTypeQueryName], [tableType backtickQuotedString]];
}
NSString *createStatement = [NSString stringWithFormat:@"CREATE TABLE %@ (%@) %@ %@", [tableName backtickQuotedString], ([tableType isEqualToString:@"CSV"]) ? @"id INT NOT NULL" : @"id INT", charSetStatement, engineStatement];