Firebird 3.0.6 BUG Lost comment when alter store procedure

54 views
Skip to first unread message

sergio toniutti

unread,
Jan 12, 2021, 10:01:19 AM1/12/21
to firebird-support
Firebird removes comments before the first line of code when CREATE OR ALTER PROCEDURE command that’s being executed.
I use Firebird 3.0.6 on Ubuntu.
Can you help me? Thanks

Sergio

Mark Rotteveel

unread,
Jan 12, 2021, 10:03:30 AM1/12/21
to firebird...@googlegroups.com
Firebird itself doesn't save the declaration text of the procedure, only
the *body*, so if you want to preserve comments, they need to be put
inside the body (after the AS keyword).

Alternatively, use the COMMENT ON statement[1] to add a comment on the
statement.

[1]:
https://firebirdsql.org/file/documentation/html/en/refdocs/fblangref25/firebird-25-language-reference.html#fblangref25-ddl-comment-create

--
Mark Rotteveel

Martijn Tonies (Upscene Productions)

unread,
Jan 12, 2021, 10:10:04 AM1/12/21
to firebird...@googlegroups.com
Hello Mark,

That's partly true ;)

In Firebird 2.5, comments after AS are preserved, in Firebird 3, this has
changed.

CREATE PROCEDURE myproc (i integer)
returns
(i2 integer)
AS
/* test */
declare variable v varchar(20);
begin

This comment is preserved in Firebird 2.5, but not in Firebird 3.


With regards,

Martijn Tonies
Upscene Productions
https://www.upscene.com

Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase, NexusDB and Firebird.
--
You received this message because you are subscribed to the Google Groups
"firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/firebird-support/643d9fea-c484-9a6b-5ac5-fb6956c125bf%40lawinegevaar.nl.

Mark Rotteveel

unread,
Jan 12, 2021, 10:13:45 AM1/12/21
to firebird...@googlegroups.com
On 12-01-2021 16:09, Martijn Tonies (Upscene Productions) wrote:
> That's partly true ;)
>
> In Firebird 2.5, comments after AS are preserved, in Firebird 3, this
> has changed.
>
> CREATE PROCEDURE myproc (i integer)
> returns
> (i2 integer)
> AS
> /* test */
> declare variable v varchar(20);
> begin
>
> This comment is preserved in Firebird 2.5, but not in Firebird 3.

To be honest, that sounds like a regression to me. Could you report it?

Mark
--
Mark Rotteveel

Martijn Tonies (Upscene Productions)

unread,
Jan 12, 2021, 10:40:18 AM1/12/21
to firebird...@googlegroups.com
Hello Mark,

Done.
http://tracker.firebirdsql.org/browse/CORE-6467


With regards,

Martijn Tonies
Upscene Productions
https://www.upscene.com

Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase, NexusDB and Firebird.

-----Original Message-----
From: Mark Rotteveel
Sent: Tuesday, January 12, 2021 4:13 PM
To: firebird...@googlegroups.com
Subject: Re: [firebird-support] Firebird 3.0.6 BUG Lost comment when alter
store procedure

--
You received this message because you are subscribed to the Google Groups
"firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/firebird-support/0544b14c-2b3c-9868-2d40-ba6c9dadfcca%40lawinegevaar.nl.

Mark Rotteveel

unread,
Jan 12, 2021, 11:41:13 AM1/12/21
to firebird...@googlegroups.com
On 12-01-2021 16:40, Martijn Tonies (Upscene Productions) wrote:
> Hello Mark,
>
> Done.
> http://tracker.firebirdsql.org/browse/CORE-6467

Sergio had also reported one
(http://tracker.firebirdsql.org/browse/CORE-6466).

Interestingly, this issue does not occur if there are no DECLARE statements.

Mark
--
Mark Rotteveel

Martijn Tonies (Upscene Productions)

unread,
Jan 12, 2021, 12:48:06 PM1/12/21
to firebird...@googlegroups.com
Hi,
Oh darn it ;)

>Interestingly, this issue does not occur if there are no DECLARE
>statements.

Huh, that is interesting. Happy bug-hunting ;)

sergio toniutti

unread,
Jan 13, 2021, 2:31:51 AM1/13/21
to firebird-support
Grazie (thank you) Mark and Martijn!  We hope they resolve with the next release...
Sergio

Reply all
Reply to author
Forward
0 new messages