Changeset 7078
- Timestamp:
- May 5, 2006, 1:56:51 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/db/psDB.c
r7070 r7078 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.5 0$ $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 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 918 918 bool status = p_psDBRunQuery(dbh, "START TRANSACTION"); 919 919 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."); 921 921 } 922 922 … … 933 933 934 934 // 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); 936 937 } 937 938 … … 945 946 946 947 // 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); 948 950 } 949 951
Note:
See TracChangeset
for help on using the changeset viewer.
