Skip to content

Commit

Permalink
tests(ticdc): add TRUNCATE case for lossy ddl
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 committed May 29, 2023
1 parent a1c4851 commit 0cf0e1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions tests/integration_tests/lossy_ddl/data/prepare.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/lossy_ddl/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0cf0e1b

Please sign in to comment.