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-24941] slip: revert the use of '%' as the modular operator #5706

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

hyunikn
Copy link
Contributor

@hyunikn hyunikn commented Dec 11, 2024

http://jira.cubrid.org/browse/CBRD-24941

CUBRID SQL 에서는 % 를 나머지 연산자로 사용할 수 있으나
PL/CSQL 에서는 cursor 속성 ( %found, %notfound, %isopen, %rowcount)과 %type과 %rowtype 이 있기 때문에
%를 나머지 연산자로 사용할 때 파싱 과정에서 문제가 있을 수 있다.

예를 들면, 아래와 같이 변수명이 found 일 때 원래 의도와 달리 커서 속성으로 파싱이 되어 문제를 일으킨다.

csql> create or replace procedure poo as
csql>     found int := 1;
csql>     i int := 5;
csql> begin
csql>     i := i % found;
csql> end;
 
In line 5, column 10,
 
ERROR: In line 5, column 10
Stored procedure compile error: cursor attributes may not be read from I which is neither a cursor nor a cursor reference

… lexer with the presence of cursor attributes and %type and %rowtype.
@hyunikn hyunikn requested a review from beyondykk9 as a code owner December 11, 2024 23:16
@hyunikn hyunikn merged commit 28ba00d into CUBRID:develop Dec 12, 2024
9 of 10 checks passed
@hyunikn hyunikn deleted the cbrd-24941-percent-is-not-mod branch December 12, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants