TSQLScript fails if there are comments in stored procedure creation scripts
Original Reporter info from Mantis: BigChimp
-
Reporter name: Reinier Olislagers
Original Reporter info from Mantis: BigChimp
- Reporter name: Reinier Olislagers
Description:
Stored procedures creation statements with comments in them are not processed correctly.
Example:
SET TERM ^ ;
CREATE PROCEDURE givetheanswer
RETURNS (ANSWER INTEGER)
AS
BEGIN
-- bigger procedures often need comments.
FOR
select 42 from rdb$database into :ANSWER
DO
SUSPEND;
END^
SET TERM ; ^
Result: error:
FBScript.execute failed: GDS error 335544569( : PrepareStatement :
-Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 8, column 3
-DO)
Workaround is setting CommentsInSQL to false but that removes comments that may be needed for clarity in complicated scripts.
See test application
Mantis conversion info:
- Mantis ID: 26571
- OS: Windows
- OS Build: Windows 7
- Build: 28336
- Platform: x64 (with x86 compiler)
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 30306 (#23ca3148)
- Target version: 3.0.0