3c80934048c85112e1a9701d64101a8de013fb74 rhead Wed Dec 5 20:07:26 2012 -0800 Changed check for existence of database to run on genome-mysql instead of using hgsql on the current host. This was failing because the hgcentral table exists on genome-mysql but not on mysqlbeta or hgwdev. diff --git src/utils/qa/checkGenomeMysql src/utils/qa/checkGenomeMysql index e6b749d..dcf0992 100755 --- src/utils/qa/checkGenomeMysql +++ src/utils/qa/checkGenomeMysql @@ -16,31 +16,31 @@ if [ $# -ne 1 ] then echo -e " checks genome-mysql servers for corrupted tables\n Note: Due to the bash configurations in this script, if mysql encounters an error, the script will immediately exit and will not check the rest of the tables in database. usage: $(basename $0) database\n" >&2 exit 1 else db="$1" fi # make sure this is a valid database name -if ! hgsql -Ne "show databases" | grep -qw $db +if ! mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -Ne "show databases" | grep -qw $db then echo -e "\nERROR: database $db not found.\n" >&2 exit 1 fi tableList=$(mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -Ne "show tables" $db) # for each table in list do a select * limit 5. # Want to limit output or else the query would take forever. However, # can't do limit 1 since the first row of every table is stored in # the metadata and thus, mysql will not actually touch the table # if you do a select statement with a limit 1. Thus, we do a limit 5. # Throw away result of select statement and allow MySQL errors to be reported. # Also, genome-mysql is actually two hosts. Check both. for table in $tableList