IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12530


Ignore:
Timestamp:
Mar 21, 2007, 2:58:44 PM (19 years ago)
Author:
jhoblitt
Message:

disable foreign key constraints while dropping tables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pxtables.c

    r12024 r12530  
    124124    }
    125125
     126    // disable foreign key constrants
     127    if (!p_psDBRunQuery(config->dbh, "SET FOREIGN_KEY_CHECKS=0")) {
     128        psError(PS_ERR_UNKNOWN, false, "database error");
     129        status = false;
     130    }
     131
    126132    DROP_TABLE(expTagCounterDropTable);
    127133    DROP_TABLE(summitExpDropTable);
     
    166172    DROP_TABLE(stackSumSkyfileDropTable);
    167173
     174    // re-enable foreign key constrants
     175    if (!p_psDBRunQuery(config->dbh, "SET FOREIGN_KEY_CHECKS=1")) {
     176        psError(PS_ERR_UNKNOWN, false, "database error");
     177        status = false;
     178    }
     179
    168180    return status;
    169181}
Note: See TracChangeset for help on using the changeset viewer.