a2d20a840e07785d0ae88d3d27c45f5d5a28ea70
galt
  Tue Jun 21 17:27:13 2016 -0700
improving hgTablesTest output. Now states more info about the machine it is running on, the URL to the hgTables site that it is testing against, and the database that it is connecting to. It also allows randomizing the track and table lists, and an optional seed is reported any can be set on commandline for debugging.

diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c
index fd2aa5f..b1f0bbc 100644
--- src/hg/lib/jksql.c
+++ src/hg/lib/jksql.c
@@ -1358,52 +1358,58 @@
 va_end(args);
 }
 
 void sqlAbort(struct sqlConnection  *sc, char *format, ...)
 /* Printf formatted error message that adds on sql
  * error message and abort. */
 {
 va_list args;
 va_start(args, format);
 sqlVaWarn(sc, format, args);
 va_end(args);
 noWarnAbort();
 }
 
 struct sqlConnection *sqlFailoverConn(struct sqlConnection *sc)
-/* returns the failover connection of a connection or NULL.
+/* Returns the failover connection of a connection or NULL.
  * (Needed because the sqlConnection is not in the .h file) */
 {
 return sc->failoverConn;
 }
 
 bool sqlConnMustUseFailover(struct sqlConnection *sc)
 /* Returns true if a connection has a failover connection and 
  * the current db does not exist on the main connection.
 */
 {
 // a db that is different between the sqlConnection object and mysql means that we have
 // moved previously to a db that does not exist on the main connection server
 if ((sc->failoverConn != NULL) && differentStringNullOk(sc->db, sc->conn->db))
     {
     monitorPrint(sc, "SQL_MAINCONN_DB_INVALID", "%s != %s", sc->db, sc->conn->db);
     return TRUE;
     }
 
 return FALSE;
 }
 
+char *sqlHostInfo(struct sqlConnection *sc)
+/* Returns the mysql host info for the connection, must be connected. */
+{
+return (char *) mysql_get_host_info(sc->conn);
+}
+
 static struct sqlResult *sqlUseOrStore(struct sqlConnection *sc,
 	char *query, ResGetter *getter, boolean abort)
 /* Returns NULL if result was empty and getter==mysql_use_result.
  * Otherwise returns a structure that you can do sqlRow() on.
  * Watch out for subtle differences between mysql_store_result and mysql_use_result.
  * We seem to be only using mysql_use_result these days,
  * but mysql_store_result has left a big footprint in the code/comments.
  * In particular, mysql_store_result can return NULL indicating an empty resultset.
  * But mysql_use_result cannot do that. Instead NULL return means error
  * and the user must call next_row to see if there's anything in the resultset.
  */
 {
 struct sqlResult *res = NULL;
 struct sqlConnection *scMain = sc;
 long deltaTime;