ed835c39d8f62f008cdf3a02c258f10d861fcfb2 angie Mon Nov 16 15:34:17 2015 -0800 Use hTableExists (cached) instead of sqlTableExists. diff --git src/hg/lib/joiner.c src/hg/lib/joiner.c index ae0c9e7..7ff4883 100644 --- src/hg/lib/joiner.c +++ src/hg/lib/joiner.c @@ -1074,35 +1074,35 @@ } static boolean tableExists(char *database, char *table, char *splitPrefix) /* Return TRUE if database and table exist. If splitPrefix is given, * check for existence with and without it. */ { struct sqlConnection *conn = hAllocConnMaybe(database); if (conn == NULL) return FALSE; char t2[1024]; if (isNotEmpty(splitPrefix)) safef(t2, sizeof(t2), "%s%s", splitPrefix, table); else safef(t2, sizeof(t2), "%s", table); boolean hasSqlWildcard = (strchr(t2, '%') || strchr(t2, '_')); -boolean exists = hasSqlWildcard ? sqlTableWildExists(conn, t2) : sqlTableExists(conn, t2); +boolean exists = hasSqlWildcard ? sqlTableWildExists(conn, t2) : hTableExists(database, t2); if (!exists && isNotEmpty(splitPrefix)) { hasSqlWildcard = (strchr(table, '%') || strchr(table, '_')); - exists = hasSqlWildcard ? sqlTableWildExists(conn, table) : sqlTableExists(conn, table); + exists = hasSqlWildcard ? sqlTableWildExists(conn, table) : hTableExists(database, table); } hFreeConn(&conn); return exists; } static void addChildren(struct joinerSet *js, struct slRef **pList) /* Recursively add children to list. */ { struct slRef *childRef; for (childRef = js->children; childRef != NULL; childRef = childRef->next) { struct joinerSet *child = childRef->val; refAdd(pList, child); addChildren(child, pList); }