93646c094df1b6f965a4f2046404cdfb40b5bf51 max Fri Oct 16 06:48:19 2015 -0700 fix after code review, refs #16195 diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c index ab4a11e..50b9e24 100644 --- src/hg/hgTables/hgTables.c +++ src/hg/hgTables/hgTables.c @@ -929,31 +929,31 @@ && sameString(jp->b->table, table) ) { idField = cloneString(jp->b->field); break; } } } joinerPairFreeList(&jpList); } } /* If we haven't found the answer but this looks like a non-positional table, * use the first field. */ if (idField == NULL && !isCustomTrack(table) && (hti == NULL || !hti->isPos)) { char *dotPos = strstr(table, "."); - if (dotPos != NULL) + if (isHubTrack(table) && dotPos != NULL) // if the database is part of the table name in mysql notation // (= databaseName.tableName), split the table string and override db. // The jksql table name/field cache cannot handle it otherwise { *dotPos = 0; db = table; table = dotPos+1; } struct sqlConnection *conn = track ? hAllocConnTrack(db, track) : hAllocConn(db); struct slName *fieldList = sqlListFields(conn, table); if (fieldList == NULL) errAbort("getIdField: Can't find fields of table %s", table); idField = cloneString(fieldList->name); slFreeList(&fieldList); hFreeConn(&conn);