Index: trunk/psLib/src/db/psDB.c
===================================================================
--- trunk/psLib/src/db/psDB.c	(revision 42825)
+++ trunk/psLib/src/db/psDB.c	(revision 42826)
@@ -45,5 +45,4 @@
 #include <mysql.h>
 // #include <mysql_com.h> // enum_field_types
-
 #include "psDB.h"
 #include "psMemory.h"
@@ -55,8 +54,9 @@
 #include "psMetadataConfig.h"
 
+/* my_bool was removed from mysql at version 8.0.1, but not from mariadb */
 # if (MYSQL_VERSION_ID >= 80001) && !defined MARIADB_VERSION_ID 
-    # define MYSQL_BOOL bool
+  # define MYSQL_BOOL bool
 # else
-    # define MYSQL_BOOL my_bool
+  # define MYSQL_BOOL my_bool
 # endif
 
@@ -1039,5 +1039,8 @@
     fieldCount = mysql_num_fields(result);
 
-    psTrace("psLib.db", PS_LOG_INFO, "query returned %lu rows with %d fields", (long unsigned int) rowCount, fieldCount);
+    // annoyingly, in some versions of mysql the value my_ulonglong is actually unsigned long long and in others
+    // it is actually unsigned long.  rather than try to set a print type which depends on the build, we just
+    // cast here to the unsigned long since it is rare that we would need such a large rowCount
+    psTrace("psLib.db", PS_LOG_INFO, "query returned %lu rows with %d fields", (unsigned long) rowCount, fieldCount);
 
     while ((row = mysql_fetch_row(result))) {
