IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11873


Ignore:
Timestamp:
Feb 16, 2007, 6:14:42 PM (19 years ago)
Author:
jhoblitt
Message:

VERSION 1.1.9

Location:
trunk/ippdb
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/configure.ac

    r11820 r11873  
    77AC_PREREQ(2.59)
    88
    9 AC_INIT([ippdb], [1.1.8], [pan-starrs.ifa.hawaii.edu])
     9AC_INIT([ippdb], [1.1.9], [pan-starrs.ifa.hawaii.edu])
    1010AC_CONFIG_SRCDIR([ippdb.pc.in])
    1111
  • trunk/ippdb/src/ippdb.c

    r11867 r11873  
    52675267static void p2PendingExpRowFree(p2PendingExpRow *object);
    52685268
    5269 p2PendingExpRow *p2PendingExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *recipe)
     5269p2PendingExpRow *p2PendingExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
    52705270{
    52715271    p2PendingExpRow *_object;
     
    52795279    _object->label = psStringCopy(label);
    52805280    _object->recipe = psStringCopy(recipe);
     5281    _object->expgroup = psStringCopy(expgroup);
     5282    _object->dvodb = psStringCopy(dvodb);
    52815283
    52825284    return _object;
     
    52885290    psFree(object->label);
    52895291    psFree(object->recipe);
     5292    psFree(object->expgroup);
     5293    psFree(object->dvodb);
    52905294}
    52915295
     
    53185322        return false;
    53195323    }
     5324    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, "key", "64")) {
     5325        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     5326        psFree(md);
     5327        return false;
     5328    }
     5329    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
     5330        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     5331        psFree(md);
     5332        return false;
     5333    }
    53205334
    53215335    bool status = psDBCreateTable(dbh, P2PENDINGEXP_TABLE_NAME, md);
     
    53315345}
    53325346
    5333 bool p2PendingExpInsert(psDB * dbh, const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *recipe)
     5347bool p2PendingExpInsert(psDB * dbh, const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
    53345348{
    53355349    psMetadata *md = psMetadataAlloc();
     
    53565370    if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, recipe)) {
    53575371        psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     5372        psFree(md);
     5373        return false;
     5374    }
     5375    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, expgroup)) {
     5376        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     5377        psFree(md);
     5378        return false;
     5379    }
     5380    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
     5381        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
    53585382        psFree(md);
    53595383        return false;
     
    53825406bool p2PendingExpInsertObject(psDB *dbh, p2PendingExpRow *object)
    53835407{
    5384     return p2PendingExpInsert(dbh, object->exp_tag, object->p2_version, object->p1_version, object->label, object->recipe);
     5408    return p2PendingExpInsert(dbh, object->exp_tag, object->p2_version, object->p1_version, object->label, object->recipe, object->expgroup, object->dvodb);
    53855409}
    53865410
     
    54805504        return false;
    54815505    }
     5506    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, object->expgroup)) {
     5507        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     5508        psFree(md);
     5509        return false;
     5510    }
     5511    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
     5512        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     5513        psFree(md);
     5514        return false;
     5515    }
    54825516
    54835517
     
    55145548        return false;
    55155549    }
    5516 
    5517     return p2PendingExpRowAlloc(exp_tag, p2_version, p1_version, label, recipe);
     5550    char* expgroup = psMetadataLookupPtr(&status, md, "expgroup");
     5551    if (!status) {
     5552        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item expgroup");
     5553        return false;
     5554    }
     5555    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     5556    if (!status) {
     5557        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
     5558        return false;
     5559    }
     5560
     5561    return p2PendingExpRowAlloc(exp_tag, p2_version, p1_version, label, recipe, expgroup, dvodb);
    55185562}
    55195563psArray *p2PendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    60096053static void p2ProcessedExpRowFree(p2ProcessedExpRow *object);
    60106054
    6011 p2ProcessedExpRow *p2ProcessedExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label)
     6055p2ProcessedExpRow *p2ProcessedExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *expgroup, const char *dvodb)
    60126056{
    60136057    p2ProcessedExpRow *_object;
     
    60206064    _object->p1_version = p1_version;
    60216065    _object->label = psStringCopy(label);
     6066    _object->expgroup = psStringCopy(expgroup);
     6067    _object->dvodb = psStringCopy(dvodb);
    60226068
    60236069    return _object;
     
    60286074    psFree(object->exp_tag);
    60296075    psFree(object->label);
     6076    psFree(object->expgroup);
     6077    psFree(object->dvodb);
    60306078}
    60316079
     
    60536101        return false;
    60546102    }
     6103    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, "key", "64")) {
     6104        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     6105        psFree(md);
     6106        return false;
     6107    }
     6108    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
     6109        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     6110        psFree(md);
     6111        return false;
     6112    }
    60556113
    60566114    bool status = psDBCreateTable(dbh, P2PROCESSEDEXP_TABLE_NAME, md);
     
    60666124}
    60676125
    6068 bool p2ProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label)
     6126bool p2ProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *expgroup, const char *dvodb)
    60696127{
    60706128    psMetadata *md = psMetadataAlloc();
     
    60866144    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) {
    60876145        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     6146        psFree(md);
     6147        return false;
     6148    }
     6149    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, expgroup)) {
     6150        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     6151        psFree(md);
     6152        return false;
     6153    }
     6154    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
     6155        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
    60886156        psFree(md);
    60896157        return false;
     
    61126180bool p2ProcessedExpInsertObject(psDB *dbh, p2ProcessedExpRow *object)
    61136181{
    6114     return p2ProcessedExpInsert(dbh, object->exp_tag, object->p2_version, object->p1_version, object->label);
     6182    return p2ProcessedExpInsert(dbh, object->exp_tag, object->p2_version, object->p1_version, object->label, object->expgroup, object->dvodb);
    61156183}
    61166184
     
    62056273        return false;
    62066274    }
     6275    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, object->expgroup)) {
     6276        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     6277        psFree(md);
     6278        return false;
     6279    }
     6280    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
     6281        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     6282        psFree(md);
     6283        return false;
     6284    }
    62076285
    62086286
     
    62346312        return false;
    62356313    }
    6236 
    6237     return p2ProcessedExpRowAlloc(exp_tag, p2_version, p1_version, label);
     6314    char* expgroup = psMetadataLookupPtr(&status, md, "expgroup");
     6315    if (!status) {
     6316        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item expgroup");
     6317        return false;
     6318    }
     6319    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     6320    if (!status) {
     6321        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
     6322        return false;
     6323    }
     6324
     6325    return p2ProcessedExpRowAlloc(exp_tag, p2_version, p1_version, label, expgroup, dvodb);
    62386326}
    62396327psArray *p2ProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    71317219static void p3PendingExpRowFree(p3PendingExpRow *object);
    71327220
    7133 p3PendingExpRow *p3PendingExpRowAlloc(const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label)
     7221p3PendingExpRow *p3PendingExpRowAlloc(const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *expgroup, const char *dvodb)
    71347222{
    71357223    p3PendingExpRow *_object;
     
    71427230    _object->p2_version = p2_version;
    71437231    _object->label = psStringCopy(label);
     7232    _object->expgroup = psStringCopy(expgroup);
     7233    _object->dvodb = psStringCopy(dvodb);
    71447234
    71457235    return _object;
     
    71507240    psFree(object->exp_tag);
    71517241    psFree(object->label);
     7242    psFree(object->expgroup);
     7243    psFree(object->dvodb);
    71527244}
    71537245
     
    71757267        return false;
    71767268    }
     7269    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, "key", "64")) {
     7270        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     7271        psFree(md);
     7272        return false;
     7273    }
     7274    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
     7275        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     7276        psFree(md);
     7277        return false;
     7278    }
    71777279
    71787280    bool status = psDBCreateTable(dbh, P3PENDINGEXP_TABLE_NAME, md);
     
    71887290}
    71897291
    7190 bool p3PendingExpInsert(psDB * dbh, const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label)
     7292bool p3PendingExpInsert(psDB * dbh, const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *expgroup, const char *dvodb)
    71917293{
    71927294    psMetadata *md = psMetadataAlloc();
     
    72087310    if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) {
    72097311        psError(PS_ERR_UNKNOWN, false, "failed to add item label");
     7312        psFree(md);
     7313        return false;
     7314    }
     7315    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, expgroup)) {
     7316        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     7317        psFree(md);
     7318        return false;
     7319    }
     7320    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
     7321        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
    72107322        psFree(md);
    72117323        return false;
     
    72347346bool p3PendingExpInsertObject(psDB *dbh, p3PendingExpRow *object)
    72357347{
    7236     return p3PendingExpInsert(dbh, object->exp_tag, object->p3_version, object->p2_version, object->label);
     7348    return p3PendingExpInsert(dbh, object->exp_tag, object->p3_version, object->p2_version, object->label, object->expgroup, object->dvodb);
    72377349}
    72387350
     
    73277439        return false;
    73287440    }
     7441    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, object->expgroup)) {
     7442        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     7443        psFree(md);
     7444        return false;
     7445    }
     7446    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
     7447        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     7448        psFree(md);
     7449        return false;
     7450    }
    73297451
    73307452
     
    73567478        return false;
    73577479    }
    7358 
    7359     return p3PendingExpRowAlloc(exp_tag, p3_version, p2_version, label);
     7480    char* expgroup = psMetadataLookupPtr(&status, md, "expgroup");
     7481    if (!status) {
     7482        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item expgroup");
     7483        return false;
     7484    }
     7485    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     7486    if (!status) {
     7487        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
     7488        return false;
     7489    }
     7490
     7491    return p3PendingExpRowAlloc(exp_tag, p3_version, p2_version, label, expgroup, dvodb);
    73607492}
    73617493psArray *p3PendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    74697601static void p3ProcessedExpRowFree(p3ProcessedExpRow *object);
    74707602
    7471 p3ProcessedExpRow *p3ProcessedExpRowAlloc(const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *b1_uri, const char *b2_uri, psF32 zp_mean, psF32 zp_stdev, psS16 fault)
     7603p3ProcessedExpRow *p3ProcessedExpRowAlloc(const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *b1_uri, const char *b2_uri, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb)
    74727604{
    74737605    p3ProcessedExpRow *_object;
     
    74937625    _object->zp_stdev = zp_stdev;
    74947626    _object->fault = fault;
     7627    _object->expgroup = psStringCopy(expgroup);
     7628    _object->dvodb = psStringCopy(dvodb);
    74957629
    74967630    return _object;
     
    75057639    psFree(object->b1_uri);
    75067640    psFree(object->b2_uri);
     7641    psFree(object->expgroup);
     7642    psFree(object->dvodb);
    75077643}
    75087644
     
    75957731        return false;
    75967732    }
     7733    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, "key", "64")) {
     7734        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     7735        psFree(md);
     7736        return false;
     7737    }
     7738    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
     7739        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     7740        psFree(md);
     7741        return false;
     7742    }
    75977743
    75987744    bool status = psDBCreateTable(dbh, P3PROCESSEDEXP_TABLE_NAME, md);
     
    76087754}
    76097755
    7610 bool p3ProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *b1_uri, const char *b2_uri, psF32 zp_mean, psF32 zp_stdev, psS16 fault)
     7756bool p3ProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *b1_uri, const char *b2_uri, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb)
    76117757{
    76127758    psMetadata *md = psMetadataAlloc();
     
    76937839    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
    76947840        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
     7841        psFree(md);
     7842        return false;
     7843    }
     7844    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, expgroup)) {
     7845        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     7846        psFree(md);
     7847        return false;
     7848    }
     7849    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
     7850        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
    76957851        psFree(md);
    76967852        return false;
     
    77197875bool p3ProcessedExpInsertObject(psDB *dbh, p3ProcessedExpRow *object)
    77207876{
    7721     return p3ProcessedExpInsert(dbh, object->exp_tag, object->p3_version, object->p2_version, object->label, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object->b1_uri, object->b2_uri, object->zp_mean, object->zp_stdev, object->fault);
     7877    return p3ProcessedExpInsert(dbh, object->exp_tag, object->p3_version, object->p2_version, object->label, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object->b1_uri, object->b2_uri, object->zp_mean, object->zp_stdev, object->fault, object->expgroup, object->dvodb);
    77227878}
    77237879
     
    78778033        return false;
    78788034    }
     8035    if (!psMetadataAdd(md, PS_LIST_TAIL, "expgroup", PS_DATA_STRING, NULL, object->expgroup)) {
     8036        psError(PS_ERR_UNKNOWN, false, "failed to add item expgroup");
     8037        psFree(md);
     8038        return false;
     8039    }
     8040    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
     8041        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     8042        psFree(md);
     8043        return false;
     8044    }
    78798045
    78808046
     
    79718137        return false;
    79728138    }
    7973 
    7974     return p3ProcessedExpRowAlloc(exp_tag, p3_version, p2_version, label, uri, recipe, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, b1_uri, b2_uri, zp_mean, zp_stdev, fault);
     8139    char* expgroup = psMetadataLookupPtr(&status, md, "expgroup");
     8140    if (!status) {
     8141        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item expgroup");
     8142        return false;
     8143    }
     8144    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     8145    if (!status) {
     8146        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
     8147        return false;
     8148    }
     8149
     8150    return p3ProcessedExpRowAlloc(exp_tag, p3_version, p2_version, label, uri, recipe, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, b1_uri, b2_uri, zp_mean, zp_stdev, fault, expgroup, dvodb);
    79758151}
    79768152psArray *p3ProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1357013746static void p4RunRowFree(p4RunRow *object);
    1357113747
    13572 p4RunRow *p4RunRowAlloc(psS32 p4_id, const char *mode, const char *state, const char *workdir, psTime* registered)
     13748p4RunRow *p4RunRowAlloc(psS32 p4_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered)
    1357313749{
    1357413750    p4RunRow        *_object;
     
    1358113757    _object->state = psStringCopy(state);
    1358213758    _object->workdir = psStringCopy(workdir);
     13759    _object->dvodb = psStringCopy(dvodb);
    1358313760    _object->registered = psTimeCopy(registered);
    1358413761
     
    1359113768    psFree(object->state);
    1359213769    psFree(object->workdir);
     13770    psFree(object->dvodb);
    1359313771    psFree(object->registered);
    1359413772}
     
    1361713795        return false;
    1361813796    }
     13797    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
     13798        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     13799        psFree(md);
     13800        return false;
     13801    }
    1361913802    if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, NULL)) {
    1362013803        psError(PS_ERR_UNKNOWN, false, "failed to add item registered");
     
    1363513818}
    1363613819
    13637 bool p4RunInsert(psDB * dbh, psS32 p4_id, const char *mode, const char *state, const char *workdir, psTime* registered)
     13820bool p4RunInsert(psDB * dbh, psS32 p4_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered)
    1363813821{
    1363913822    psMetadata *md = psMetadataAlloc();
     
    1365513838    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) {
    1365613839        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     13840        psFree(md);
     13841        return false;
     13842    }
     13843    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
     13844        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
    1365713845        psFree(md);
    1365813846        return false;
     
    1368613874bool p4RunInsertObject(psDB *dbh, p4RunRow *object)
    1368713875{
    13688     return p4RunInsert(dbh, object->p4_id, object->mode, object->state, object->workdir, object->registered);
     13876    return p4RunInsert(dbh, object->p4_id, object->mode, object->state, object->workdir, object->dvodb, object->registered);
    1368913877}
    1369013878
     
    1377913967        return false;
    1378013968    }
     13969    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
     13970        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     13971        psFree(md);
     13972        return false;
     13973    }
    1378113974    if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, object->registered)) {
    1378213975        psError(PS_ERR_UNKNOWN, false, "failed to add item registered");
     
    1381314006        return false;
    1381414007    }
     14008    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     14009    if (!status) {
     14010        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
     14011        return false;
     14012    }
    1381514013    psTime* registered = psMetadataLookupPtr(&status, md, "registered");
    1381614014    if (!status) {
     
    1381914017    }
    1382014018
    13821     return p4RunRowAlloc(p4_id, mode, state, workdir, registered);
     14019    return p4RunRowAlloc(p4_id, mode, state, workdir, dvodb, registered);
    1382214020}
    1382314021psArray *p4RunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1507415272static void p5RunRowFree(p5RunRow *object);
    1507515273
    15076 p5RunRow *p5RunRowAlloc(psS32 p5_id, const char *state, const char *workdir, psTime* registered)
     15274p5RunRow *p5RunRowAlloc(psS32 p5_id, const char *state, const char *workdir, const char *dvodb, psTime* registered)
    1507715275{
    1507815276    p5RunRow        *_object;
     
    1508415282    _object->state = psStringCopy(state);
    1508515283    _object->workdir = psStringCopy(workdir);
     15284    _object->dvodb = psStringCopy(dvodb);
    1508615285    _object->registered = psTimeCopy(registered);
    1508715286
     
    1509315292    psFree(object->state);
    1509415293    psFree(object->workdir);
     15294    psFree(object->dvodb);
    1509515295    psFree(object->registered);
    1509615296}
     
    1511415314        return false;
    1511515315    }
     15316    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
     15317        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     15318        psFree(md);
     15319        return false;
     15320    }
    1511615321    if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, NULL)) {
    1511715322        psError(PS_ERR_UNKNOWN, false, "failed to add item registered");
     
    1513215337}
    1513315338
    15134 bool p5RunInsert(psDB * dbh, psS32 p5_id, const char *state, const char *workdir, psTime* registered)
     15339bool p5RunInsert(psDB * dbh, psS32 p5_id, const char *state, const char *workdir, const char *dvodb, psTime* registered)
    1513515340{
    1513615341    psMetadata *md = psMetadataAlloc();
     
    1514715352    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) {
    1514815353        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     15354        psFree(md);
     15355        return false;
     15356    }
     15357    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
     15358        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
    1514915359        psFree(md);
    1515015360        return false;
     
    1517815388bool p5RunInsertObject(psDB *dbh, p5RunRow *object)
    1517915389{
    15180     return p5RunInsert(dbh, object->p5_id, object->state, object->workdir, object->registered);
     15390    return p5RunInsert(dbh, object->p5_id, object->state, object->workdir, object->dvodb, object->registered);
    1518115391}
    1518215392
     
    1526615476        return false;
    1526715477    }
     15478    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
     15479        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     15480        psFree(md);
     15481        return false;
     15482    }
    1526815483    if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, object->registered)) {
    1526915484        psError(PS_ERR_UNKNOWN, false, "failed to add item registered");
     
    1529515510        return false;
    1529615511    }
     15512    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     15513    if (!status) {
     15514        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
     15515        return false;
     15516    }
    1529715517    psTime* registered = psMetadataLookupPtr(&status, md, "registered");
    1529815518    if (!status) {
     
    1530115521    }
    1530215522
    15303     return p5RunRowAlloc(p5_id, state, workdir, registered);
     15523    return p5RunRowAlloc(p5_id, state, workdir, dvodb, registered);
    1530415524}
    1530515525psArray *p5RunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1617516395static void p6RunRowFree(p6RunRow *object);
    1617616396
    16177 p6RunRow *p6RunRowAlloc(psS32 p6_id, const char *state, const char *workdir, psTime* registered)
     16397p6RunRow *p6RunRowAlloc(psS32 p6_id, const char *state, const char *workdir, const char *dvodb, psTime* registered)
    1617816398{
    1617916399    p6RunRow        *_object;
     
    1618516405    _object->state = psStringCopy(state);
    1618616406    _object->workdir = psStringCopy(workdir);
     16407    _object->dvodb = psStringCopy(dvodb);
    1618716408    _object->registered = psTimeCopy(registered);
    1618816409
     
    1619416415    psFree(object->state);
    1619516416    psFree(object->workdir);
     16417    psFree(object->dvodb);
    1619616418    psFree(object->registered);
    1619716419}
     
    1621516437        return false;
    1621616438    }
     16439    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
     16440        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     16441        psFree(md);
     16442        return false;
     16443    }
    1621716444    if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, NULL)) {
    1621816445        psError(PS_ERR_UNKNOWN, false, "failed to add item registered");
     
    1623316460}
    1623416461
    16235 bool p6RunInsert(psDB * dbh, psS32 p6_id, const char *state, const char *workdir, psTime* registered)
     16462bool p6RunInsert(psDB * dbh, psS32 p6_id, const char *state, const char *workdir, const char *dvodb, psTime* registered)
    1623616463{
    1623716464    psMetadata *md = psMetadataAlloc();
     
    1624816475    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) {
    1624916476        psError(PS_ERR_UNKNOWN, false, "failed to add item workdir");
     16477        psFree(md);
     16478        return false;
     16479    }
     16480    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) {
     16481        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
    1625016482        psFree(md);
    1625116483        return false;
     
    1627916511bool p6RunInsertObject(psDB *dbh, p6RunRow *object)
    1628016512{
    16281     return p6RunInsert(dbh, object->p6_id, object->state, object->workdir, object->registered);
     16513    return p6RunInsert(dbh, object->p6_id, object->state, object->workdir, object->dvodb, object->registered);
    1628216514}
    1628316515
     
    1636716599        return false;
    1636816600    }
     16601    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
     16602        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     16603        psFree(md);
     16604        return false;
     16605    }
    1636916606    if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, object->registered)) {
    1637016607        psError(PS_ERR_UNKNOWN, false, "failed to add item registered");
     
    1639616633        return false;
    1639716634    }
     16635    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
     16636    if (!status) {
     16637        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb");
     16638        return false;
     16639    }
    1639816640    psTime* registered = psMetadataLookupPtr(&status, md, "registered");
    1639916641    if (!status) {
     
    1640216644    }
    1640316645
    16404     return p6RunRowAlloc(p6_id, state, workdir, registered);
     16646    return p6RunRowAlloc(p6_id, state, workdir, dvodb, registered);
    1640516647}
    1640616648psArray *p6RunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
  • trunk/ippdb/src/ippdb.h

    r11867 r11873  
    27162716    char            *label;
    27172717    char            *recipe;
     2718    char            *expgroup;
     2719    char            *dvodb;
    27182720} p2PendingExpRow;
    27192721
     
    27282730    psS32           p1_version,
    27292731    const char      *label,
    2730     const char      *recipe
     2732    const char      *recipe,
     2733    const char      *expgroup,
     2734    const char      *dvodb
    27312735);
    27322736
     
    27622766    psS32           p1_version,
    27632767    const char      *label,
    2764     const char      *recipe
     2768    const char      *recipe,
     2769    const char      *expgroup,
     2770    const char      *dvodb
    27652771);
    27662772
     
    31323138    psS32           p1_version;
    31333139    char            *label;
     3140    char            *expgroup;
     3141    char            *dvodb;
    31343142} p2ProcessedExpRow;
    31353143
     
    31433151    psS32           p2_version,
    31443152    psS32           p1_version,
    3145     const char      *label
     3153    const char      *label,
     3154    const char      *expgroup,
     3155    const char      *dvodb
    31463156);
    31473157
     
    31763186    psS32           p2_version,
    31773187    psS32           p1_version,
    3178     const char      *label
     3188    const char      *label,
     3189    const char      *expgroup,
     3190    const char      *dvodb
    31793191);
    31803192
     
    37593771    psS32           p2_version;
    37603772    char            *label;
     3773    char            *expgroup;
     3774    char            *dvodb;
    37613775} p3PendingExpRow;
    37623776
     
    37703784    psS32           p3_version,
    37713785    psS32           p2_version,
    3772     const char      *label
     3786    const char      *label,
     3787    const char      *expgroup,
     3788    const char      *dvodb
    37733789);
    37743790
     
    38033819    psS32           p3_version,
    38043820    psS32           p2_version,
    3805     const char      *label
     3821    const char      *label,
     3822    const char      *expgroup,
     3823    const char      *dvodb
    38063824);
    38073825
     
    39763994    psF32           zp_stdev;
    39773995    psS16           fault;
     3996    char            *expgroup;
     3997    char            *dvodb;
    39783998} p3ProcessedExpRow;
    39793999
     
    40004020    psF32           zp_mean,
    40014021    psF32           zp_stdev,
    4002     psS16           fault
     4022    psS16           fault,
     4023    const char      *expgroup,
     4024    const char      *dvodb
    40034025);
    40044026
     
    40464068    psF32           zp_mean,
    40474069    psF32           zp_stdev,
    4048     psS16           fault
     4070    psS16           fault,
     4071    const char      *expgroup,
     4072    const char      *dvodb
    40494073);
    40504074
     
    68556879    char            *state;
    68566880    char            *workdir;
     6881    char            *dvodb;
    68576882    psTime*         registered;
    68586883} p4RunRow;
     
    68686893    const char      *state,
    68696894    const char      *workdir,
     6895    const char      *dvodb,
    68706896    psTime*         registered
    68716897);
     
    69026928    const char      *state,
    69036929    const char      *workdir,
     6930    const char      *dvodb,
    69046931    psTime*         registered
    69056932);
     
    76917718    char            *state;
    76927719    char            *workdir;
     7720    char            *dvodb;
    76937721    psTime*         registered;
    76947722} p5RunRow;
     
    77037731    const char      *state,
    77047732    const char      *workdir,
     7733    const char      *dvodb,
    77057734    psTime*         registered
    77067735);
     
    77367765    const char      *state,
    77377766    const char      *workdir,
     7767    const char      *dvodb,
    77387768    psTime*         registered
    77397769);
     
    83158345    char            *state;
    83168346    char            *workdir;
     8347    char            *dvodb;
    83178348    psTime*         registered;
    83188349} p6RunRow;
     
    83278358    const char      *state,
    83288359    const char      *workdir,
     8360    const char      *dvodb,
    83298361    psTime*         registered
    83308362);
     
    83608392    const char      *state,
    83618393    const char      *workdir,
     8394    const char      *dvodb,
    83628395    psTime*         registered
    83638396);
  • trunk/ippdb/tests/alloc.c

    r11867 r11873  
    532532        p2PendingExpRow *object;
    533533
    534         object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string"    );
     534        object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", "a string"    );
    535535
    536536        if (!object) {
     
    558558            exit(EXIT_FAILURE);
    559559        }
     560        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     561            psFree(object);
     562            exit(EXIT_FAILURE);
     563        }
     564        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     565            psFree(object);
     566            exit(EXIT_FAILURE);
     567        }
    560568
    561569        psFree(object);
     
    602610        p2ProcessedExpRow *object;
    603611
    604         object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string"    );
     612        object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"    );
    605613
    606614        if (!object) {
     
    624632            exit(EXIT_FAILURE);
    625633        }
     634        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     635            psFree(object);
     636            exit(EXIT_FAILURE);
     637        }
     638        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     639            psFree(object);
     640            exit(EXIT_FAILURE);
     641        }
    626642
    627643        psFree(object);
     
    709725        p3PendingExpRow *object;
    710726
    711         object = p3PendingExpRowAlloc("a string", -32, -32, "a string"    );
     727        object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"    );
    712728
    713729        if (!object) {
     
    731747            exit(EXIT_FAILURE);
    732748        }
     749        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     750            psFree(object);
     751            exit(EXIT_FAILURE);
     752        }
     753        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     754            psFree(object);
     755            exit(EXIT_FAILURE);
     756        }
    733757
    734758        psFree(object);
     
    738762        p3ProcessedExpRow *object;
    739763
    740         object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16    );
     764        object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string"    );
    741765
    742766        if (!object) {
     
    812836            exit(EXIT_FAILURE);
    813837        }
     838        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     839            psFree(object);
     840            exit(EXIT_FAILURE);
     841        }
     842        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     843            psFree(object);
     844            exit(EXIT_FAILURE);
     845        }
    814846
    815847        psFree(object);
     
    14301462        p4RunRow        *object;
    14311463
    1432         object = p4RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
     1464        object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
    14331465
    14341466        if (!object) {
     
    14521484            exit(EXIT_FAILURE);
    14531485        }
     1486        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     1487            psFree(object);
     1488            exit(EXIT_FAILURE);
     1489        }
    14541490            psFree(object);
    14551491            exit(EXIT_FAILURE);
     
    15731609        p5RunRow        *object;
    15741610
    1575         object = p5RunRowAlloc(-32, "a string", "a string", "0001-01-01T00:00:00Z"    );
     1611        object = p5RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
    15761612
    15771613        if (!object) {
     
    15911627            exit(EXIT_FAILURE);
    15921628        }
     1629        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     1630            psFree(object);
     1631            exit(EXIT_FAILURE);
     1632        }
    15931633            psFree(object);
    15941634            exit(EXIT_FAILURE);
     
    16751715        p6RunRow        *object;
    16761716
    1677         object = p6RunRowAlloc(-32, "a string", "a string", "0001-01-01T00:00:00Z"    );
     1717        object = p6RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
    16781718
    16791719        if (!object) {
     
    16901730        }
    16911731        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     1732            psFree(object);
     1733            exit(EXIT_FAILURE);
     1734        }
     1735        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
    16921736            psFree(object);
    16931737            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/insert.c

    r11867 r11873  
    193193        }
    194194
    195         if (!p2PendingExpInsert(dbh, "a string", -32, -32, "a string", "a string")) {
     195        if (!p2PendingExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string", "a string")) {
    196196            exit(EXIT_FAILURE);
    197197        }
     
    223223        }
    224224
    225         if (!p2ProcessedExpInsert(dbh, "a string", -32, -32, "a string")) {
     225        if (!p2ProcessedExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string")) {
    226226            exit(EXIT_FAILURE);
    227227        }
     
    268268        }
    269269
    270         if (!p3PendingExpInsert(dbh, "a string", -32, -32, "a string")) {
    271             exit(EXIT_FAILURE);
    272         }
    273 
    274         psDBCleanup(dbh);
    275     }
    276 
    277     {
    278         psDB            *dbh;
    279 
    280         dbh = psDBInit("localhost", "test", NULL, "test");
    281         if (!dbh) {
    282             exit(EXIT_FAILURE);
    283         }
    284 
    285         if (!p3ProcessedExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16)) {
     270        if (!p3PendingExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string")) {
     271            exit(EXIT_FAILURE);
     272        }
     273
     274        psDBCleanup(dbh);
     275    }
     276
     277    {
     278        psDB            *dbh;
     279
     280        dbh = psDBInit("localhost", "test", NULL, "test");
     281        if (!dbh) {
     282            exit(EXIT_FAILURE);
     283        }
     284
     285        if (!p3ProcessedExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string")) {
    286286            exit(EXIT_FAILURE);
    287287        }
     
    478478        }
    479479
    480         if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
     480        if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
    481481            exit(EXIT_FAILURE);
    482482        }
     
    538538        }
    539539
    540         if (!p5RunInsert(dbh, -32, "a string", "a string", "0001-01-01T00:00:00Z")) {
     540        if (!p5RunInsert(dbh, -32, "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
    541541            exit(EXIT_FAILURE);
    542542        }
     
    583583        }
    584584
    585         if (!p6RunInsert(dbh, -32, "a string", "a string", "0001-01-01T00:00:00Z")) {
     585        if (!p6RunInsert(dbh, -32, "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
    586586            exit(EXIT_FAILURE);
    587587        }
  • trunk/ippdb/tests/insertobject.c

    r11867 r11873  
    278278        }
    279279
    280         object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string");
     280        object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", "a string");
    281281        if (!object) {
    282282            exit(EXIT_FAILURE);
     
    322322        }
    323323
    324         object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string");
     324        object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");
    325325        if (!object) {
    326326            exit(EXIT_FAILURE);
     
    388388        }
    389389
    390         object = p3PendingExpRowAlloc("a string", -32, -32, "a string");
     390        object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");
    391391        if (!object) {
    392392            exit(EXIT_FAILURE);
     
    410410        }
    411411
    412         object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16);
     412        object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string");
    413413        if (!object) {
    414414            exit(EXIT_FAILURE);
     
    696696        }
    697697
    698         object = p4RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z");
     698        object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
    699699        if (!object) {
    700700            exit(EXIT_FAILURE);
     
    784784        }
    785785
    786         object = p5RunRowAlloc(-32, "a string", "a string", "0001-01-01T00:00:00Z");
     786        object = p5RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z");
    787787        if (!object) {
    788788            exit(EXIT_FAILURE);
     
    850850        }
    851851
    852         object = p6RunRowAlloc(-32, "a string", "a string", "0001-01-01T00:00:00Z");
     852        object = p6RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z");
    853853        if (!object) {
    854854            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/metadatafromobject.c

    r11867 r11873  
    627627        bool            status;
    628628
    629         object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string");
     629        object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", "a string");
    630630        if (!object) {
    631631            exit(EXIT_FAILURE);
     
    659659            exit(EXIT_FAILURE);
    660660        }
     661        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
     662            psFree(md);
     663            exit(EXIT_FAILURE);
     664        }
     665        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
     666            psFree(md);
     667            exit(EXIT_FAILURE);
     668        }
    661669
    662670        psFree(md);
     
    713721        bool            status;
    714722
    715         object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string");
     723        object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");
    716724        if (!object) {
    717725            exit(EXIT_FAILURE);
     
    741749            exit(EXIT_FAILURE);
    742750        }
     751        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
     752            psFree(md);
     753            exit(EXIT_FAILURE);
     754        }
     755        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
     756            psFree(md);
     757            exit(EXIT_FAILURE);
     758        }
    743759
    744760        psFree(md);
     
    843859        bool            status;
    844860
    845         object = p3PendingExpRowAlloc("a string", -32, -32, "a string");
     861        object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string");
    846862        if (!object) {
    847863            exit(EXIT_FAILURE);
     
    871887            exit(EXIT_FAILURE);
    872888        }
     889        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
     890            psFree(md);
     891            exit(EXIT_FAILURE);
     892        }
     893        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
     894            psFree(md);
     895            exit(EXIT_FAILURE);
     896        }
    873897
    874898        psFree(md);
     
    880904        bool            status;
    881905
    882         object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16);
     906        object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16, "a string", "a string");
    883907        if (!object) {
    884908            exit(EXIT_FAILURE);
     
    959983            exit(EXIT_FAILURE);
    960984        }
     985        if (strncmp(psMetadataLookupPtr(&status, md, "expgroup"), "a string", MAX_STRING_LENGTH)) {
     986            psFree(md);
     987            exit(EXIT_FAILURE);
     988        }
     989        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
     990            psFree(md);
     991            exit(EXIT_FAILURE);
     992        }
    961993
    962994        psFree(md);
     
    16661698        bool            status;
    16671699
    1668         object = p4RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z");
     1700        object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
    16691701        if (!object) {
    16701702            exit(EXIT_FAILURE);
     
    16941726            exit(EXIT_FAILURE);
    16951727        }
     1728        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
     1729            psFree(md);
     1730            exit(EXIT_FAILURE);
     1731        }
    16961732            psFree(md);
    16971733            exit(EXIT_FAILURE);
     
    18411877        bool            status;
    18421878
    1843         object = p5RunRowAlloc(-32, "a string", "a string", "0001-01-01T00:00:00Z");
     1879        object = p5RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z");
    18441880        if (!object) {
    18451881            exit(EXIT_FAILURE);
     
    18651901            exit(EXIT_FAILURE);
    18661902        }
     1903        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
     1904            psFree(md);
     1905            exit(EXIT_FAILURE);
     1906        }
    18671907            psFree(md);
    18681908            exit(EXIT_FAILURE);
     
    19672007        bool            status;
    19682008
    1969         object = p6RunRowAlloc(-32, "a string", "a string", "0001-01-01T00:00:00Z");
     2009        object = p6RunRowAlloc(-32, "a string", "a string", "a string", "0001-01-01T00:00:00Z");
    19702010        if (!object) {
    19712011            exit(EXIT_FAILURE);
     
    19882028        }
    19892029        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
     2030            psFree(md);
     2031            exit(EXIT_FAILURE);
     2032        }
     2033        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
    19902034            psFree(md);
    19912035            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/objectfrommetadata.c

    r11867 r11873  
    973973            exit(EXIT_FAILURE);
    974974        }
     975        if (!psMetadataAddStr(md, PS_LIST_TAIL, "expgroup", 0, NULL, "a string")) {
     976            psFree(md);
     977            exit(EXIT_FAILURE);
     978        }
     979        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
     980            psFree(md);
     981            exit(EXIT_FAILURE);
     982        }
    975983
    976984        object = p2PendingExpObjectFromMetadata(md);
     
    10021010            exit(EXIT_FAILURE);
    10031011        }
     1012        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     1013            psFree(object);
     1014            exit(EXIT_FAILURE);
     1015        }
     1016        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     1017            psFree(object);
     1018            exit(EXIT_FAILURE);
     1019        }
    10041020
    10051021        psFree(object);
     
    10931109            exit(EXIT_FAILURE);
    10941110        }
     1111        if (!psMetadataAddStr(md, PS_LIST_TAIL, "expgroup", 0, NULL, "a string")) {
     1112            psFree(md);
     1113            exit(EXIT_FAILURE);
     1114        }
     1115        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
     1116            psFree(md);
     1117            exit(EXIT_FAILURE);
     1118        }
    10951119
    10961120        object = p2ProcessedExpObjectFromMetadata(md);
     
    11181142            exit(EXIT_FAILURE);
    11191143        }
     1144        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     1145            psFree(object);
     1146            exit(EXIT_FAILURE);
     1147        }
     1148        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     1149            psFree(object);
     1150            exit(EXIT_FAILURE);
     1151        }
    11201152
    11211153        psFree(object);
     
    12811313            exit(EXIT_FAILURE);
    12821314        }
     1315        if (!psMetadataAddStr(md, PS_LIST_TAIL, "expgroup", 0, NULL, "a string")) {
     1316            psFree(md);
     1317            exit(EXIT_FAILURE);
     1318        }
     1319        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
     1320            psFree(md);
     1321            exit(EXIT_FAILURE);
     1322        }
    12831323
    12841324        object = p3PendingExpObjectFromMetadata(md);
     
    13061346            exit(EXIT_FAILURE);
    13071347        }
     1348        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     1349            psFree(object);
     1350            exit(EXIT_FAILURE);
     1351        }
     1352        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     1353            psFree(object);
     1354            exit(EXIT_FAILURE);
     1355        }
    13081356
    13091357        psFree(object);
     
    13821430            exit(EXIT_FAILURE);
    13831431        }
     1432        if (!psMetadataAddStr(md, PS_LIST_TAIL, "expgroup", 0, NULL, "a string")) {
     1433            psFree(md);
     1434            exit(EXIT_FAILURE);
     1435        }
     1436        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
     1437            psFree(md);
     1438            exit(EXIT_FAILURE);
     1439        }
    13841440
    13851441        object = p3ProcessedExpObjectFromMetadata(md);
     
    14581514            exit(EXIT_FAILURE);
    14591515        }
     1516        if (strncmp(object->expgroup, "a string", MAX_STRING_LENGTH)) {
     1517            psFree(object);
     1518            exit(EXIT_FAILURE);
     1519        }
     1520        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     1521            psFree(object);
     1522            exit(EXIT_FAILURE);
     1523        }
    14601524
    14611525        psFree(object);
     
    25912655            exit(EXIT_FAILURE);
    25922656        }
     2657        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
     2658            psFree(md);
     2659            exit(EXIT_FAILURE);
     2660        }
    25932661            psFree(md);
    25942662            exit(EXIT_FAILURE);
     
    26192687            exit(EXIT_FAILURE);
    26202688        }
     2689        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     2690            psFree(object);
     2691            exit(EXIT_FAILURE);
     2692        }
    26212693            psFree(object);
    26222694            exit(EXIT_FAILURE);
     
    28412913            exit(EXIT_FAILURE);
    28422914        }
     2915        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
     2916            psFree(md);
     2917            exit(EXIT_FAILURE);
     2918        }
    28432919            psFree(md);
    28442920            exit(EXIT_FAILURE);
     
    28652941            exit(EXIT_FAILURE);
    28662942        }
     2943        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
     2944            psFree(object);
     2945            exit(EXIT_FAILURE);
     2946        }
    28672947            psFree(object);
    28682948            exit(EXIT_FAILURE);
     
    30213101            exit(EXIT_FAILURE);
    30223102        }
     3103        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
     3104            psFree(md);
     3105            exit(EXIT_FAILURE);
     3106        }
    30233107            psFree(md);
    30243108            exit(EXIT_FAILURE);
     
    30423126        }
    30433127        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
     3128            psFree(object);
     3129            exit(EXIT_FAILURE);
     3130        }
     3131        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
    30443132            psFree(object);
    30453133            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.