New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISQL is adding an unnecessary COMMIT WORK statement to the extracted metadata script before starting the Stored functions headers/bodies statements [CORE6505] #6735
Comments
Modified by: @luronumenAttachment: DDL.SQL [ 13554 ] |
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Modified by: @AlexPeshkoffpriority: Major [ 3 ] => Minor [ 4 ] issuetype: Bug [ 1 ] => Improvement [ 4 ] |
Commented by: @luronumen This issue is also reproducible for Stored procedures headers/bodies statements (See lines 4 and 13 from DDL_PROCEDURE.SQL file attached). |
Modified by: @luronumenAttachment: DDL_PROCEDURE.SQL [ 13557 ] |
Commented by: @AlexPeshkoff One question - what harm in extra commits? |
Commented by: @luronumen Hi Alexander There is no harm in having an extra COMMIT, but there is also no reason for an extra COMMIT. Best Regards, |
Commented by: @asfernandes I didn't looked in details, but that extra commit may be due to things your script does not use (for example, computed expressions). So it may not be a matter of just remove it, but conditionally put it only when necessary. |
Commented by: @luronumen Hi Adriano, Thank you very much for your quick response! The best way to find out where this extra commit comes from is to inspect the ISQL.exe code. As you can see in the issue description it is a very simple issue to be reproducible: I believe that this issue comes with the code for creating the procedures/functions metadata because when extracting the metadata from a database without structure, this issue is not reproducible. Best Regards, |
Submitted by: @luronumen
Attachments:
DDL.SQL
DDL_PROCEDURE.SQL
ACTUAL RESULT
- ISQL is adding an unnecessary COMMIT WORK statement to the extracted metadata script before starting the Stored functions headers/bodies statements (lines 4 and 15 from DDL.SQL attached)
EXPECTEDT RESULT
- ISQL do not need to add an COMMIT WORK statement to the extracted metadata script before starting the Stored functions headers/bodies statements (lines 4 and 15 from DDL.SQL attached)
STEPS TO REPRODUCE THIS ISSUE:
1- Create a new database and than just create a simple function:
SET TERM ^ ;
CREATE OR ALTER FUNCTION M_BINTODEC (BIN_NUMBER VARCHAR(63) CHARACTER SET WIN1252)
RETURNS BIGINT
AS
BEGIN END^
SET TERM ; ^
2- Extract the Metadata script using the ISQL.exe and check all the instructions (see lines 4 and 15 from DDL.SQL attached)
The text was updated successfully, but these errors were encountered: