4cffc3eb6f43e109452b5b52d1f760cf1ea6a981
jcasper
  Sun Jun 7 21:47:37 2026 -0700
Adjusting sessionDb and userDb IDs to be 64-bit in the code, since the database
is now ready for it and we're crossing the threshold.  refs #33554

diff --git src/hg/lib/jksql.c src/hg/lib/jksql.c
index 86e07312502..e2ca3dff240 100644
--- src/hg/lib/jksql.c
+++ src/hg/lib/jksql.c
@@ -2625,35 +2625,46 @@
 
 struct slName *sqlFieldNames(struct sqlConnection *conn, char *table)
 /* Returns field names from a table. */
 {
 struct slName *list = NULL;
 struct sqlResult *sr;
 char **row;
 sr = sqlDescribe(conn, table);
 while ((row = sqlNextRow(sr)) != NULL)
     slNameAddHead(&list, row[0]);
 sqlFreeResult(&sr);
 slReverse(&list);
 return list;
 }
 
-unsigned int sqlLastAutoId(struct sqlConnection *conn)
+unsigned long sqlLastAutoId64(struct sqlConnection *conn)
 /* Return last automatically incremented id inserted into database. */
 {
 assert(!conn->isFree);
-unsigned id;
+unsigned long id;
+monitorEnter();
+id = mysql_insert_id(conn->conn);
+monitorLeave();
+return id;
+}
+
+unsigned int sqlLastAutoId(struct sqlConnection *conn)
+/* Return last automatically incremented id inserted into database (not 64-bit). */
+{
+assert(!conn->isFree);
+unsigned int id;
 monitorEnter();
 id = mysql_insert_id(conn->conn);
 monitorLeave();
 return id;
 }
 
 /* Stuff to manage and caches of open connections on a database.  Typically
  * you only need 3.  MySQL takes about 2 milliseconds on a local host to open
  * a connection.  On a remote host it can be more and this caching is probably
  * actually necessary. However, much code has been written assuming caching,
  * so it is probably now necessary.
  */
 
 enum {sqlConnCacheMax = 16};