Firebird 2.5 allows to declare variables within Stored Procedures with more 
than 31 characters
----------------------------------------------------------------------------------------------

                 Key: CORE-6047
                 URL: http://tracker.firebirdsql.org/browse/CORE-6047
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.8
         Environment: Windows 10 x64 
Firebird 2.5.8 (x64)
            Reporter: Luciano Mendes


ACTUAL RESULT: 
- Firebird 2.5 allows to declare variables within Stored Procedures with more 
than 31 characters

EXPECTED RESULT: 
- Firebird 2.5 should not allows to declare variables within Stored Procedures 
with more than 31 characters like it is not allowed on Firebird 3.0:
Message: isc_dsql_prepare failed

SQL Message : -104
Invalid token

Engine Code    : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Name longer than database column size

- This issue needs to be fixed to maintain the compatibility of the Firebird 
2.5 Metadata script extracted with the Firebird 3.0


STEPS TO REPRODUCE THE ISSUE 
1- Create a Firebird SQL 2.5 database 
2- Try to create a Stored Procedure with a declareted variable within Stored 
Procedures with more than 31 characters (e.g.: V_TOTAL_CROSS_WORKING_TIME_DAY 
NUMERIC)
CREATE PROCEDURE C_SERVICE_BTC_PRIMAVERA (UID VARCHAR(32) CHARACTER SET WIN1252,
FIRST_DAY DATE,
LAST_DAY DATE,
TEAM VARCHAR(32) CHARACTER SET WIN1252)
RETURNS (CALENDAR DATE,
SITE VARCHAR(32) CHARACTER SET WIN1252,
PROJECT VARCHAR(32) CHARACTER SET WIN1252,
PRODUCT VARCHAR(32) CHARACTER SET WIN1252,
REGION VARCHAR(32) CHARACTER SET WIN1252,
WORKING_TIME NUMERIC(18, 4))
AS
DECLARE V_TOTAL_WORKING_TIME_DAY NUMERIC(18,9);
DECLARE V_TOTAL_CROSS_WORKING_TIME_DAY NUMERIC(18,9);
DECLARE V_TOTAL_PRODUCT_WORKING_TIME_DAY NUMERIC(18,9);
DECLARE V_VALID_WORKING_TIME_DAY NUMERIC(18,9);
BEGIN
END^

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to