IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6296


Ignore:
Timestamp:
Feb 1, 2006, 6:48:47 PM (20 years ago)
Author:
desonia
Message:

patch from Bug 680 -- psDB behavior fixes.

File:
1 edited

Legend:

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

    r5841 r6296  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-12-24 00:33:15 $
     14 *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-02-02 04:48:47 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    308308    // Get number of rows returned in result
    309309    rowCount = mysql_num_rows(result);
     310    // XXX has mysql's semantics changed?  If this is zero then why was a
     311    // result set returned?
     312    if (!rowCount) {
     313        mysql_free_result(result);
     314        return NULL;
     315    }
    310316
    311317    // pre-allocate enough elements to hold the complete result set
     
    476482
    477483    rowCount = mysql_num_rows(result);
     484    // XXX has mysql's semantics changed?  If this is zero then why was a
     485    // result set returned?
     486    if (rowCount == 0) {
     487        mysql_free_result(result);
     488        return NULL;
     489    }
    478490
    479491    // pre-allocate enough elements to hold the complete result set
     
    12581270        } else if (item->type == PS_DATA_STRING) {
    12591271            // + column name + _ + like + _ + ' + value + '
    1260             if (*(char *)item->data.V == '\0') {
     1272            // check for NULL and empty ("") strings
     1273            if (item->data.V == NULL || *(char *)item->data.V == '\0') {
    12611274                psStringAppend(&query, "%s IS NULL", item->name);
    12621275            } else {
Note: See TracChangeset for help on using the changeset viewer.