From 15ad4cdf44427d5a9595a0d7a15257ed79eae8ae Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 13 Jan 2011 00:51:39 +0000 Subject: - 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. --- Source/SPExtendedTableInfo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/SPExtendedTableInfo.m') diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m index a765f6df..6f039659 100644 --- a/Source/SPExtendedTableInfo.m +++ b/Source/SPExtendedTableInfo.m @@ -98,7 +98,7 @@ } // Alter table's storage type - [connection queryString:[NSString stringWithFormat:@"ALTER TABLE %@ TYPE = %@", [selectedTable backtickQuotedString], newType]]; + [connection queryString:[NSString stringWithFormat:@"ALTER TABLE %@ %@ = %@", [selectedTable backtickQuotedString], [[tableDocumentInstance serverSupport] engineTypeQueryName], newType]]; if ([connection getLastErrorID] == 0) { // Reload the table's data -- cgit v1.2.3