Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv committed Mar 10, 2021
1 parent 03399d7 commit c500ab5
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE `rowid_uk_inc` (
`id` bigint UNIQUE KEY AUTO_INCREMENT,
s varchar(16),
v varchar(16)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
2 changes: 1 addition & 1 deletion tests/lightning_incremental/data/incr.rowid_uk_inc.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!40103 SET TIME_ZONE='+00:00' */;
INSERT INTO `rowid_uk_inc` (`id`) VALUES
INSERT INTO `rowid_uk_inc` (`v`) VALUES
('a'),
('b'),
('c');
4 changes: 2 additions & 2 deletions tests/lightning_incremental/data/incr.uk_auto_inc-schema.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE `uk_auto_inc` (
`u` int PRIMARY KEY,
`id` bigint UNIQUE KEY AUTO_INCREMENT,
`pk` int PRIMARY KEY,
`id` bigint UNIQUE KEY AUTO_INCREMENT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
2 changes: 1 addition & 1 deletion tests/lightning_incremental/data/incr.uk_auto_inc.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!40103 SET TIME_ZONE='+00:00' */;
INSERT INTO `uk_auto_inc` (`u`) VALUES
INSERT INTO `uk_auto_inc` (`pk`) VALUES
(1),
(2),
(3);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE `uk_auto_inc` (
`id` bigint UNIQUE KEY AUTO_INCREMENT,
s varchar(16),
v varchar(16)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
2 changes: 1 addition & 1 deletion tests/lightning_incremental/data1/incr.rowid_uk_inc.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!40103 SET TIME_ZONE='+00:00' */;
INSERT INTO `rowid_uk_inc` (`s`) VALUES
INSERT INTO `rowid_uk_inc` (`v`) VALUES
("d"),
("e"),
("f");
4 changes: 2 additions & 2 deletions tests/lightning_incremental/data1/incr.uk_auto_inc-schema.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE `uk_auto_inc` (
`u` int PRIMARY KEY,
`id` bigint UNIQUE KEY AUTO_INCREMENT,
`pk` int PRIMARY KEY,
`id` bigint UNIQUE KEY AUTO_INCREMENT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
2 changes: 1 addition & 1 deletion tests/lightning_incremental/data1/incr.uk_auto_inc.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!40103 SET TIME_ZONE='+00:00' */;
INSERT INTO `pk_auto_inc` (`id`) VALUES
INSERT INTO `uk_auto_inc` (`pk`) VALUES
(4),
(5),
(6);
2 changes: 1 addition & 1 deletion tests/lightning_incremental/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ for backend in importer local; do
check_contains "group_concat(v): a,b,c,d,e,f"
done

run_sql "SELECT sum(u) from incr.uk_auto_inc;"
run_sql "SELECT sum(pk) from incr.uk_auto_inc;"
check_contains "sum(u): 21"
done
9 changes: 2 additions & 7 deletions tests/lightning_tidb_rowid/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,8 @@ for BACKEND in local importer tidb; do

run_sql 'SELECT count(*), min(_tidb_rowid), max(_tidb_rowid) FROM rowid.pre_rebase'
check_contains 'count(*): 1'
if [ "$BACKEND" == 'tidb' ]; then
check_contains 'min(_tidb_rowid): 70000'
check_contains 'max(_tidb_rowid): 70000'
else
check_contains 'min(_tidb_rowid): 1'
check_contains 'max(_tidb_rowid): 1'
fi
check_contains 'min(_tidb_rowid): 70000'
check_contains 'max(_tidb_rowid): 70000'
run_sql 'INSERT INTO rowid.pre_rebase VALUES ("?")'
run_sql 'SELECT _tidb_rowid > 70000 FROM rowid.pre_rebase WHERE pk = "?"'
check_contains '_tidb_rowid > 70000: 1'
Expand Down

0 comments on commit c500ab5

Please sign in to comment.