91cecec4e65aa52dfa528d17a1fba9e1b7672381 lrnassar Tue Jun 4 13:41:15 2019 -0700 Updating scripts to point to new beta machine #23616 diff --git src/utils/qa/updateTimesDb.sh src/utils/qa/updateTimesDb.sh index 202a972..2f3e8aa 100755 --- src/utils/qa/updateTimesDb.sh +++ src/utils/qa/updateTimesDb.sh @@ -1,20 +1,20 @@ #!/bin/bash # quit if something within the script fails set -beEu -o pipefail - +source `which qaConfig.bash` umask 002 ############################ # # 02-17-16 -- Matt Speir # # This script will output a the update # times for all of the tables in a single # database on dev and beta. One can also # specify a different database on beta # so that table update times can be # compared between different databases on # different machines. # # This script is intended to replace @@ -107,52 +107,52 @@ exit 1 fi shift "$((OPTIND-1))" # Shift off the options and optional --. ##### Main Program ##### # Take tables for each DB from dev and beta and store as seperate arrays if [[ $outputFiles == true ]] then # If "-f" is used output list of tables on Dev and Beta to a file. # These files of table names are used by other programs, # including proteins.csh. tablesDev=($(hgsql -Ne "SHOW TABLES" $dbDev | sort | \ tee $dbDev.tables )) - tablesBeta=($(hgsql -h mysqlbeta -Ne "SHOW TABLES" $dbBeta | sort | \ + tablesBeta=($(hgsql -h $sqlbeta -Ne "SHOW TABLES" $dbBeta | sort | \ tee $dbBeta.beta.tables )) else tablesDev=($(hgsql -Ne "SHOW TABLES" $dbDev | sort)) - tablesBeta=($(hgsql -h mysqlbeta -Ne "SHOW TABLES" $dbBeta | sort)) + tablesBeta=($(hgsql -h $sqlbeta -Ne "SHOW TABLES" $dbBeta | sort)) fi # Combine tables from Dev and Beta, then sort and make list unique tablesSortedUnique=$(echo "$(echo ${tablesDev[@]} ${tablesBeta[@]})" | \ tr ' ' '\n' | sort -u | grep -v 'hgFindSpec\|trackDb' | tr '\n' ' ') output=". DEV BETA\ntableName $dbDev $dbBeta\n" # if there's errors, the *** is causing wildcard expansion, so disable globbing set -f for tbl in $(echo ${tablesSortedUnique[@]}) do # Underscores added between date and time to that way "column" command later on works correctly devUpdate=$(hgsql -Ne "SELECT UPDATE_TIME FROM information_schema.tables WHERE TABLE_SCHEMA='$dbDev' AND TABLE_NAME='$tbl'" \ | sed 's/ /_/g') - betaUpdate=$(hgsql -h mysqlbeta -Ne "SELECT UPDATE_TIME FROM information_schema.tables WHERE TABLE_SCHEMA='$dbBeta' AND TABLE_NAME='$tbl'" \ + betaUpdate=$(hgsql -h $sqlbeta -Ne "SELECT UPDATE_TIME FROM information_schema.tables WHERE TABLE_SCHEMA='$dbBeta' AND TABLE_NAME='$tbl'" \ | sed 's/ /_/g') # Can't have have completely empty entries or "column" won't work if [[ $devUpdate == "" ]] then devUpdate="." elif [[ $betaUpdate == "" ]] then betaUpdate="." fi # Variable to hold error/diff marking error="" # Check to see if table times match on Dev and Beta