8652d7fc5c4bccba9b94581a02c8a2215276b851 braney Thu Feb 21 11:38:47 2013 -0800 don't check for assembly database on close of sql connection (per code review 10237) diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c index e34c788..e64f916 100644 --- src/hg/hgTables/hgTables.c +++ src/hg/hgTables/hgTables.c @@ -736,31 +736,30 @@ { struct sqlConnection *conn = hAllocConn(db); struct hTableInfo *hti = getHti(db, table, conn); hFreeConn(&conn); return hti; } struct hTableInfo *maybeGetHtiOnDb(char *db, char *table) /* Return primary table info, but don't abort if table not there. */ { struct sqlConnection *conn = NULL; if (!trackHubDatabase(database)) conn = hAllocConn(db); struct hTableInfo *hti = maybeGetHti(db, table, conn); -if (!trackHubDatabase(database)) hFreeConn(&conn); return hti; } boolean isPositional(char *db, char *table) /* Return TRUE if it looks to be a positional table. */ { boolean result = FALSE; struct sqlConnection *conn = hAllocConn(db); if (sqlTableExists(conn, "chromInfo")) { char chromName[64]; struct hTableInfo *hti; sqlQuickQuery(conn, "select chrom from chromInfo limit 1", @@ -1452,31 +1451,30 @@ else doTabOutDb(db, db, table, table, f, conn, fields); } struct slName *fullTableFields(char *db, char *table) /* Return list of fields in db.table.field format. */ { char dtBuf[256]; struct sqlConnection *conn=NULL; struct slName *fieldList = NULL, *dtfList = NULL, *field, *dtf; if (isBigBed(database, table, curTrack, ctLookupName)) { if (!trackHubDatabase(database)) conn = hAllocConn(db); fieldList = bigBedGetFields(table, conn); - if (!trackHubDatabase(database)) hFreeConn(&conn); } else if (isBamTable(table)) fieldList = bamGetFields(table); else if (isVcfTable(table)) fieldList = vcfGetFields(table); else if (isCustomTrack(table)) { struct customTrack *ct = ctLookupName(table); char *type = ct->dbTrackType; if (type != NULL) { conn = hAllocConn(CUSTOM_TRASH); if (startsWithWord("maf", type) || startsWithWord("makeItems", type) || sameWord("bedDetail", type) || sameWord("pgSnp", type)) fieldList = sqlListFields(conn, ct->dbTableName);