b2b58edce8b1d75567737b05e21ba9103073c69d
chmalee
  Mon May 4 12:11:37 2026 -0700
Fix myVariants tracks to load via a hardcoded query rather than hRangeQuery because the tableName is already qualified with the database. Remove dead code after refactor. Fix table browser output for myVariants tracks for various options, refs #33808

diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c
index 8654e4a8e53..376e3da6709 100644
--- src/hg/hgTables/hgTables.c
+++ src/hg/hgTables/hgTables.c
@@ -656,33 +656,40 @@
 else if (isBigBed(database, table, curTrack, ctLookupName))
     hti = bigBedToHti(table, conn);
 else if (isBigWigTable(table))
     hti = bigWigToHti(table);
 else if (isLongTabixTable(table))
     hti = longTabixToHti(table);
 else if (isBamTable(table))
     hti = bamToHti(table);
 else if (isVcfTable(table, &isTabix))
     {
     boolean isTabix = trackIsType(database, table, curTrack, "vcfTabix", ctLookupName);
     hti = vcfToHti(table, isTabix);
     }
 else if (isHicTable(table))
     hti = hicToHti(table);
-else if (isCustomTrack(table) || startsWith("myVariants_", table))
-    {
-    struct customTrack *ct = ctLookupName(table);
+else if (isCustomTrack(table) || startsWith("myVariants_", table) ||
+         (strchr(table, '.') != NULL &&
+          startsWith("myVariants_", strchr(table, '.') + 1)))
+    {
+    /* Accept the qualified myVariants storage form
+     * ("customDataNN.myVariants_<user>") as well as the bare track name;
+     * the ct list is keyed on the bare track name. */
+    char *dot = strchr(table, '.');
+    char *trackName = (dot != NULL && startsWith("myVariants_", dot + 1)) ? dot + 1 : table;
+    struct customTrack *ct = ctLookupName(trackName);
     hti = ctToHti(ct);
     }
 else if (sameWord(table, WIKI_TRACK_TABLE))
     {
     hti = wikiHti();
     }
 else
     {
     char *track;
     if (startsWith("chrN_", table))
 	track = table + strlen("chrN_");
     else
 	track = table;
     hti = hFindTableInfo(db, NULL, track);
     }