Skip to content
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
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

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;

Copy link
Contributor

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;를 추가할 것을 제안드립니다.

Copy link
Contributor Author

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;를 추가 하지 않습니다.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기본적으로 생성되지는 않습니다만, 혹여 bug로 생성이 될 경우.
다른 tc에 영향을 주게 됩니다.
이런 일이 발생할 경우, 문제의 원인이 되는 tc를 찾기가 매우 어렵습니다.

그래서 위와 같은 제안을 드렸습니다.

Copy link
Contributor

@swi0110 swi0110 Dec 26, 2024

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이 발생한 적도 있었습니다.

--+ server-message off