[CBRD-26256] Add SQL test cases for FK replication restriction in ha_repl#2492
[CBRD-26256] Add SQL test cases for FK replication restriction in ha_repl#2492zionyun wants to merge 6 commits intoCUBRID:feature/add-replication-optionfrom
Conversation
|
빠져있는 것 같은 시나리오 입니다. 맞다면 추가요청 드립니다. --evaluate '5. ALTER REPLICATION then ADD FK - REPLICATION OFF → ON'; create table alter_a6_tbl ( create table alter_b6_tbl ( alter table alter_b6_tbl replication on; -- Expected: ERROR in HA mode drop table if exists alter_b6_tbl; --evaluate '6. DROP FK then re-add - REPLICATION OFF parent, ON child'; drop table if exists alter_b7_tbl; create table alter_a7_tbl ( create table alter_b7_tbl ( -- drop -- Expected: ERROR in HA mode drop table if exists alter_b7_tbl; |
|
@bagus-kim 추가 요청주신 시나리오는 CBRD-26274, CBRD-26273 에 포함되어있는 시나리오여서 해당 이슈에서 작성하도록 하겠습니다. |
refer to http://jira.cubrid.org/browse/CBRD-26256
각 diff 파일은 ha_repl 테스트에서 master/slave 간 데이터 값 차이로 인해 생성된 파일입니다.
REPLICATION OFF로 설정된 테이블은 master에는 데이터가 있지만, slave에는 데이터가 없습니다. 이로 인해 차이가 발생하므로, diff 파일이 생성되는 것은 정상적인 동작입니다.
특히 Referenced table (REPLICATION OFF) <- FK table (REPLICATION OFF) 구조에서는 HA 모드에서 create table이 실패해야 하지만, 본 SQL 테스트는 ha_mode=no 상태(싱글 모드)에서 실행되므로 모든 테이블이 정상적으로 생성 및 수행됩니다.
(HA_repl 테스트에서는 해당 FK table이 생성되지 않으나, diff file에 error message가 발생하지는 않습니다. 이 부분은 ha shell 로 검증 추가하겠습니다 : https://github.com/CUBRID/cubrid-testcases-private/pull/1578)
HA_repl 테스트에서는 기존 sql문에 있는 select 문들에 대해서는 수행되지 않으며, 각 DML문 직후에 select로 master,slave 의 데이터를 각각 비교하는 형태로 테스트가 진행됩니다.
예시)