f3a1cdac3f547b8d41c3208a43befa36d762c1ce
angie
  Thu Sep 28 12:49:00 2017 -0700
Oops, wasn't caching autoSql objects with the correct key so they weren't found, just looked up over and over.

diff --git src/hg/lib/annoStreamDb.c src/hg/lib/annoStreamDb.c
index 5dc7ffe..15b91dd 100644
--- src/hg/lib/annoStreamDb.c
+++ src/hg/lib/annoStreamDb.c
@@ -930,31 +930,31 @@
 }
 
 static struct asObject *asObjForDtf(struct hash *hash, struct joinerDtf *dtf)
 /* Get asObj for dtf, either from hash if we've seen it before, or make one. */
 {
 struct asObject *asObj = NULL;
 char dbTable[PATH_LEN];
 joinerDtfToSqlTableString(dtf, NULL, dbTable, sizeof(dbTable));
 struct hashEl *hel = hashLookup(hash, dbTable);
 if (hel == NULL)
     {
     asObj = hAnnoGetAutoSqlForDbTable(dtf->database, dtf->table, NULL, TRUE);
     if (asObj == NULL)
         errAbort("annoStreamDb: No autoSql for %s.%s.%s",
                  dtf->database, dtf->table, dtf->field);
-    hel = hashAdd(hash, dtf->table, asObj);
+    hel = hashAdd(hash, dbTable, asObj);
     }
 else
     asObj = hel->val;
 return asObj;
 }
 
 static void makeDottedTriple(char *dtfString, size_t dtfStringSize,
                              char *db, char *table, char *field)
 /* In case we don't have a struct joinerDtf for a field that we want to look up,
  * but we do have the db, table and field name, concat with dots into dtfString.
  * Unlike joinerDtfToSqlFieldString, don't bother checking whether db is the main db. */
 {
 safef(dtfString, dtfStringSize, "%s.%s.%s", db, table, field);
 }