ee1deda2bb4ecf629936cb8ff0db658cf65f5fc5
max
  Thu Mar 27 05:46:17 2014 -0700
small change to jksql for better debug messages, refs #11957
diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c
index dfa8cd1..37094f0 100644
--- src/hg/lib/jksql.c
+++ src/hg/lib/jksql.c
@@ -1160,31 +1160,32 @@
     }
 
 if (sqlConnMustUseFailover(sc))
     sc = sc->failoverConn;
 
 sqlConnectIfUnconnected(sc, abort);
 assert(!sc->isFree);
 
 monitorEnter();
 int mysqlError = mysql_real_query(sc->conn, query, strlen(query));
 
 // if the query fails on the main connection, connect the failover connection and try there
 if (mysqlError != 0 && sc->failoverConn && sameWord(sqlGetDatabase(sc), sqlGetDatabase(sc->failoverConn)))
     {
     if (monitorFlags & JKSQL_TRACE)
-        monitorPrint(sc, "SQL_FAILOVER", "%s -> %s", scConnProfile(sc), scConnProfile(sc->failoverConn));
+        monitorPrint(sc, "SQL_FAILOVER", "%s -> %s | %s", scConnProfile(sc),
+            scConnProfile(sc->failoverConn), query);
 
     sc = sc->failoverConn;
     sqlConnectIfUnconnected(sc, TRUE);
     mysqlError = mysql_real_query(sc->conn, query, strlen(query));
     }
 
 if (mysqlError != 0)
     {
     if (abort)
         {
         monitorLeave();
 	if (sameOk(cfgOption("noSqlInj.dumpStack"), "on"))
     	    dumpStack("DEBUG Can't start query"); // Extra debugging info. DEBUG REMOVE
 	sqlAbort(sc, "Can't start query:\n%s\n", query);
         }