b4de30fb01a1168eadfcc65206714f1573eef8c9 max Tue Mar 10 06:31:07 2015 -0700 a mirror that has the failover connection (=hgdownload) enabled currently just crashes in hgTables. Adding an additional check to catch this condition and suppress printing the example values, just like what we do for custom tracks. refs #14945 diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h index f6632c2..1d5aa67 100644 --- src/hg/inc/jksql.h +++ src/hg/inc/jksql.h @@ -472,30 +472,34 @@ char** sqlGetEnumDef(struct sqlConnection *conn, char* table, char* colName); /* Get the definitions of a enum column in a table, returning a * null-terminated array of enum values. Free array when finished. */ struct slName *sqlRandomSample(char *db, char *table, char *field, int count); /* Get random sample from database. */ struct slName *sqlRandomSampleConn(struct sqlConnection *conn, char *table, char *field, int count); /* Get random sample from conn. */ struct slName *sqlRandomSampleWithSeed(char *db, char *table, char *field, int count, int seed); /* Get random sample from database specifiying rand number seed, or -1 for none */ +bool sqlCanCreateTemp(struct sqlConnection *conn); +/* Return True if it looks like we can write into temp tables in the current database + * Can be used to check if sqlRandomSampleWithSeed-functions are safe to call. + * */ struct sqlFieldInfo /* information about fields of a table; free with sqlFieldInfoFreeList */ { struct sqlFieldInfo *next; char *field; /* name of field */ char *type; /* type of field */ boolean allowsNull; /* can the field be NULL? */ char *key; /* key information */ char *defaultVal; /* default value */ char *extra; /* extra info */ }; struct sqlFieldInfo *sqlFieldInfoGet(struct sqlConnection *conn, char *table); /* get a list of objects describing the fields of a table */