d983323cd2570af1cf3971763d14ef2d88c06fe4
jcasper
  Wed Feb 19 17:00:19 2025 -0800
sqlTableSize needs to support tables with more than 2B rows (rarely, but it does), refs #35262

diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h
index d6162fc53dc..67e8d20b88c 100644
--- src/hg/inc/jksql.h
+++ src/hg/inc/jksql.h
@@ -281,31 +281,31 @@
 int sqlCountColumnsInTable(struct sqlConnection *sc, char *table);
 /* Return the number of columns in a table */
 
 boolean sqlDatabaseExists(char *database);
 /* Return TRUE if database exists. */
 
 boolean sqlTableExists(struct sqlConnection *sc, char *table);
 /* Return TRUE if a table exists. */
 
 bool sqlColumnExists(struct sqlConnection *conn, char *tableName, char *column);
 /* return TRUE if column exists in table. column can contain sql wildcards  */
 
 boolean sqlColumnExistsInTablesList(struct sqlConnection *conn, char *tables, char *field);
 /* check if column exists in a list of tables */
 
-int sqlTableSizeIfExists(struct sqlConnection *sc, char *table);
+long sqlTableSizeIfExists(struct sqlConnection *sc, char *table);
 /* Return row count if a table exists, -1 if it doesn't. */
 
 boolean sqlTablesExist(struct sqlConnection *conn, char *tables);
 /* Check all tables in space delimited string exist. */
 
 boolean sqlTableWildExists(struct sqlConnection *sc, char *table);
 /* Return TRUE if table (which can include SQL wildcards) exists.
  * A bit slower than sqlTableExists. */
 
 unsigned long sqlTableDataSizeFromSchema(struct sqlConnection *conn, char *db, char *table);
 /* Get table data size. Table must exist or will abort. */
 
 unsigned long sqlTableIndexSizeFromSchema(struct sqlConnection *conn, char *db, char *table);
 /* Get table index size. Table must exist or will abort. */
 
@@ -422,31 +422,31 @@
 char* sqlFieldName(struct sqlResult *sr);
 /* Repeated calls to this function returns the names of the fields
  * the given result. */
 
 struct slName *sqlResultFieldList(struct sqlResult *sr);
 /* Return slName list of all fields in query.  Can just be done once per query. */
 
 int sqlResultFieldArray(struct sqlResult *sr, char ***retArray);
 /* Get the fields of sqlResult,  returning count, and the results
  * themselves in *retArray. */
 
 int sqlFieldColumn(struct sqlResult *sr, char *colName);
 /* get the column number of the specified field in the result, or
  * -1 if the result doesn't contain the field.*/
 
-int sqlTableSize(struct sqlConnection *conn, char *table);
+long sqlTableSize(struct sqlConnection *conn, char *table);
 /* Find number of rows in table. */
 
 int sqlFieldIndex(struct sqlConnection *conn, char *table, char *field);
 /* Returns index of field in a row from table, or -1 if it
  * doesn't exist. */
 
 struct slName *sqlFieldNames(struct sqlConnection *conn, char *table);
 /* Returns field names from a table. */
 
 unsigned int sqlLastAutoId(struct sqlConnection *conn);
 /* Return last automatically incremented id inserted into database. */
 
 void sqlVaWarn(struct sqlConnection *sc, char *format, va_list args);
 /* Error message handler. */