Changeset 11873
- Timestamp:
- Feb 16, 2007, 6:14:42 PM (19 years ago)
- Location:
- trunk/ippdb
- Files:
-
- 8 edited
-
configure.ac (modified) (1 diff)
-
src/ippdb.c (modified) (66 diffs)
-
src/ippdb.h (modified) (21 diffs)
-
tests/alloc.c (modified) (14 diffs)
-
tests/insert.c (modified) (6 diffs)
-
tests/insertobject.c (modified) (7 diffs)
-
tests/metadatafromobject.c (modified) (14 diffs)
-
tests/objectfrommetadata.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/configure.ac
r11820 r11873 7 7 AC_PREREQ(2.59) 8 8 9 AC_INIT([ippdb], [1.1. 8], [pan-starrs.ifa.hawaii.edu])9 AC_INIT([ippdb], [1.1.9], [pan-starrs.ifa.hawaii.edu]) 10 10 AC_CONFIG_SRCDIR([ippdb.pc.in]) 11 11 -
trunk/ippdb/src/ippdb.c
r11867 r11873 5267 5267 static void p2PendingExpRowFree(p2PendingExpRow *object); 5268 5268 5269 p2PendingExpRow *p2PendingExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *recipe )5269 p2PendingExpRow *p2PendingExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *recipe, const char *expgroup, const char *dvodb) 5270 5270 { 5271 5271 p2PendingExpRow *_object; … … 5279 5279 _object->label = psStringCopy(label); 5280 5280 _object->recipe = psStringCopy(recipe); 5281 _object->expgroup = psStringCopy(expgroup); 5282 _object->dvodb = psStringCopy(dvodb); 5281 5283 5282 5284 return _object; … … 5288 5290 psFree(object->label); 5289 5291 psFree(object->recipe); 5292 psFree(object->expgroup); 5293 psFree(object->dvodb); 5290 5294 } 5291 5295 … … 5318 5322 return false; 5319 5323 } 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 } 5320 5334 5321 5335 bool status = psDBCreateTable(dbh, P2PENDINGEXP_TABLE_NAME, md); … … 5331 5345 } 5332 5346 5333 bool p2PendingExpInsert(psDB * dbh, const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *recipe )5347 bool 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) 5334 5348 { 5335 5349 psMetadata *md = psMetadataAlloc(); … … 5356 5370 if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, recipe)) { 5357 5371 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"); 5358 5382 psFree(md); 5359 5383 return false; … … 5382 5406 bool p2PendingExpInsertObject(psDB *dbh, p2PendingExpRow *object) 5383 5407 { 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); 5385 5409 } 5386 5410 … … 5480 5504 return false; 5481 5505 } 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 } 5482 5516 5483 5517 … … 5514 5548 return false; 5515 5549 } 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); 5518 5562 } 5519 5563 psArray *p2PendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 6009 6053 static void p2ProcessedExpRowFree(p2ProcessedExpRow *object); 6010 6054 6011 p2ProcessedExpRow *p2ProcessedExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label )6055 p2ProcessedExpRow *p2ProcessedExpRowAlloc(const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *expgroup, const char *dvodb) 6012 6056 { 6013 6057 p2ProcessedExpRow *_object; … … 6020 6064 _object->p1_version = p1_version; 6021 6065 _object->label = psStringCopy(label); 6066 _object->expgroup = psStringCopy(expgroup); 6067 _object->dvodb = psStringCopy(dvodb); 6022 6068 6023 6069 return _object; … … 6028 6074 psFree(object->exp_tag); 6029 6075 psFree(object->label); 6076 psFree(object->expgroup); 6077 psFree(object->dvodb); 6030 6078 } 6031 6079 … … 6053 6101 return false; 6054 6102 } 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 } 6055 6113 6056 6114 bool status = psDBCreateTable(dbh, P2PROCESSEDEXP_TABLE_NAME, md); … … 6066 6124 } 6067 6125 6068 bool p2ProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label )6126 bool p2ProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 p2_version, psS32 p1_version, const char *label, const char *expgroup, const char *dvodb) 6069 6127 { 6070 6128 psMetadata *md = psMetadataAlloc(); … … 6086 6144 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) { 6087 6145 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"); 6088 6156 psFree(md); 6089 6157 return false; … … 6112 6180 bool p2ProcessedExpInsertObject(psDB *dbh, p2ProcessedExpRow *object) 6113 6181 { 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); 6115 6183 } 6116 6184 … … 6205 6273 return false; 6206 6274 } 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 } 6207 6285 6208 6286 … … 6234 6312 return false; 6235 6313 } 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); 6238 6326 } 6239 6327 psArray *p2ProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7131 7219 static void p3PendingExpRowFree(p3PendingExpRow *object); 7132 7220 7133 p3PendingExpRow *p3PendingExpRowAlloc(const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label )7221 p3PendingExpRow *p3PendingExpRowAlloc(const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *expgroup, const char *dvodb) 7134 7222 { 7135 7223 p3PendingExpRow *_object; … … 7142 7230 _object->p2_version = p2_version; 7143 7231 _object->label = psStringCopy(label); 7232 _object->expgroup = psStringCopy(expgroup); 7233 _object->dvodb = psStringCopy(dvodb); 7144 7234 7145 7235 return _object; … … 7150 7240 psFree(object->exp_tag); 7151 7241 psFree(object->label); 7242 psFree(object->expgroup); 7243 psFree(object->dvodb); 7152 7244 } 7153 7245 … … 7175 7267 return false; 7176 7268 } 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 } 7177 7279 7178 7280 bool status = psDBCreateTable(dbh, P3PENDINGEXP_TABLE_NAME, md); … … 7188 7290 } 7189 7291 7190 bool p3PendingExpInsert(psDB * dbh, const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label )7292 bool p3PendingExpInsert(psDB * dbh, const char *exp_tag, psS32 p3_version, psS32 p2_version, const char *label, const char *expgroup, const char *dvodb) 7191 7293 { 7192 7294 psMetadata *md = psMetadataAlloc(); … … 7208 7310 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) { 7209 7311 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"); 7210 7322 psFree(md); 7211 7323 return false; … … 7234 7346 bool p3PendingExpInsertObject(psDB *dbh, p3PendingExpRow *object) 7235 7347 { 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); 7237 7349 } 7238 7350 … … 7327 7439 return false; 7328 7440 } 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 } 7329 7451 7330 7452 … … 7356 7478 return false; 7357 7479 } 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); 7360 7492 } 7361 7493 psArray *p3PendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7469 7601 static void p3ProcessedExpRowFree(p3ProcessedExpRow *object); 7470 7602 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 )7603 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, const char *expgroup, const char *dvodb) 7472 7604 { 7473 7605 p3ProcessedExpRow *_object; … … 7493 7625 _object->zp_stdev = zp_stdev; 7494 7626 _object->fault = fault; 7627 _object->expgroup = psStringCopy(expgroup); 7628 _object->dvodb = psStringCopy(dvodb); 7495 7629 7496 7630 return _object; … … 7505 7639 psFree(object->b1_uri); 7506 7640 psFree(object->b2_uri); 7641 psFree(object->expgroup); 7642 psFree(object->dvodb); 7507 7643 } 7508 7644 … … 7595 7731 return false; 7596 7732 } 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 } 7597 7743 7598 7744 bool status = psDBCreateTable(dbh, P3PROCESSEDEXP_TABLE_NAME, md); … … 7608 7754 } 7609 7755 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 )7756 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, const char *expgroup, const char *dvodb) 7611 7757 { 7612 7758 psMetadata *md = psMetadataAlloc(); … … 7693 7839 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) { 7694 7840 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"); 7695 7851 psFree(md); 7696 7852 return false; … … 7719 7875 bool p3ProcessedExpInsertObject(psDB *dbh, p3ProcessedExpRow *object) 7720 7876 { 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); 7722 7878 } 7723 7879 … … 7877 8033 return false; 7878 8034 } 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 } 7879 8045 7880 8046 … … 7971 8137 return false; 7972 8138 } 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); 7975 8151 } 7976 8152 psArray *p3ProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 13570 13746 static void p4RunRowFree(p4RunRow *object); 13571 13747 13572 p4RunRow *p4RunRowAlloc(psS32 p4_id, const char *mode, const char *state, const char *workdir, psTime* registered)13748 p4RunRow *p4RunRowAlloc(psS32 p4_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered) 13573 13749 { 13574 13750 p4RunRow *_object; … … 13581 13757 _object->state = psStringCopy(state); 13582 13758 _object->workdir = psStringCopy(workdir); 13759 _object->dvodb = psStringCopy(dvodb); 13583 13760 _object->registered = psTimeCopy(registered); 13584 13761 … … 13591 13768 psFree(object->state); 13592 13769 psFree(object->workdir); 13770 psFree(object->dvodb); 13593 13771 psFree(object->registered); 13594 13772 } … … 13617 13795 return false; 13618 13796 } 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 } 13619 13802 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, NULL)) { 13620 13803 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 13635 13818 } 13636 13819 13637 bool p4RunInsert(psDB * dbh, psS32 p4_id, const char *mode, const char *state, const char *workdir, psTime* registered)13820 bool p4RunInsert(psDB * dbh, psS32 p4_id, const char *mode, const char *state, const char *workdir, const char *dvodb, psTime* registered) 13638 13821 { 13639 13822 psMetadata *md = psMetadataAlloc(); … … 13655 13838 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 13656 13839 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"); 13657 13845 psFree(md); 13658 13846 return false; … … 13686 13874 bool p4RunInsertObject(psDB *dbh, p4RunRow *object) 13687 13875 { 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); 13689 13877 } 13690 13878 … … 13779 13967 return false; 13780 13968 } 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 } 13781 13974 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, object->registered)) { 13782 13975 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 13813 14006 return false; 13814 14007 } 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 } 13815 14013 psTime* registered = psMetadataLookupPtr(&status, md, "registered"); 13816 14014 if (!status) { … … 13819 14017 } 13820 14018 13821 return p4RunRowAlloc(p4_id, mode, state, workdir, registered);14019 return p4RunRowAlloc(p4_id, mode, state, workdir, dvodb, registered); 13822 14020 } 13823 14021 psArray *p4RunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 15074 15272 static void p5RunRowFree(p5RunRow *object); 15075 15273 15076 p5RunRow *p5RunRowAlloc(psS32 p5_id, const char *state, const char *workdir, psTime* registered)15274 p5RunRow *p5RunRowAlloc(psS32 p5_id, const char *state, const char *workdir, const char *dvodb, psTime* registered) 15077 15275 { 15078 15276 p5RunRow *_object; … … 15084 15282 _object->state = psStringCopy(state); 15085 15283 _object->workdir = psStringCopy(workdir); 15284 _object->dvodb = psStringCopy(dvodb); 15086 15285 _object->registered = psTimeCopy(registered); 15087 15286 … … 15093 15292 psFree(object->state); 15094 15293 psFree(object->workdir); 15294 psFree(object->dvodb); 15095 15295 psFree(object->registered); 15096 15296 } … … 15114 15314 return false; 15115 15315 } 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 } 15116 15321 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, NULL)) { 15117 15322 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 15132 15337 } 15133 15338 15134 bool p5RunInsert(psDB * dbh, psS32 p5_id, const char *state, const char *workdir, psTime* registered)15339 bool p5RunInsert(psDB * dbh, psS32 p5_id, const char *state, const char *workdir, const char *dvodb, psTime* registered) 15135 15340 { 15136 15341 psMetadata *md = psMetadataAlloc(); … … 15147 15352 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 15148 15353 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"); 15149 15359 psFree(md); 15150 15360 return false; … … 15178 15388 bool p5RunInsertObject(psDB *dbh, p5RunRow *object) 15179 15389 { 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); 15181 15391 } 15182 15392 … … 15266 15476 return false; 15267 15477 } 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 } 15268 15483 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, object->registered)) { 15269 15484 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 15295 15510 return false; 15296 15511 } 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 } 15297 15517 psTime* registered = psMetadataLookupPtr(&status, md, "registered"); 15298 15518 if (!status) { … … 15301 15521 } 15302 15522 15303 return p5RunRowAlloc(p5_id, state, workdir, registered);15523 return p5RunRowAlloc(p5_id, state, workdir, dvodb, registered); 15304 15524 } 15305 15525 psArray *p5RunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 16175 16395 static void p6RunRowFree(p6RunRow *object); 16176 16396 16177 p6RunRow *p6RunRowAlloc(psS32 p6_id, const char *state, const char *workdir, psTime* registered)16397 p6RunRow *p6RunRowAlloc(psS32 p6_id, const char *state, const char *workdir, const char *dvodb, psTime* registered) 16178 16398 { 16179 16399 p6RunRow *_object; … … 16185 16405 _object->state = psStringCopy(state); 16186 16406 _object->workdir = psStringCopy(workdir); 16407 _object->dvodb = psStringCopy(dvodb); 16187 16408 _object->registered = psTimeCopy(registered); 16188 16409 … … 16194 16415 psFree(object->state); 16195 16416 psFree(object->workdir); 16417 psFree(object->dvodb); 16196 16418 psFree(object->registered); 16197 16419 } … … 16215 16437 return false; 16216 16438 } 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 } 16217 16444 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, NULL)) { 16218 16445 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 16233 16460 } 16234 16461 16235 bool p6RunInsert(psDB * dbh, psS32 p6_id, const char *state, const char *workdir, psTime* registered)16462 bool p6RunInsert(psDB * dbh, psS32 p6_id, const char *state, const char *workdir, const char *dvodb, psTime* registered) 16236 16463 { 16237 16464 psMetadata *md = psMetadataAlloc(); … … 16248 16475 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 16249 16476 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"); 16250 16482 psFree(md); 16251 16483 return false; … … 16279 16511 bool p6RunInsertObject(psDB *dbh, p6RunRow *object) 16280 16512 { 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); 16282 16514 } 16283 16515 … … 16367 16599 return false; 16368 16600 } 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 } 16369 16606 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, object->registered)) { 16370 16607 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 16396 16633 return false; 16397 16634 } 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 } 16398 16640 psTime* registered = psMetadataLookupPtr(&status, md, "registered"); 16399 16641 if (!status) { … … 16402 16644 } 16403 16645 16404 return p6RunRowAlloc(p6_id, state, workdir, registered);16646 return p6RunRowAlloc(p6_id, state, workdir, dvodb, registered); 16405 16647 } 16406 16648 psArray *p6RunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
trunk/ippdb/src/ippdb.h
r11867 r11873 2716 2716 char *label; 2717 2717 char *recipe; 2718 char *expgroup; 2719 char *dvodb; 2718 2720 } p2PendingExpRow; 2719 2721 … … 2728 2730 psS32 p1_version, 2729 2731 const char *label, 2730 const char *recipe 2732 const char *recipe, 2733 const char *expgroup, 2734 const char *dvodb 2731 2735 ); 2732 2736 … … 2762 2766 psS32 p1_version, 2763 2767 const char *label, 2764 const char *recipe 2768 const char *recipe, 2769 const char *expgroup, 2770 const char *dvodb 2765 2771 ); 2766 2772 … … 3132 3138 psS32 p1_version; 3133 3139 char *label; 3140 char *expgroup; 3141 char *dvodb; 3134 3142 } p2ProcessedExpRow; 3135 3143 … … 3143 3151 psS32 p2_version, 3144 3152 psS32 p1_version, 3145 const char *label 3153 const char *label, 3154 const char *expgroup, 3155 const char *dvodb 3146 3156 ); 3147 3157 … … 3176 3186 psS32 p2_version, 3177 3187 psS32 p1_version, 3178 const char *label 3188 const char *label, 3189 const char *expgroup, 3190 const char *dvodb 3179 3191 ); 3180 3192 … … 3759 3771 psS32 p2_version; 3760 3772 char *label; 3773 char *expgroup; 3774 char *dvodb; 3761 3775 } p3PendingExpRow; 3762 3776 … … 3770 3784 psS32 p3_version, 3771 3785 psS32 p2_version, 3772 const char *label 3786 const char *label, 3787 const char *expgroup, 3788 const char *dvodb 3773 3789 ); 3774 3790 … … 3803 3819 psS32 p3_version, 3804 3820 psS32 p2_version, 3805 const char *label 3821 const char *label, 3822 const char *expgroup, 3823 const char *dvodb 3806 3824 ); 3807 3825 … … 3976 3994 psF32 zp_stdev; 3977 3995 psS16 fault; 3996 char *expgroup; 3997 char *dvodb; 3978 3998 } p3ProcessedExpRow; 3979 3999 … … 4000 4020 psF32 zp_mean, 4001 4021 psF32 zp_stdev, 4002 psS16 fault 4022 psS16 fault, 4023 const char *expgroup, 4024 const char *dvodb 4003 4025 ); 4004 4026 … … 4046 4068 psF32 zp_mean, 4047 4069 psF32 zp_stdev, 4048 psS16 fault 4070 psS16 fault, 4071 const char *expgroup, 4072 const char *dvodb 4049 4073 ); 4050 4074 … … 6855 6879 char *state; 6856 6880 char *workdir; 6881 char *dvodb; 6857 6882 psTime* registered; 6858 6883 } p4RunRow; … … 6868 6893 const char *state, 6869 6894 const char *workdir, 6895 const char *dvodb, 6870 6896 psTime* registered 6871 6897 ); … … 6902 6928 const char *state, 6903 6929 const char *workdir, 6930 const char *dvodb, 6904 6931 psTime* registered 6905 6932 ); … … 7691 7718 char *state; 7692 7719 char *workdir; 7720 char *dvodb; 7693 7721 psTime* registered; 7694 7722 } p5RunRow; … … 7703 7731 const char *state, 7704 7732 const char *workdir, 7733 const char *dvodb, 7705 7734 psTime* registered 7706 7735 ); … … 7736 7765 const char *state, 7737 7766 const char *workdir, 7767 const char *dvodb, 7738 7768 psTime* registered 7739 7769 ); … … 8315 8345 char *state; 8316 8346 char *workdir; 8347 char *dvodb; 8317 8348 psTime* registered; 8318 8349 } p6RunRow; … … 8327 8358 const char *state, 8328 8359 const char *workdir, 8360 const char *dvodb, 8329 8361 psTime* registered 8330 8362 ); … … 8360 8392 const char *state, 8361 8393 const char *workdir, 8394 const char *dvodb, 8362 8395 psTime* registered 8363 8396 ); -
trunk/ippdb/tests/alloc.c
r11867 r11873 532 532 p2PendingExpRow *object; 533 533 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" ); 535 535 536 536 if (!object) { … … 558 558 exit(EXIT_FAILURE); 559 559 } 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 } 560 568 561 569 psFree(object); … … 602 610 p2ProcessedExpRow *object; 603 611 604 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string" );612 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string" ); 605 613 606 614 if (!object) { … … 624 632 exit(EXIT_FAILURE); 625 633 } 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 } 626 642 627 643 psFree(object); … … 709 725 p3PendingExpRow *object; 710 726 711 object = p3PendingExpRowAlloc("a string", -32, -32, "a string" );727 object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string" ); 712 728 713 729 if (!object) { … … 731 747 exit(EXIT_FAILURE); 732 748 } 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 } 733 757 734 758 psFree(object); … … 738 762 p3ProcessedExpRow *object; 739 763 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" ); 741 765 742 766 if (!object) { … … 812 836 exit(EXIT_FAILURE); 813 837 } 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 } 814 846 815 847 psFree(object); … … 1430 1462 p4RunRow *object; 1431 1463 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" ); 1433 1465 1434 1466 if (!object) { … … 1452 1484 exit(EXIT_FAILURE); 1453 1485 } 1486 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 1487 psFree(object); 1488 exit(EXIT_FAILURE); 1489 } 1454 1490 psFree(object); 1455 1491 exit(EXIT_FAILURE); … … 1573 1609 p5RunRow *object; 1574 1610 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" ); 1576 1612 1577 1613 if (!object) { … … 1591 1627 exit(EXIT_FAILURE); 1592 1628 } 1629 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 1630 psFree(object); 1631 exit(EXIT_FAILURE); 1632 } 1593 1633 psFree(object); 1594 1634 exit(EXIT_FAILURE); … … 1675 1715 p6RunRow *object; 1676 1716 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" ); 1678 1718 1679 1719 if (!object) { … … 1690 1730 } 1691 1731 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)) { 1692 1736 psFree(object); 1693 1737 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r11867 r11873 193 193 } 194 194 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")) { 196 196 exit(EXIT_FAILURE); 197 197 } … … 223 223 } 224 224 225 if (!p2ProcessedExpInsert(dbh, "a string", -32, -32, "a string" )) {225 if (!p2ProcessedExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string")) { 226 226 exit(EXIT_FAILURE); 227 227 } … … 268 268 } 269 269 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")) { 286 286 exit(EXIT_FAILURE); 287 287 } … … 478 478 } 479 479 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")) { 481 481 exit(EXIT_FAILURE); 482 482 } … … 538 538 } 539 539 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")) { 541 541 exit(EXIT_FAILURE); 542 542 } … … 583 583 } 584 584 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")) { 586 586 exit(EXIT_FAILURE); 587 587 } -
trunk/ippdb/tests/insertobject.c
r11867 r11873 278 278 } 279 279 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"); 281 281 if (!object) { 282 282 exit(EXIT_FAILURE); … … 322 322 } 323 323 324 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string" );324 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 325 325 if (!object) { 326 326 exit(EXIT_FAILURE); … … 388 388 } 389 389 390 object = p3PendingExpRowAlloc("a string", -32, -32, "a string" );390 object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 391 391 if (!object) { 392 392 exit(EXIT_FAILURE); … … 410 410 } 411 411 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"); 413 413 if (!object) { 414 414 exit(EXIT_FAILURE); … … 696 696 } 697 697 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"); 699 699 if (!object) { 700 700 exit(EXIT_FAILURE); … … 784 784 } 785 785 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"); 787 787 if (!object) { 788 788 exit(EXIT_FAILURE); … … 850 850 } 851 851 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"); 853 853 if (!object) { 854 854 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r11867 r11873 627 627 bool status; 628 628 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"); 630 630 if (!object) { 631 631 exit(EXIT_FAILURE); … … 659 659 exit(EXIT_FAILURE); 660 660 } 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 } 661 669 662 670 psFree(md); … … 713 721 bool status; 714 722 715 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string" );723 object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 716 724 if (!object) { 717 725 exit(EXIT_FAILURE); … … 741 749 exit(EXIT_FAILURE); 742 750 } 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 } 743 759 744 760 psFree(md); … … 843 859 bool status; 844 860 845 object = p3PendingExpRowAlloc("a string", -32, -32, "a string" );861 object = p3PendingExpRowAlloc("a string", -32, -32, "a string", "a string", "a string"); 846 862 if (!object) { 847 863 exit(EXIT_FAILURE); … … 871 887 exit(EXIT_FAILURE); 872 888 } 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 } 873 897 874 898 psFree(md); … … 880 904 bool status; 881 905 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"); 883 907 if (!object) { 884 908 exit(EXIT_FAILURE); … … 959 983 exit(EXIT_FAILURE); 960 984 } 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 } 961 993 962 994 psFree(md); … … 1666 1698 bool status; 1667 1699 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"); 1669 1701 if (!object) { 1670 1702 exit(EXIT_FAILURE); … … 1694 1726 exit(EXIT_FAILURE); 1695 1727 } 1728 if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) { 1729 psFree(md); 1730 exit(EXIT_FAILURE); 1731 } 1696 1732 psFree(md); 1697 1733 exit(EXIT_FAILURE); … … 1841 1877 bool status; 1842 1878 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"); 1844 1880 if (!object) { 1845 1881 exit(EXIT_FAILURE); … … 1865 1901 exit(EXIT_FAILURE); 1866 1902 } 1903 if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) { 1904 psFree(md); 1905 exit(EXIT_FAILURE); 1906 } 1867 1907 psFree(md); 1868 1908 exit(EXIT_FAILURE); … … 1967 2007 bool status; 1968 2008 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"); 1970 2010 if (!object) { 1971 2011 exit(EXIT_FAILURE); … … 1988 2028 } 1989 2029 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)) { 1990 2034 psFree(md); 1991 2035 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r11867 r11873 973 973 exit(EXIT_FAILURE); 974 974 } 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 } 975 983 976 984 object = p2PendingExpObjectFromMetadata(md); … … 1002 1010 exit(EXIT_FAILURE); 1003 1011 } 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 } 1004 1020 1005 1021 psFree(object); … … 1093 1109 exit(EXIT_FAILURE); 1094 1110 } 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 } 1095 1119 1096 1120 object = p2ProcessedExpObjectFromMetadata(md); … … 1118 1142 exit(EXIT_FAILURE); 1119 1143 } 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 } 1120 1152 1121 1153 psFree(object); … … 1281 1313 exit(EXIT_FAILURE); 1282 1314 } 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 } 1283 1323 1284 1324 object = p3PendingExpObjectFromMetadata(md); … … 1306 1346 exit(EXIT_FAILURE); 1307 1347 } 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 } 1308 1356 1309 1357 psFree(object); … … 1382 1430 exit(EXIT_FAILURE); 1383 1431 } 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 } 1384 1440 1385 1441 object = p3ProcessedExpObjectFromMetadata(md); … … 1458 1514 exit(EXIT_FAILURE); 1459 1515 } 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 } 1460 1524 1461 1525 psFree(object); … … 2591 2655 exit(EXIT_FAILURE); 2592 2656 } 2657 if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) { 2658 psFree(md); 2659 exit(EXIT_FAILURE); 2660 } 2593 2661 psFree(md); 2594 2662 exit(EXIT_FAILURE); … … 2619 2687 exit(EXIT_FAILURE); 2620 2688 } 2689 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 2690 psFree(object); 2691 exit(EXIT_FAILURE); 2692 } 2621 2693 psFree(object); 2622 2694 exit(EXIT_FAILURE); … … 2841 2913 exit(EXIT_FAILURE); 2842 2914 } 2915 if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) { 2916 psFree(md); 2917 exit(EXIT_FAILURE); 2918 } 2843 2919 psFree(md); 2844 2920 exit(EXIT_FAILURE); … … 2865 2941 exit(EXIT_FAILURE); 2866 2942 } 2943 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 2944 psFree(object); 2945 exit(EXIT_FAILURE); 2946 } 2867 2947 psFree(object); 2868 2948 exit(EXIT_FAILURE); … … 3021 3101 exit(EXIT_FAILURE); 3022 3102 } 3103 if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) { 3104 psFree(md); 3105 exit(EXIT_FAILURE); 3106 } 3023 3107 psFree(md); 3024 3108 exit(EXIT_FAILURE); … … 3042 3126 } 3043 3127 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)) { 3044 3132 psFree(object); 3045 3133 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
