e7264355c83a0d0875b372b7ad26162adb363f6c
chmalee
  Tue May 12 13:20:28 2026 -0700
myVariants v1 follow-ups: CT edit gate, anon-user button gate, hgc duplicate link, item-name synthesis from ref/alt or HGVS, refs #33808

diff --git src/hg/inc/myVariants.h src/hg/inc/myVariants.h
index 7ef8e0d5f68..9ccd82e17a3 100644
--- src/hg/inc/myVariants.h
+++ src/hg/inc/myVariants.h
@@ -26,31 +26,36 @@
     char *ref;          /* reference allele */
     char *alt;          /* alternate allele */
     char *project;      /* project name for grouping variants */
     char *mouseover;    /* short mouseover text for hover display */
     unsigned id;        /* Unique ID for item */
     struct slPair *customFields; /* user-defined custom field name/value pairs */
     };
 
 void myVariantsStaticLoad(char **row, struct myVariants *ret);
 /* Load a row from myVariants table into ret. The contents of ret will be replaced at the next call to this function. */
 
 struct myVariants *myVariantsLoadByQuery(struct sqlConnection *conn, char *query);
 /* Load all myVariants from table that satisfy the query given. Dispose of this with myVariantsFreeList(). */
 
 void myVariantsSaveToDb(struct sqlConnection *conn, struct myVariants *el, char *tableName, int updateSize);
-/* Save myVariants as a row to the table specified by tableName. */
+/* Save myVariants as a row to the table specified by tableName.
+ * Uses explicit column names so custom fields in el->customFields are included.
+ * If el->name is NULL or empty, fills it in post-INSERT as "Variant N" using
+ * the row's auto-increment id; sqlLastAutoId wraps MariaDB's mysql_insert_id,
+ * which is per-connection and unaffected by concurrent INSERTs on other
+ * connections. */
 
 struct myVariants *myVariantsLoad(char **row);
 /* Load a myVariants from row fetched with select * from myVariants from database. Dispose of this with myVariantsFree(). */
 
 struct myVariants *myVariantsLoadAll(char *fileName);
 /* Load all myVariants from whitespace-separated file. Dispose of this with myVariantsFreeList(). */
 
 struct myVariants *myVariantsLoadAllByChar(char *fileName, char chopper);
 /* Load all myVariants from chopper separated file. Dispose of this with myVariantsFreeList(). */
 
 #define myVariantsLoadAllByTab(a) myVariantsLoadAllByChar(a, '\t');
 /* Load all myVariants from tab separated file. Dispose of this with myVariantsFreeList(). */
 
 struct myVariants *myVariantsCommaIn(char **pS, struct myVariants *ret);
 /* Create a myVariants out of a comma separated string. This will fill in ret if non-null, otherwise will return a new myVariants */