ed552b421c008dad0b93b880923362902bf1e3d1
max
  Wed Apr 2 08:46:02 2014 -0700
Fixing hgVai again for gbib, refs #11957 and refs #12717. One problemwas that show tables cannot fail over. Probably need to libify
one day as a sqlShowTables() function. Another problem are the nib
directories in hg18. Working towards replacing all nib directories with their
twoBit versions via a hg.conf statement.

diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c
index 37094f0..3d7f8d8 100644
--- src/hg/lib/jksql.c
+++ src/hg/lib/jksql.c
@@ -1093,30 +1093,37 @@
 sqlVaWarn(sc, format, args);
 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.
+ * (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;
 }