mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +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
|
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;
|
||||||
|
Reference in New Issue
Block a user