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-25719] Modify the TC answer sheet due to the fix for [user_schema] storage errors in the db_trigger catalog during trigger creation and loaddb execution. #2019

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

jongmin-won
Copy link
Contributor

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

Trigger 생성 및 loaddb 실행 시 db_trigger 카탈로그의 [user_schema] 저장 오류 관련 TC 답안지 수정

  • db_trigger 카탈로그의 condition 및 action_definition 컬럼에 [user_schema]가 잘못 저장되거나 누락되는 문제를 수정하였습니다.
  • 수정된 결과, db_trigger 카탈로그의 condition 및 action_definition 컬럼에 Query Rewrite 구문이 저장되도록 변경하였으며, INSERT와 Inline View 구문에서 컬럼 리스트가 출력 됩니다.

SQL 구문

CREATE TABLE t1(col1 INTEGER, col2 VARCHAR, col3 DATETIME);
CREATE TABLE t2(col1 INTEGER, col2 VARCHAR, col3 DATETIME);

CREATE TRIGGER example_trigger1
  STATUS ACTIVE
  PRIORITY 0.000000
  AFTER INSERT ON [t1]
  EXECUTE insert into [t2] values(1, 'a', sysdatetime);

CREATE TRIGGER example_trigger2
  STATUS ACTIVE
  PRIORITY 0.000000
  AFTER INSERT ON [t1]
  EXECUTE insert into [t2] select a.col1, 'a', sysdatetime from (select col1 from t2);

AS-IS

select unique_name, owner.name, name, condition, action_definition from db_trigger;

<00001> unique_name      : 'dba.example_trigger1'
        owner.name       : 'DBA'
        name             : 'example_trigger1'
        condition        : NULL
        action_definition: 'insert into [dba.t2] values (1, 'a',  SYS_DATETIME )'
<00002> unique_name      : 'dba.example_trigger2'
        owner.name       : 'DBA'
        name             : 'example_trigger2'
        condition        : NULL
        action_definition: 'insert into [dba.update_logs] select (select nvl(sum([vote]), 0) from [dba.tbl2] where [tbl2].[id] like  substr([tbl1].[id], 1, 3)||'%'), 'a',  SYS_DATETIME  from [dba.tbl1]'

TO-BE

select unique_name, owner.name, name, condition, action_definition from db_trigger;

<00001> unique_name      : 'dba.example_trigger1'
        owner.name       : 'DBA'
        name             : 'example_trigger1'
        condition        : NULL
        action_definition: 'insert into [dba.t2] ([col1], [col2], [col3]) values (1, 'a',  SYS_DATETIME )'
<00002> unique_name      : 'dba.example_trigger2'
        owner.name       : 'DBA'
        name             : 'example_trigger2'
        condition        : NULL
        action_definition: 'insert into [dba.t2] ([col1], [col2], [col3]) select [a].[col1], 'a',  SYS_DATETIME  from (select [dba.t2].[col1] from [dba.t2] [dba.t2]) [a] ([col1])'

…rrors in the db_trigger catalog during trigger creation and loaddb execution.
@jongmin-won jongmin-won self-assigned this Jan 3, 2025
@jongmin-won
Copy link
Contributor Author

이번 TC 수정 PR은 Internal Release 이후에 머지하도록 하겠습니다.

Internal Release 이후에 머지하는 이유:
PR (CUBRID/cubrid#5729) 이 머지된 이후, cubrid-testcases-private-ex에 미칠 영향을 예측하기 어려워, Internal Release 이후에 머지하기로 결정 됐습니다.

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.

1 participant