src/hg/lib/hgFind.c 1.217

1.217 2009/02/20 23:49:03 angie
When testing xrefTable existence, use sqlTableExists instead of hTableOrSplitExists in order to support an xrefTable in some other db. hTableOrSplitExists actually uses a cached 'show tables' from the current db.
Index: src/hg/lib/hgFind.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hgFind.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -b -B -U 4 -r1.216 -r1.217
--- src/hg/lib/hgFind.c	20 Feb 2009 23:05:52 -0000	1.216
+++ src/hg/lib/hgFind.c	20 Feb 2009 23:49:03 -0000	1.217
@@ -2830,9 +2830,12 @@
     return(found);
 
 if (isNotEmpty(hfs->xrefTable))
     {
-    if (! hTableOrSplitExists(db, hfs->xrefTable))
+    struct sqlConnection *conn = hAllocConn(db);
+    boolean exists = sqlTableExists(conn, hfs->xrefTable);
+    hFreeConn(&conn);
+    if (! exists)
 	return(FALSE);
     xrefList = getXrefTerms(db, hfs, term);
     }
 else