IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42153


Ignore:
Timestamp:
Mar 29, 2022, 3:43:48 PM (4 years ago)
Author:
eugene
Message:

test for MYSQL version to select bool type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/psLib/src/db/psDB.c

    r42118 r42153  
    5656
    5757
     58# if (MYSQL_VERSION_ID > 50735)
     59    # define MYSQL_BOOL bool
     60# else
     61    # define MYSQL_BOOL my_bool
     62# endif
     63
    5864// set the pointer to NULL if we are actually freeing the memory
    5965#define PSDB_NULL_FREE(ptr) \
     
    138144
    139145// pType utility functions
    140 static psPtr    psDBGetPTypeNaN(psElemType pType);
    141 static bool    psDBIsPTypeNaN(psElemType pType, psPtr data);
     146static psPtr      psDBGetPTypeNaN(psElemType pType);
     147static MYSQL_BOOL psDBIsPTypeNaN(psElemType pType, psPtr data);
    142148
    143149// public functions
     
    14521458    // XXX EAM 2022.03.15 : at least in mysql 8.0.28, my_bool is gone and just bool is used
    14531459    // in 5.0 and 5.6, my_bool is char
    1454     static bool isNull = true;       // used in a MYSQL_BIND to indicate NULL
     1460    static MYSQL_BOOL isNull = true;       // used in a MYSQL_BIND to indicate NULL
    14551461
    14561462    MYSQL_BIND *bind = mysqlRow->bind;
     
    28762882#define PS_IS_NAN(type, data, nan) *(type *)data == nan
    28772883
    2878 static bool psDBIsPTypeNaN(psElemType pType,
    2879                            psPtr data)
     2884static MYSQL_BOOL psDBIsPTypeNaN(psElemType pType, psPtr data)
     2885
    28802886{
    28812887    bool    isNaN = NULL;
Note: See TracChangeset for help on using the changeset viewer.