IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2025, 4:48:15 PM (12 months ago)
Author:
eugene
Message:

add clarifying comment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.c

    r42789 r42826  
    4545#include <mysql.h>
    4646// #include <mysql_com.h> // enum_field_types
    47 
    4847#include "psDB.h"
    4948#include "psMemory.h"
     
    5554#include "psMetadataConfig.h"
    5655
     56/* my_bool was removed from mysql at version 8.0.1, but not from mariadb */
    5757# if (MYSQL_VERSION_ID >= 80001) && !defined MARIADB_VERSION_ID
    58     # define MYSQL_BOOL bool
     58  # define MYSQL_BOOL bool
    5959# else
    60     # define MYSQL_BOOL my_bool
     60  # define MYSQL_BOOL my_bool
    6161# endif
    6262
     
    10391039    fieldCount = mysql_num_fields(result);
    10401040
    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);
    10421045
    10431046    while ((row = mysql_fetch_row(result))) {
Note: See TracChangeset for help on using the changeset viewer.