mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
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:
@ -1062,8 +1062,10 @@ begin
|
||||
if ToDb then
|
||||
Insert(m(FinalDbName)+'.', Struc, Pos('TRIGGER', Struc) + 8 );
|
||||
if ToFile or ToDir then begin
|
||||
Struc := 'SET SESSION SQL_MODE='+esc(StrucResult.Col('sql_mode'))+';'+CRLF+
|
||||
Struc+';'+CRLF+
|
||||
Struc := 'SET SESSION SQL_MODE=' + esc(StrucResult.Col('sql_mode')) + ';' + CRLF +
|
||||
'DELIMITER ' + TempDelim + CRLF +
|
||||
Struc + TempDelim + CRLF +
|
||||
'DELIMITER ;' + CRLF +
|
||||
'SET SESSION SQL_MODE=@OLD_SQL_MODE';
|
||||
end;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user