IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2006, 1:56:51 PM (20 years ago)
Author:
Paul Price
Message:

Applying patch from Josh to fix my_bool in mySQL stuff --- their boolean is defined around the wrong way.

File:
1 edited

Legend:

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

    r7070 r7078  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-05-05 02:42:01 $
     14 *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-05-05 23:56:51 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    918918    bool status = p_psDBRunQuery(dbh, "START TRANSACTION");
    919919    if (!status) {
    920         psError(PS_ERR_UNKNOWN, false, "Failed to create new database.");
     920        psError(PS_ERR_UNKNOWN, false, "Failed to start a new transaction.");
    921921    }
    922922
     
    933933
    934934    // is it safe to assume my_bool always safely casts to bool?
    935     return (bool)mysql_commit(dbh->mysql);
     935    // mysql_commit - Zero if successful. Non-zero if an error occurred.
     936    return !(bool)mysql_commit(dbh->mysql);
    936937}
    937938
     
    945946
    946947    // is it safe to assume my_bool always safely casts to bool?
    947     return (bool)mysql_rollback(dbh->mysql);
     948    // mysql_rollback - Zero if successful. Non-zero if an error occurred.
     949    return !(bool)mysql_rollback(dbh->mysql);
    948950}
    949951
Note: See TracChangeset for help on using the changeset viewer.