9c6acf13bfc8763ce66e8b6a85f09a8edeae4733 braney Tue Apr 16 13:17:51 2013 -0700 fix some problems with assembly data hubs that Hiram found. refs #8072 diff --git src/hg/hgTracks/bigBedTrack.c src/hg/hgTracks/bigBedTrack.c index 6b52a93..aedccdf 100644 --- src/hg/hgTracks/bigBedTrack.c +++ src/hg/hgTracks/bigBedTrack.c @@ -6,48 +6,51 @@ #include "hash.h" #include "linefile.h" #include "jksql.h" #include "hdb.h" #include "bedCart.h" #include "hgTracks.h" #include "hmmstats.h" #include "localmem.h" #include "wigCommon.h" #include "bbiFile.h" #include "obscure.h" #include "bigWig.h" #include "bigBed.h" #include "bigWarn.h" #include "errCatch.h" +#include "trackHub.h" struct bbiFile *fetchBbiForTrack(struct track *track) /* Fetch bbiFile from track, opening it if it is not already open. */ { struct bbiFile *bbi = track->bbiFile; if (bbi == NULL) { char *fileName = NULL; if (track->parallelLoading) // do not use mysql during parallel fetch { fileName = cloneString(trackDbSetting(track->tdb, "bigDataUrl")); } else { - struct sqlConnection *conn = hAllocConnTrack(database, track->tdb); + struct sqlConnection *conn = NULL; + if (!trackHubDatabase(database)) + conn = hAllocConnTrack(database, track->tdb); fileName = bbiNameFromSettingOrTable(track->tdb, conn, track->table); hFreeConn(&conn); } bbi = track->bbiFile = bigBedFileOpen(fileName); } return bbi; } struct bigBedInterval *bigBedSelectRange(struct track *track, char *chrom, int start, int end, struct lm *lm) /* Return list of intervals in range. */ { struct bigBedInterval *result = NULL; /* protect against temporary network error */ struct errCatch *errCatch = errCatchNew();