Surround TRIGGER creation export with custom DELIMITER, so readers (including HeidiSQL itself) are able to detect query end positions. Fixes issue #1672.

This commit is contained in:
Ansgar Becker
2010-02-07 16:59:03 +00:00
parent a0ba865f66
commit 3c34bc5e29

View File

@ -1062,8 +1062,10 @@ begin
if ToDb then if ToDb then
Insert(m(FinalDbName)+'.', Struc, Pos('TRIGGER', Struc) + 8 ); Insert(m(FinalDbName)+'.', Struc, Pos('TRIGGER', Struc) + 8 );
if ToFile or ToDir then begin if ToFile or ToDir then begin
Struc := 'SET SESSION SQL_MODE='+esc(StrucResult.Col('sql_mode'))+';'+CRLF+ Struc := 'SET SESSION SQL_MODE=' + esc(StrucResult.Col('sql_mode')) + ';' + CRLF +
Struc+';'+CRLF+ 'DELIMITER ' + TempDelim + CRLF +
Struc + TempDelim + CRLF +
'DELIMITER ;' + CRLF +
'SET SESSION SQL_MODE=@OLD_SQL_MODE'; 'SET SESSION SQL_MODE=@OLD_SQL_MODE';
end; end;
end; end;