Prevent exporting dummy VIEWs from having multiple DEFAULT CURRENT_TIMESTAMP clauses. Fixes issue #2748.

This commit is contained in:
Ansgar Becker
2012-02-28 22:36:25 +00:00
parent 4ef984b52d
commit 156bd42291

View File

@ -1244,8 +1244,12 @@ begin
if ToDb then
Struc := Struc + Quoter.QuoteIdent(FinalDbName) + '.';
Struc := Struc + Quoter.QuoteIdent(DBObj.Name)+' (';
for Column in ColumnList do
for Column in ColumnList do begin
// Prevent DEFAULT value from coming in, to fix errors due to multiple CURRENT_TIMESTAMP values
// See issue #2748
Column.DefaultType := cdtNothing;
Struc := Struc + CRLF + #9 + Column.SQLCode + ',';
end;
Delete(Struc, Length(Struc), 1);
Struc := Struc + CRLF + ') ENGINE=MyISAM';
ColumnList.Free;