github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/tests/lightning_routes/run.sh (about) 1 #!/bin/sh 2 3 # Basic check for whether routing rules work 4 5 set -eux 6 7 run_sql 'DROP DATABASE IF EXISTS routes_a0;' 8 run_sql 'DROP DATABASE IF EXISTS routes_a1;' 9 run_sql 'DROP DATABASE IF EXISTS routes_b;' 10 11 run_lightning 12 13 run_sql 'SELECT count(1), sum(x) FROM routes_b.u;' 14 check_contains 'count(1): 4' 15 check_contains 'sum(x): 259' 16 17 run_sql 'SELECT count(1), sum(x) FROM routes_a1.s1;' 18 check_contains 'count(1): 1' 19 check_contains 'sum(x): 1296' 20 21 run_sql 'SHOW TABLES IN routes_a1;' 22 check_not_contains 'Tables_in_routes_a1: t2' 23 24 run_sql 'SHOW DATABASES;' 25 check_not_contains 'Database: routes_a0'