11#! /usr/bin/env bash
22set -ex
33
4- # Use a linux/arm64 docker image for MySQL when running on ARM
5- CPU_ARCHITECTURE=$( uname -p)
6- if [[ " ${CPU_ARCHITECTURE} " == " arm" ]]; then
7- MYSQL_IMAGE=" arm64v8/mysql:oracle"
8- fi
9-
104main () {
115 cd dev/
126 initialize
@@ -17,27 +11,27 @@ main () {
1711}
1812
1913initialize () {
20- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose up -d postgres mysql
14+ docker-compose up -d postgres mysql
2115
2216 until nc -z -v -w30 localhost 3306 && nc -z -v -w30 localhost 5432; do
2317 echo " Databases not yet ready.."
2418 sleep 5
2519 done
2620
27- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose up -d xdiff prepdb
21+ docker-compose up -d xdiff prepdb
2822}
2923
3024prepare_db () {
3125 . ./prepdb.sh
3226}
3327
3428xdiff () {
35- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1 -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
36- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1 -e OPTIONS=' -c timestamp --bisection-factor 4 -v' xdiff
37- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update001p -e OPTIONS=' -c timestamp --bisection-factor 64 -v -s' xdiff
38- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1p -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
39- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1p -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
40- MYSQL_IMAGE= ${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update50p -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
29+ docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1 -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
30+ docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1 -e OPTIONS=' -c timestamp --bisection-factor 4 -v' xdiff
31+ docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update001p -e OPTIONS=' -c timestamp --bisection-factor 64 -v -s' xdiff
32+ docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1p -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
33+ docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1p -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
34+ docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update50p -e OPTIONS=' -c timestamp --bisection-factor 4 -v -s' xdiff
4135}
4236
4337shutdown () {
0 commit comments