Index: trunk/ippTools/src/pzgetexp.c
===================================================================
--- trunk/ippTools/src/pzgetexp.c	(revision 31038)
+++ trunk/ippTools/src/pzgetexp.c	(revision 42387)
@@ -136,5 +136,5 @@
     psFree(cmdOutput);
     if (!newSummitExps) {
-        // XXX not nessicarily an error
+        // XXX not necessarily an error?
         psError(PS_ERR_UNKNOWN, true, "no new fileSet/exp IDs");
         return false;
@@ -145,4 +145,13 @@
         return true;
     }
+    // If we supply an unknown last_fileset (exposure name) to the summit datastore,
+    // it will return all filesets it knows about.  This can cause problems (table overflow)
+    // if this is too large a number.  Raise an error and let the user fix the underlying
+    // problem (last exposure not known to the summit datastore)
+    // Do we need to be able to configure this number?
+    if (psArrayLength(newSummitExps) > 10000) {
+        psError(PS_ERR_UNKNOWN, true, "too many new fileSet/exp IDs? unknown exposure? problem with summitExp table?");
+        return false;
+    }
 
     // start a transaction so it's all rows or nothing
@@ -153,6 +162,9 @@
     }
 
-    // increase memory table size limits; deafult is 16MB
-    {
+    // increase memory table size limits; default is 16MB, but our current (2022) config
+    // in /etc/mysql/my.cnf sets to default to 1024M.
+    // This command sets the max_heap_table_size within the transaction, and does not
+    // apparently stick.  But this is not really needed, so we are deactivating it.
+    if (0) {
         // 512MB
         char *query = "SET max_heap_table_size = 1024*1024*512";
