[Bug] [Sql Server] Wrong Stored Procedure retrieval for Sql Server 2014

ghasan's profile image ghasan posted 8 years ago in General Permalink

Hi,

I have this stored procedure, but it is reported wrongly under both 'Create code' tab and 'Routine body' section.

CREATE PROCEDURE [dbo].[myproc]
    @1 varchar(4000),
    @2 varchar(4000),
    @3 varchar(30),
    @4 datetime,
    @5 varchar(4000) output,
    @6 varchar(4000) output
AS
BEGIN
    SET NOCOUNT ON;
END

HeidiSql uses sp_helptext for the retrieval of the definition, which should report the correct definition.

Moreoever, at the beginning of the 'Create code' tab, there is this:

CREATE PROCEDURE "myproc"()
    LANGUAGE SQL -- from here
    NOT DETERMINISTIC
    CONTAINS SQL
    SQL SECURITY DEFINER
    COMMENT ''

which is not present in the sp_helptext.

ghasan's profile image ghasan posted 8 years ago Permalink

For the information, this is a real case with 400+ lines of code, and I am here only using the numerical variables and funny procedure body for demonstration only. But the resultant output is the same in both cases.

Thank you.

Please login to leave a reply, or register at first.