forked from pingcap/tidb-binlog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is an automated cherry-pick of pingcap#1186
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
- Loading branch information
1 parent
795af76
commit 6a4809c
Showing
3 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")" | ||
|
||
run_drainer --compressor gzip & | ||
|
||
sleep 3 | ||
|
||
run_sql 'CREATE DATABASE cache_test;' | ||
run_sql 'CREATE TABLE cache_test.t1( a int, b varchar(128));' | ||
run_sql "INSERT INTO cache_test.t1 (a,b) VALUES(1,'a'),(2,'b'),(3,'c'),(4,'d');" | ||
run_sql "ALTER TABLE cache_test.t1 CACHE;" | ||
run_sql "INSERT INTO cache_test.t1 (a,b) VALUES(5,'e'),(6,'f'),(7,'g'),(8,'h');" | ||
run_sql "ALTER TABLE cache_test.t1 NOCACHE" | ||
|
||
sleep 3 | ||
|
||
down_run_sql 'SELECT a, b FROM cache_test.t1 order by a' | ||
check_contains 'a: 7' | ||
check_contains 'b: g' | ||
check_contains 'a: 8' | ||
check_contains 'b: h' | ||
|
||
run_sql 'DROP DATABASE cache_test' | ||
|
||
killall drainer |