-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix_multi_rows
- Loading branch information
Showing
13 changed files
with
91 additions
and
13 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
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
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,17 @@ | ||
data-dir = '/tmp/tidb_binlog_test/data.drainer' | ||
|
||
[syncer] | ||
txn-batch = 1 | ||
worker-count = 1 | ||
safe-mode = false | ||
db-type = 'mysql' | ||
replicate-do-db = ['partition_test'] | ||
|
||
[syncer.to] | ||
host = '127.0.0.1' | ||
user = 'root' | ||
password = '' | ||
port = 3306 | ||
|
||
[syncer.to.checkpoint] | ||
schema = "partition_test_checkpoint" |
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,38 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")" | ||
|
||
run_drainer & | ||
|
||
sleep 3 | ||
|
||
run_sql 'create database partition_test;' | ||
# range partition | ||
run_sql 'create table partition_test.t1( a int ,b varchar(128) ) partition by range (a) (partition p0 values less than (3),partition p1 values less than (7));' | ||
run_sql "insert into partition_test.t1 (a,b) values(1,'a'),(2,'b'),(3,'c'),(4,'d');" | ||
run_sql "alter table partition_test.t1 add partition (partition p2 values less than (10));" | ||
run_sql "insert into partition_test.t1 (a,b) values(5,'e'),(6,'f'),(7,'g'),(8,'h');" | ||
|
||
# hash partition | ||
run_sql 'create table partition_test.t2(a int ,b varchar(128) ) partition by hash (a) partitions 2;' | ||
run_sql "insert into partition_test.t2 (a,b) values(1,'a'),(2,'b'),(3,'c'),(4,'d');" | ||
run_sql 'truncate table partition_test.t2;' | ||
run_sql "insert into partition_test.t2 (a,b) values(5,'e'),(6,'f'),(7,'g'),(8,'h');" | ||
|
||
sleep 3 | ||
|
||
down_run_sql 'SELECT a, b FROM partition_test.t1 partition(p2) order by a' | ||
check_contains 'a: 7' | ||
check_contains 'b: g' | ||
check_contains 'a: 8' | ||
check_contains 'b: h' | ||
|
||
down_run_sql 'select a, b from partition_test.t2 order by a limit 1' | ||
check_contains 'a: 5' | ||
check_contains 'b: e' | ||
|
||
run_sql 'DROP database partition_test' | ||
|
||
killall drainer |
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 |
---|---|---|
|
@@ -10,5 +10,5 @@ batch = 10 | |
host = "127.0.0.1" | ||
user = "root" | ||
password = "" | ||
name = "reparo_test" | ||
name = "reparo-test" | ||
port = 4000 |
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