c73b604073cf90818fdfafd1c711b9b508835e52 angie Thu Jun 19 12:42:01 2014 -0700 hdb's hGetParent wasn't working because it used hMaybeTrackInfo whichlooks up only one track, not its parent or children. It was used in only one place in the code, so I replaced it with a call to tdbForTrack. fixes #13477 (Search results don't open super tracks) diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c index b5e1e48..32ebc1d 100644 --- src/hg/lib/hdb.c +++ src/hg/lib/hdb.c @@ -4188,52 +4188,30 @@ if (tdb != NULL) { ret = tdb->canPack; trackDbFree(&tdb); } hFreeConn(&conn); return ret; } char *hTrackOpenVis(char *db, char *trackName) /* Return "pack" if track is packable, otherwise "full". */ { return hTrackCanPack(db, trackName) ? "pack" : "full"; } -char *hGetParent(char *db, char *subtrackName) -/* Given a subtrack table, find its parent */ -{ -// TODO--- hub tracks can have parents. This is only called from -// item search, but it should work there too. We should be able -// to grab these out of the settings hash, but then why doesn't -// this happen for mySQL tracks? It would be a lot faster methinks -if (isHubTrack(subtrackName)) - return NULL; - -struct sqlConnection *conn = hAllocConn(db); -struct trackDb *tdb = hMaybeTrackInfo(conn, subtrackName); -char *ret = NULL; -if (tdb != NULL) - { - ret = firstWordInLine( trackDbLocalSetting(tdb, "parent")); - trackDbFree(&tdb); - } -hFreeConn(&conn); -return ret; -} - static struct hash *makeTrackSettingsHash(char *db) /* Create a hash of hashes with all track settings for database. * The returned hash is keyed by track. The contained hashes * are keyed by tags and contain generic text values, corresponding * to the trackDb.ra settings for that track. Generally you want to * call the version that caches results below instead. */ { struct hash *hash = hashNew(0); struct slName *trackTable, *trackTableList = hTrackDbList(); struct sqlConnection *conn =NULL; if (!trackHubDatabase(db)) conn = hAllocConn(db); for (trackTable = trackTableList; trackTable != NULL; trackTable = trackTable->next) { if (hTableExists(db, trackTable->name))