-
Notifications
You must be signed in to change notification settings - Fork 45
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
[CBRD-25266] (bugfix) CSQL core dump when an undefined column name in a Static SQL Insert statement #1987
Merged
+32
−0
Merged
[CBRD-25266] (bugfix) CSQL core dump when an undefined column name in a Static SQL Insert statement #1987
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
sql/_05_plcsql/_01_testspec/_05_bug_fix/answers/21_insert_column_name_undefined.answer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=================================================== | ||
0 | ||
|
||
=================================================== | ||
0 | ||
|
||
=================================================== | ||
Error:-1360 | ||
In line 3, column 1 | ||
Stored procedure compile error: Semantic: before ' values(1, 2)' | ||
Class of [dba.ttt] does not have attribute j. insert into [dba.ttt] (i, ?:0 ) values (1, 2) | ||
|
||
=================================================== | ||
0 | ||
|
17 changes: 17 additions & 0 deletions
17
sql/_05_plcsql/_01_testspec/_05_bug_fix/cases/21_insert_column_name_undefined.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--+ server-message on | ||
-- Verified for CBRD-25266 | ||
-- The column name undefined use in a Static SQL Insert statement. | ||
-- error code : | ||
-- [err] Stored procedure compile error: does not have attribute j | ||
|
||
drop table if exists ttt; | ||
|
||
create table ttt (i int); | ||
create or replace procedure poo as | ||
begin | ||
insert into ttt(i, j) values(1, 2); | ||
end; | ||
|
||
drop table ttt; | ||
|
||
--+ server-message off |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug 등으로 인해 poo가 생성될 경우를 대비해
drop procedure poo;를 추가할 것을 제안드립니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기본적으로 procedure poo 생성되지 않고 에러가 발생함으로 procedure poo가 생성되지 않습니다.
그러므로 drop procedure poo;를 추가 하지 않습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기본적으로 생성되지는 않습니다만, 혹여 bug로 생성이 될 경우.
다른 tc에 영향을 주게 됩니다.
이런 일이 발생할 경우, 문제의 원인이 되는 tc를 찾기가 매우 어렵습니다.
그래서 위와 같은 제안을 드렸습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실제로 다른 tc에서 spec상 생성될 수 없던 객체가, spec 변경으로 인하여 생성이 됐고.
이후 다른 tc가 영향을 받아, 대량의 fail이 발생한 적도 있었습니다.