Fix confusion with TYPE/ENGINE in CREATE TABLE statements. On target versions below 4.1.2 we now use "TYPE", "ENGINE" on all other versions.

Was discussed here:
http://www.heidisql.com/forum/viewtopic.php?p=1226#1226
This commit is contained in:
Ansgar Becker
2007-08-13 23:25:20 +00:00
parent c98802dc37
commit b015b87fcb

View File

@ -724,7 +724,9 @@ begin
k := 0;
while k <= j do k := k + 1 + Pos(' ', Copy(sql, k + 1, Length(sql)));
Delete(sql, j, k - j);
end;
end
else if target_version < 40102 then
begin
{***
@note ansgarbecker
The ENGINE and TYPE options specify the storage engine for the table.
@ -732,13 +734,13 @@ begin
It is the preferred option name as of those versions, and TYPE has
become deprecated. TYPE is supported throughout the 4.x series, but
likely will be removed in the future.
So we use "TYPE" on target versions below 4.1.2 and "ENGINE" on all other versions.
@see http://dev.mysql.com/doc/refman/4.1/en/create-table.html
@see http://www.heidisql.com/forum/viewtopic.php?p=1226#1226
}
if target_version < 40000 then
begin
sql := stringreplace(sql, 'ENGINE=', 'TYPE=', [rfReplaceAll]);
end
else if target_version >= 51000 then
else
begin
sql := stringreplace(sql, 'TYPE=', 'ENGINE=', [rfReplaceAll]);
end;