From 0cf0e1b80f1714626e65c3e5e9d741725ebd229c Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Mon, 29 May 2023 15:51:46 +0800 Subject: [PATCH] tests(ticdc): add TRUNCATE case for lossy ddl Signed-off-by: hi-rustin --- tests/integration_tests/lossy_ddl/data/prepare.sql | 6 ++++++ tests/integration_tests/lossy_ddl/run.sh | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration_tests/lossy_ddl/data/prepare.sql b/tests/integration_tests/lossy_ddl/data/prepare.sql index 2d1d98187b2..f16c79d4d8f 100644 --- a/tests/integration_tests/lossy_ddl/data/prepare.sql +++ b/tests/integration_tests/lossy_ddl/data/prepare.sql @@ -210,6 +210,12 @@ ALTER TABLE example18 REORGANIZE PARTITION `p1990to2010` INTO PARTITION p2020 VALUES LESS THAN (2030), PARTITION pMax VALUES LESS THAN (MAXVALUE)); +CREATE TABLE example19 (a INT NOT NULL PRIMARY KEY); + +INSERT INTO example19 VALUES (1); + +TRUNCATE example19; + CREATE TABLE `finish_mark` ( id INT PRIMARY KEY, diff --git a/tests/integration_tests/lossy_ddl/run.sh b/tests/integration_tests/lossy_ddl/run.sh index df62cb5cb03..97ad9d89416 100644 --- a/tests/integration_tests/lossy_ddl/run.sh +++ b/tests/integration_tests/lossy_ddl/run.sh @@ -23,8 +23,8 @@ function check_lossy_ddl() { row_logs=$(grep "BlackHoleSink: WriteEvents" "$1/cdc.log") echo $row_logs row_logs_count=$(grep "BlackHoleSink: WriteEvents" -c "$1/cdc.log") - if [[ "$row_logs_count" -ne 22 ]]; then - echo "can't found 22 row logs, got $row_logs_count" + if [[ "$row_logs_count" -ne 23 ]]; then + echo "can't found 23 row logs, got $row_logs_count" exit 1 fi }