Changeset 42826 for trunk/psLib/src/db/psDB.c
- Timestamp:
- May 8, 2025, 4:48:15 PM (12 months ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/db/psDB.c
r42789 r42826 45 45 #include <mysql.h> 46 46 // #include <mysql_com.h> // enum_field_types 47 48 47 #include "psDB.h" 49 48 #include "psMemory.h" … … 55 54 #include "psMetadataConfig.h" 56 55 56 /* my_bool was removed from mysql at version 8.0.1, but not from mariadb */ 57 57 # if (MYSQL_VERSION_ID >= 80001) && !defined MARIADB_VERSION_ID 58 # define MYSQL_BOOL bool58 # define MYSQL_BOOL bool 59 59 # else 60 # define MYSQL_BOOL my_bool60 # define MYSQL_BOOL my_bool 61 61 # endif 62 62 … … 1039 1039 fieldCount = mysql_num_fields(result); 1040 1040 1041 psTrace("psLib.db", PS_LOG_INFO, "query returned %lu rows with %d fields", (long unsigned int) rowCount, fieldCount); 1041 // annoyingly, in some versions of mysql the value my_ulonglong is actually unsigned long long and in others 1042 // it is actually unsigned long. rather than try to set a print type which depends on the build, we just 1043 // cast here to the unsigned long since it is rare that we would need such a large rowCount 1044 psTrace("psLib.db", PS_LOG_INFO, "query returned %lu rows with %d fields", (unsigned long) rowCount, fieldCount); 1042 1045 1043 1046 while ((row = mysql_fetch_row(result))) {
Note:
See TracChangeset
for help on using the changeset viewer.
