Remove old workaround for exporting between MySQL 4 and 5, where the TYPE/ENGINE clause is incompatible between source and target server. This breaks exporting identifiers with these keywords in them. Closes #1222

This commit is contained in:
Ansgar Becker
2020-11-17 17:51:54 +01:00
parent 033041c2c5
commit fc9320b8cd

View File

@ -1446,7 +1446,6 @@ var
RowCount, Limit, Offset, ResultCount: Int64;
StartTime: Cardinal;
StrucResult, Data: TDBQuery;
rx: TRegExpr;
ColumnList: TTableColumnList;
Column: TTableColumn;
Quoter: TDBConnection;
@ -1601,16 +1600,6 @@ begin
Insert('IF NOT EXISTS ', Struc, Pos('TABLE', Struc) + 6);
if ToDb then
Insert(Quoter.QuoteIdent(FinalDbName)+'.', Struc, Pos('EXISTS', Struc) + 7 );
if ToServer then begin
rx := TRegExpr.Create;
rx.ModifierI := True;
rx.Expression := '(\s)(TYPE|ENGINE)(\=|\s+)(\w+)';
if FTargetConnection.ServerVersionInt < 40018 then
Struc := rx.Replace(Struc, '${1}TYPE${3}${4}', true)
else
Struc := rx.Replace(Struc, '${1}ENGINE${3}${4}', true);
rx.Free;
end;
end;
lntView: begin