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/hgText/hgText.c src/hg/hgText/hgText.c index 81cca640594..a858e475c17 100644 --- src/hg/hgText/hgText.c +++ src/hg/hgText/hgText.c @@ -2949,49 +2949,49 @@ } return(gotInfo); } void showItemCountFirstFew(struct sqlConnection *conn, int n) /* Show the item count and first n items of table. */ { char *track = getTrackName(); struct slName *tableList = hSplitTableNames(track); struct slName *tPtr = NULL; struct sqlResult *sr = NULL; struct dyString *query = dyStringNew(256); char **row = NULL; char *table = getTableName(); -int count = 0; +long count = 0; int numberColumns = 0; int i = 0; #define NEEDED_UNTIL_GB_CDNA_INFO_CHANGE #ifdef NEEDED_UNTIL_GB_CDNA_INFO_CHANGE if (sameString(table, "mrna")) { struct slName *slNew = newSlName(table); slFreeList(&tableList); tableList = slNew; } #endif /* NEEDED_UNTIL_GB_CDNA_INFO_CHANGE */ for (tPtr=tableList; tPtr != NULL; tPtr=tPtr->next) { count += sqlTableSize(conn, tPtr->name); } -printf("<P>Table %s has %d rows total.<BR>\n", table, count); +printf("<P>Table %s has %ld rows total.<BR>\n", table, count); if (count > 0) { sqlDyStringPrintf(query, "select * from %s limit %d", tableList->name, n); sr = sqlGetResult(conn, query->string); printf ("Example rows of table %s (not necessarily from current position!):<BR>\n", table); puts("<TT><PRE>"); numberColumns = sqlCountColumns(sr); printf("#"); for (i = 0; i < numberColumns; i++) { printf("%s\t", sqlFieldName(sr)); } printf("\n"); while ((row = sqlNextRow(sr)) != NULL)