Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-5.2' of ssh://github.com/pingcap/dumpling into …
Browse files Browse the repository at this point in the history
…tidb-version
  • Loading branch information
glorv committed Nov 5, 2021
2 parents 518a227 + 0426f9e commit 0e457cb
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 127 deletions.
4 changes: 4 additions & 0 deletions tests/_utils/check_sync_diff
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ conf=$1
check_time=${2-10}

LOG=$DUMPLING_OUTPUT_DIR/sync_diff_inspector.log
OUTPUT_DIR=/tmp/dumpling_test_result/output

mkdir -p OUTPUT_DIR=/tmp/dumpling_test_result

i=0
while [ $i -lt $check_time ]
do
rm -rf $OUTPUT_DIR
bin/sync_diff_inspector --config=$conf >> $LOG 2>&1
ret=$?
if [ "$ret" == 0 ]; then
Expand Down
31 changes: 10 additions & 21 deletions tests/all_generate_column/conf/diff_config.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
# diff Configuration.

log-level = "info"

chunk-size = 1000

check-thread-count = 4

sample-percent = 100
export-fix-sql = true

use-checksum = true
check-struct-only = false

fix-sql-file = "fix.sql"
[task]
output-dir = "/tmp/dumpling_test_result/output"

# tables need to check.
[[check-tables]]
schema = "all_generate_column"
tables = ["~t.*"]
source-instances = ["mysql1"]

[[table-config]]
schema = "all_generate_column"
table = "t"
target-instance = "tidb0"

[[table-config.source-tables]]
instance-id = "source-1"
schema = "all_generate_column"
table = "t"
target-check-tables = ["all_generate_column.t"]

[[source-db]]
[data-sources]
[data-sources.mysql1]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
instance-id = "source-1"

[target-db]
[data-sources.tidb0]
host = "127.0.0.1"
port = 4000
user = "root"
Expand Down
31 changes: 10 additions & 21 deletions tests/e2e/conf/diff_config.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
# diff Configuration.

log-level = "info"

chunk-size = 1000

check-thread-count = 4

sample-percent = 100
export-fix-sql = true

use-checksum = true
check-struct-only = false

fix-sql-file = "fix.sql"
[task]
output-dir = "/tmp/dumpling_test_result/output"

# tables need to check.
[[check-tables]]
schema = "e2e"
tables = ["~t.*"]
source-instances = ["mysql1"]

[[table-config]]
schema = "e2e"
table = "t"
target-instance = "tidb0"

[[table-config.source-tables]]
instance-id = "source-1"
schema = "e2e"
table = "t"
target-check-tables = ["e2e.t"]

[[source-db]]
[data-sources]
[data-sources.mysql1]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
instance-id = "source-1"

[target-db]
[data-sources.tidb0]
host = "127.0.0.1"
port = 4000
user = "root"
Expand Down
40 changes: 10 additions & 30 deletions tests/e2e_csv/conf/diff_config.toml
Original file line number Diff line number Diff line change
@@ -1,48 +1,28 @@
# diff Configuration.

log-level = "info"

chunk-size = 1000

check-thread-count = 4

sample-percent = 100

use-checksum = true

fix-sql-file = "fix.sql"
export-fix-sql = true

# tables need to check.
[[check-tables]]
schema = "e2e_csv"
tables = ["escape", "t"]
check-struct-only = false

[[table-config]]
schema = "e2e_csv"
table = "t"
[task]
output-dir = "/tmp/dumpling_test_result/output"

[[table-config.source-tables]]
instance-id = "source-1"
schema = "e2e_csv"
table = "t"
source-instances = ["mysql1"]

[[table-config]]
schema = "e2e_csv"
table = "escape"
target-instance = "tidb0"

[[table-config.source-tables]]
instance-id = "source-1"
schema = "e2e_csv"
table = "escape"
target-check-tables = ["e2e_csv.escape", "e2e_csv.t"]

[[source-db]]
[data-sources]
[data-sources.mysql1]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
instance-id = "source-1"

[target-db]
[data-sources.tidb0]
host = "127.0.0.1"
port = 4000
user = "root"
Expand Down
31 changes: 10 additions & 21 deletions tests/ignore_generate_column/conf/diff_config.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
# diff Configuration.

log-level = "info"

chunk-size = 1000

check-thread-count = 4

sample-percent = 100
export-fix-sql = true

use-checksum = true
check-struct-only = false

fix-sql-file = "fix.sql"
[task]
output-dir = "/tmp/dumpling_test_result/output"

# tables need to check.
[[check-tables]]
schema = "ignore_generate"
tables = ["~t.*"]
source-instances = ["mysql1"]

[[table-config]]
schema = "ignore_generate"
table = "t"
target-instance = "tidb0"

[[table-config.source-tables]]
instance-id = "source-1"
schema = "ignore_generate"
table = "t"
target-check-tables = ["ignore_generate.t"]

[[source-db]]
[data-sources]
[data-sources.mysql1]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
instance-id = "source-1"

[target-db]
[data-sources.tidb0]
host = "127.0.0.1"
port = 4000
user = "root"
Expand Down
31 changes: 10 additions & 21 deletions tests/rows/conf/diff_config.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
# diff Configuration.

log-level = "info"

chunk-size = 1000

check-thread-count = 4

sample-percent = 100
export-fix-sql = true

use-checksum = true
check-struct-only = false

fix-sql-file = "fix.sql"
[task]
output-dir = "/tmp/dumpling_test_result/output"

# tables need to check.
[[check-tables]]
schema = "rows"
tables = ["~t.*"]
source-instances = ["mysql1"]

[[table-config]]
schema = "rows"
table = "t"
target-instance = "tidb0"

[[table-config.source-tables]]
instance-id = "source-1"
schema = "rows"
table = "t"
target-check-tables = ["rows.t"]

[[source-db]]
[data-sources]
[data-sources.mysql1]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
instance-id = "source-1"

[target-db]
[data-sources.tidb0]
host = "127.0.0.1"
port = 4000
user = "root"
Expand Down
24 changes: 11 additions & 13 deletions tests/rows_extreme_int/conf/diff_config.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
# diff Configuration.

log-level = "info"
check-thread-count = 4

chunk-size = 1000
export-fix-sql = true

check-thread-count = 4
check-struct-only = false

sample-percent = 100
[task]
output-dir = "/tmp/dumpling_test_result/output"

use-checksum = true
source-instances = ["mysql1"]

fix-sql-file = "fix.sql"
target-instance = "tidb0"

# tables need to check.
[[check-tables]]
schema = "rei"
tables = ["~t.*"]
target-check-tables = ["rei.t*"]

[[source-db]]
[data-sources]
[data-sources.mysql1]
host = "127.0.0.1"
port = 3306
user = "root"
password = ""
instance-id = "source-1"

[target-db]
[data-sources.tidb0]
host = "127.0.0.1"
port = 4000
user = "root"
Expand Down

0 comments on commit 0e457cb

Please sign in to comment.