6a5e7468896f8b879d73040d4a6a9687bcc6227c hiram Tue May 14 15:10:40 2019 -0700 punting on split files return itemCount=0 refs #18869 diff --git src/hg/hubApi/list.c src/hg/hubApi/list.c index bf4b9fb..88b4348 100644 --- src/hg/hubApi/list.c +++ src/hg/hubApi/list.c @@ -375,33 +375,43 @@ char *bigDataUrl = trackDbSetting(tdb, "bigDataUrl"); if (isNotEmpty(bigDataUrl)) itemCount = bbiItemCount(bigDataUrl, tdb->type); else { /* prepare for getting table row count, find table name */ /* the trackDb might have a specific table defined */ char *tableName = trackDbSetting(tdb, "table"); if (isEmpty(tableName)) tableName = trackDbSetting(tdb, "track"); if (isNotEmpty(tableName)) { struct sqlConnection *conn = hAllocConnMaybe(db); if (conn) { + /* punting on split tables, return zero */ + struct hTableInfo *hti = + hFindTableInfoWithConn(conn, NULL, tableName); + if (hti && hti->isSplit) + { + itemCount = 0; + } + else + { char query[2048]; sqlSafef(query, sizeof(query), "select count(*) from %s", tableName); itemCount = sqlQuickNum(conn, query); + } hFreeConn(&conn); } } } return itemCount; } static void recursiveTrackList(struct jsonWrite *jw, struct trackDb *tdb, char *db) /* output trackDb tags only for real tracks, not containers, * recursive when subtracks exist */ { boolean isContainer = tdbIsComposite(tdb) || tdbIsCompositeView(tdb);