00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "config.h"
00039
00040 #ifndef lint
00041 static const char revid[] = "$Id: hash__dup_8c-source.html,v 1.1 2008/06/08 10:19:25 sebdiaz Exp $";
00042 #endif
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #ifndef NO_SYSTEM_INCLUDES
00058 #include <sys/types.h>
00059
00060 #include <errno.h>
00061 #include <string.h>
00062 #endif
00063
00064 #include "db_int.h"
00065 #include "db_page.h"
00066 #include "hash.h"
00067 #include "btree.h"
00068
00069 static int __ham_check_move __P((DBC *, u_int32_t));
00070 static int __ham_dcursor __P((DBC *, db_pgno_t, u_int32_t));
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 int
00088 CDB___ham_add_dup(dbc, nval, flags, pgnop)
00089 DBC *dbc;
00090 DBT *nval;
00091 u_int32_t flags;
00092 db_pgno_t *pgnop;
00093 {
00094 DB *dbp;
00095 HASH_CURSOR *hcp;
00096 DBT pval, tmp_val;
00097 u_int32_t add_bytes, new_size;
00098 int cmp, ret;
00099 u_int8_t *hk;
00100
00101 dbp = dbc->dbp;
00102 hcp = (HASH_CURSOR *)dbc->internal;
00103
00104 DB_ASSERT(flags != DB_CURRENT);
00105
00106 add_bytes = nval->size +
00107 (F_ISSET(nval, DB_DBT_PARTIAL) ? nval->doff : 0);
00108 add_bytes = DUP_SIZE(add_bytes);
00109
00110 if ((ret = __ham_check_move(dbc, add_bytes)) != 0)
00111 return (ret);
00112
00113
00114
00115
00116
00117
00118
00119
00120 hk = H_PAIRDATA(hcp->page, hcp->indx);
00121 new_size =
00122 LEN_HKEYDATA(hcp->page, dbp->pgsize, H_DATAINDEX(hcp->indx)) +
00123 add_bytes;
00124
00125
00126
00127
00128
00129
00130 if (HPAGE_PTYPE(hk) != H_OFFDUP &&
00131 (HPAGE_PTYPE(hk) == H_OFFPAGE || ISBIG(hcp, new_size) ||
00132 add_bytes > P_FREESPACE(hcp->page))) {
00133
00134 if ((ret = CDB___ham_dup_convert(dbc)) != 0)
00135 return (ret);
00136 return(hcp->opd->c_am_put(hcp->opd,
00137 NULL, nval, flags, NULL));
00138 }
00139
00140
00141 if (HPAGE_PTYPE(hk) != H_OFFDUP) {
00142 if (HPAGE_PTYPE(hk) != H_DUPLICATE) {
00143 pval.flags = 0;
00144 pval.data = HKEYDATA_DATA(hk);
00145 pval.size = LEN_HDATA(hcp->page, dbp->pgsize,
00146 hcp->indx);
00147 if ((ret = CDB___ham_make_dup(dbp->dbenv,
00148 &pval, &tmp_val, &dbc->rdata.data,
00149 &dbc->rdata.ulen)) != 0 || (ret =
00150 CDB___ham_replpair(dbc, &tmp_val, 1)) != 0)
00151 return (ret);
00152 hk = H_PAIRDATA(hcp->page, hcp->indx);
00153 HPAGE_PTYPE(hk) = H_DUPLICATE;
00154
00155
00156
00157
00158
00159 F_SET(hcp, H_ISDUP);
00160 hcp->dup_off = 0;
00161 hcp->dup_len = pval.size;
00162 hcp->dup_tlen = DUP_SIZE(hcp->dup_len);
00163 }
00164
00165
00166 if ((ret = CDB___ham_make_dup(dbp->dbenv, nval,
00167 &tmp_val, &dbc->rdata.data, &dbc->rdata.ulen)) != 0)
00168 return (ret);
00169
00170 tmp_val.dlen = 0;
00171 switch (flags) {
00172 case DB_KEYFIRST:
00173 case DB_KEYLAST:
00174 case DB_NODUPDATA:
00175 if (dbp->dup_compare != NULL) {
00176 CDB___ham_dsearch(dbc, nval, &tmp_val.doff, &cmp);
00177
00178
00179 if (cmp == 0)
00180 return (CDB___db_duperr(dbp, flags));
00181 } else {
00182 hcp->dup_tlen = LEN_HDATA(hcp->page,
00183 dbp->pgsize, hcp->indx);
00184 hcp->dup_len = nval->size;
00185 F_SET(hcp, H_ISDUP);
00186 if (flags == DB_KEYFIRST)
00187 hcp->dup_off = tmp_val.doff = 0;
00188 else
00189 hcp->dup_off =
00190 tmp_val.doff = hcp->dup_tlen;
00191 }
00192 break;
00193 case DB_BEFORE:
00194 tmp_val.doff = hcp->dup_off;
00195 break;
00196 case DB_AFTER:
00197 tmp_val.doff = hcp->dup_off + DUP_SIZE(hcp->dup_len);
00198 break;
00199 }
00200
00201 ret = CDB___ham_replpair(dbc, &tmp_val, 0);
00202 if (ret == 0)
00203 ret = CDB___ham_dirty_page(dbp, hcp->page);
00204
00205
00206 switch (flags) {
00207 case DB_AFTER:
00208 hcp->dup_off += DUP_SIZE(hcp->dup_len);
00209 hcp->dup_len = nval->size;
00210 hcp->dup_tlen += DUP_SIZE(nval->size);
00211 break;
00212 case DB_KEYFIRST:
00213 case DB_KEYLAST:
00214 case DB_BEFORE:
00215 hcp->dup_tlen += DUP_SIZE(nval->size);
00216 hcp->dup_len = nval->size;
00217 break;
00218 }
00219 CDB___ham_c_update(dbc, hcp->pgno, tmp_val.size, 1, 1);
00220 return (ret);
00221 }
00222
00223
00224
00225
00226
00227 memcpy(pgnop,
00228 HOFFDUP_PGNO(H_PAIRDATA(hcp->page, hcp->indx)), sizeof(db_pgno_t));
00229
00230 return (ret);
00231 }
00232
00233
00234
00235
00236
00237
00238 int
00239 CDB___ham_dup_convert(dbc)
00240 DBC *dbc;
00241 {
00242 DB *dbp;
00243 DBC **hcs;
00244 PAGE *dp;
00245 HASH_CURSOR *hcp;
00246 BOVERFLOW bo;
00247 DBT dbt;
00248 HOFFPAGE ho;
00249 db_indx_t i, len, off;
00250 int c, ret, t_ret;
00251 u_int8_t *p, *pend;
00252
00253 dbp = dbc->dbp;
00254 hcp = (HASH_CURSOR *)dbc->internal;
00255
00256
00257
00258
00259 if ((ret = CDB___db_new(dbc,
00260 ((dbp->dup_compare == NULL ? P_LRECNO : P_LDUP) | dbp->tags), &dp)) != 0)
00261 return (ret);
00262 P_INIT(dp, dbp->pgsize,
00263 dp->pgno, PGNO_INVALID, PGNO_INVALID, LEAFLEVEL, TYPE(dp), TAGS(dp));
00264
00265
00266
00267
00268 if ((ret = CDB___ham_get_clist(dbp,
00269 PGNO(hcp->page), (u_int32_t)hcp->indx, &hcs)) != 0)
00270 return (ret);
00271
00272
00273
00274
00275 dbt.flags = 0;
00276 switch (HPAGE_PTYPE(H_PAIRDATA(hcp->page, hcp->indx))) {
00277 case H_KEYDATA:
00278
00279 dbt.size = LEN_HDATA(hcp->page, dbp->pgsize, hcp->indx);
00280 dbt.data = HKEYDATA_DATA(H_PAIRDATA(hcp->page, hcp->indx));
00281 ret = CDB___db_pitem(dbc,
00282 dp, 0, BKEYDATA_SIZE(dbt.size), NULL, &dbt);
00283 goto finish;
00284 case H_OFFPAGE:
00285
00286 memcpy(&ho,
00287 P_ENTRY(hcp->page, H_DATAINDEX(hcp->indx)), HOFFPAGE_SIZE);
00288 UMRW(bo.unused1);
00289 B_TSET(bo.type, ho.type, 0);
00290 UMRW(bo.unused2);
00291 bo.pgno = ho.pgno;
00292 bo.tlen = ho.tlen;
00293 dbt.size = BOVERFLOW_SIZE;
00294 dbt.data = &bo;
00295
00296 ret = CDB___db_pitem(dbc, dp, 0, dbt.size, &dbt, NULL);
00297
00298 finish: if (ret == 0) {
00299 CDB___ham_dirty_page(dbp, dp);
00300
00301
00302
00303 for (c = 0; hcs != NULL && hcs[c] != NULL; c++)
00304 if ((ret = __ham_dcursor(hcs[c],
00305 PGNO(dp), 0)) != 0)
00306 break;
00307 }
00308 break;
00309
00310 case H_DUPLICATE:
00311 p = HKEYDATA_DATA(H_PAIRDATA(hcp->page, hcp->indx));
00312 pend = p +
00313 LEN_HDATA(hcp->page, dbp->pgsize, hcp->indx);
00314
00315
00316
00317
00318
00319
00320
00321
00322 for (off = 0, i = 0; p < pend; i++) {
00323 memcpy(&len, p, sizeof(db_indx_t));
00324 dbt.size = len;
00325 p += sizeof(db_indx_t);
00326 dbt.data = p;
00327 p += len + sizeof(db_indx_t);
00328 if ((ret = CDB___db_pitem(dbc, dp,
00329 i, BKEYDATA_SIZE(dbt.size), NULL, &dbt)) != 0)
00330 break;
00331
00332
00333
00334 for (c = 0; hcs != NULL && hcs[c] != NULL; c++)
00335 if (((HASH_CURSOR *)(hcs[c]->internal))->dup_off
00336 == off && (ret = __ham_dcursor(hcs[c],
00337 PGNO(dp), i)) != 0)
00338 goto out;
00339 off += len + 2 * sizeof(db_indx_t);
00340 }
00341 out: break;
00342
00343 default:
00344 ret = CDB___db_pgfmt(dbp, (u_long)hcp->pgno);
00345 break;
00346 }
00347 if (ret == 0) {
00348
00349
00350
00351
00352 CDB___ham_move_offpage(dbc, hcp->page,
00353 (u_int32_t)H_DATAINDEX(hcp->indx), PGNO(dp));
00354
00355 ret = CDB___ham_dirty_page(dbp, hcp->page);
00356 if ((t_ret = CDB___ham_put_page(dbp, dp, 1)) != 0)
00357 ret = t_ret;
00358 hcp->dup_tlen = hcp->dup_off = hcp->dup_len = 0;
00359 } else
00360 (void)CDB___db_free(dbc, dp);
00361
00362 if (hcs != NULL)
00363 CDB___os_free(hcs, 0);
00364
00365 return (ret);
00366 }
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378 int
00379 CDB___ham_make_dup(dbenv, notdup, duplicate, bufp, sizep)
00380 DB_ENV *dbenv;
00381 const DBT *notdup;
00382 DBT *duplicate;
00383 void **bufp;
00384 u_int32_t *sizep;
00385 {
00386 db_indx_t tsize, item_size;
00387 int ret;
00388 u_int8_t *p;
00389
00390 item_size = (db_indx_t)notdup->size;
00391 if (F_ISSET(notdup, DB_DBT_PARTIAL))
00392 item_size += notdup->doff;
00393
00394 tsize = DUP_SIZE(item_size);
00395 if ((ret = CDB___ham_init_dbt(dbenv, duplicate, tsize, bufp, sizep)) != 0)
00396 return (ret);
00397
00398 duplicate->dlen = 0;
00399 duplicate->flags = notdup->flags;
00400 F_SET(duplicate, DB_DBT_PARTIAL);
00401
00402 p = duplicate->data;
00403 memcpy(p, &item_size, sizeof(db_indx_t));
00404 p += sizeof(db_indx_t);
00405 if (F_ISSET(notdup, DB_DBT_PARTIAL)) {
00406 memset(p, 0, notdup->doff);
00407 p += notdup->doff;
00408 }
00409 memcpy(p, notdup->data, notdup->size);
00410 p += notdup->size;
00411 memcpy(p, &item_size, sizeof(db_indx_t));
00412
00413 duplicate->doff = 0;
00414 duplicate->dlen = notdup->size;
00415
00416 return (0);
00417 }
00418
00419
00420
00421
00422
00423
00424
00425 static int
00426 __ham_check_move(dbc, add_len)
00427 DBC *dbc;
00428 u_int32_t add_len;
00429 {
00430 DB *dbp;
00431 HASH_CURSOR *hcp;
00432 DBT k, d;
00433 DB_LSN new_lsn;
00434 PAGE *next_pagep;
00435 db_pgno_t next_pgno;
00436 u_int32_t new_datalen, old_len, rectype;
00437 u_int8_t *hk;
00438 int ret;
00439
00440 dbp = dbc->dbp;
00441 hcp = (HASH_CURSOR *)dbc->internal;
00442
00443 hk = H_PAIRDATA(hcp->page, hcp->indx);
00444
00445
00446
00447
00448
00449 if (HPAGE_PTYPE(hk) == H_OFFDUP || HPAGE_PTYPE(hk) == H_OFFPAGE)
00450 return (0);
00451
00452 old_len = LEN_HITEM(hcp->page, dbp->pgsize, H_DATAINDEX(hcp->indx));
00453 new_datalen = old_len - HKEYDATA_SIZE(0) + add_len;
00454 if (HPAGE_PTYPE(hk) != H_DUPLICATE)
00455 new_datalen += DUP_SIZE(0);
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465 if (ISBIG(hcp, new_datalen) && (old_len > HOFFDUP_SIZE ||
00466 HOFFDUP_SIZE - old_len <= P_FREESPACE(hcp->page)))
00467 return (0);
00468
00469 if (!ISBIG(hcp, new_datalen) && add_len <= P_FREESPACE(hcp->page))
00470 return (0);
00471
00472
00473
00474
00475
00476
00477 new_datalen = ISBIG(hcp, new_datalen) ?
00478 HOFFDUP_SIZE : HKEYDATA_SIZE(new_datalen);
00479
00480 next_pagep = NULL;
00481 for (next_pgno = NEXT_PGNO(hcp->page); next_pgno != PGNO_INVALID;
00482 next_pgno = NEXT_PGNO(next_pagep)) {
00483 if (next_pagep != NULL &&
00484 (ret = CDB___ham_put_page(dbp, next_pagep, 0)) != 0)
00485 return (ret);
00486
00487 if ((ret =
00488 CDB___ham_get_page(dbp, next_pgno, &next_pagep)) != 0)
00489 return (ret);
00490
00491 if (P_FREESPACE(next_pagep) >= new_datalen)
00492 break;
00493 }
00494
00495
00496 if (next_pagep == NULL && (ret = CDB___ham_add_ovflpage(dbc,
00497 hcp->page, 0, &next_pagep)) != 0)
00498 return (ret);
00499
00500
00501 if (P_FREESPACE(next_pagep) < new_datalen && (ret =
00502 CDB___ham_add_ovflpage(dbc, next_pagep, 1, &next_pagep)) != 0) {
00503 (void)CDB___ham_put_page(dbp, next_pagep, 0);
00504 return (ret);
00505 }
00506
00507
00508 if (DB_LOGGING(dbc)) {
00509 rectype = PUTPAIR;
00510 k.flags = 0;
00511 d.flags = 0;
00512 if (HPAGE_PTYPE(
00513 H_PAIRKEY(hcp->page, hcp->indx)) == H_OFFPAGE) {
00514 rectype |= PAIR_KEYMASK;
00515 k.data = H_PAIRKEY(hcp->page, hcp->indx);
00516 k.size = HOFFPAGE_SIZE;
00517 } else {
00518 k.data =
00519 HKEYDATA_DATA(H_PAIRKEY(hcp->page, hcp->indx));
00520 k.size = LEN_HKEY(hcp->page, dbp->pgsize, hcp->indx);
00521 }
00522
00523 if (HPAGE_PTYPE(hk) == H_OFFPAGE) {
00524 rectype |= PAIR_DATAMASK;
00525 d.data = H_PAIRDATA(hcp->page, hcp->indx);
00526 d.size = HOFFPAGE_SIZE;
00527 } else {
00528 if (HPAGE_PTYPE(H_PAIRDATA(hcp->page, hcp->indx))
00529 == H_DUPLICATE)
00530 rectype |= PAIR_DUPMASK;
00531 d.data =
00532 HKEYDATA_DATA(H_PAIRDATA(hcp->page, hcp->indx));
00533 d.size = LEN_HDATA(hcp->page, dbp->pgsize, hcp->indx);
00534 }
00535
00536 if ((ret = CDB___ham_insdel_log(dbp->dbenv,
00537 dbc->txn, &new_lsn, 0, rectype,
00538 dbp->log_fileid, PGNO(next_pagep),
00539 (u_int32_t)NUM_ENT(next_pagep), &LSN(next_pagep),
00540 &k, &d)) != 0)
00541 return (ret);
00542
00543
00544 LSN(next_pagep) = new_lsn;
00545 }
00546
00547 CDB___ham_copy_item(dbp->pgsize,
00548 hcp->page, H_KEYINDEX(hcp->indx), next_pagep);
00549 CDB___ham_copy_item(dbp->pgsize,
00550 hcp->page, H_DATAINDEX(hcp->indx), next_pagep);
00551
00552
00553 CDB___ham_c_chgpg(dbc, PGNO(hcp->page), H_KEYINDEX(hcp->indx),
00554 PGNO(next_pagep), NUM_ENT(next_pagep) - 2);
00555
00556
00557 ret = CDB___ham_del_pair(dbc, 0);
00558
00559
00560
00561
00562
00563
00564 if (!STD_LOCKING(dbc))
00565 hcp->hdr->nelem++;
00566
00567 (void)CDB___ham_put_page(dbp, hcp->page, 1);
00568 hcp->page = next_pagep;
00569 hcp->pgno = PGNO(hcp->page);
00570 hcp->indx = NUM_ENT(hcp->page) - 2;
00571 F_SET(hcp, H_EXPAND);
00572 return (ret);
00573 }
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586 void
00587 CDB___ham_move_offpage(dbc, pagep, ndx, pgno)
00588 DBC *dbc;
00589 PAGE *pagep;
00590 u_int32_t ndx;
00591 db_pgno_t pgno;
00592 {
00593 DB *dbp;
00594 HASH_CURSOR *hcp;
00595 DBT new_dbt;
00596 DBT old_dbt;
00597 HOFFDUP od;
00598 db_indx_t i;
00599 int32_t shrink;
00600 u_int8_t *src;
00601
00602 dbp = dbc->dbp;
00603 hcp = (HASH_CURSOR *)dbc->internal;
00604 od.type = H_OFFDUP;
00605 UMRW(od.unused[0]);
00606 UMRW(od.unused[1]);
00607 UMRW(od.unused[2]);
00608 od.pgno = pgno;
00609
00610 if (DB_LOGGING(dbc)) {
00611 new_dbt.data = &od;
00612 new_dbt.size = HOFFDUP_SIZE;
00613 old_dbt.data = P_ENTRY(pagep, ndx);
00614 old_dbt.size = LEN_HITEM(pagep, dbp->pgsize, ndx);
00615 (void)CDB___ham_replace_log(dbp->dbenv,
00616 dbc->txn, &LSN(pagep), 0, dbp->log_fileid,
00617 PGNO(pagep), (u_int32_t)ndx, &LSN(pagep), -1,
00618 &old_dbt, &new_dbt, 0);
00619 }
00620
00621 shrink = LEN_HITEM(pagep, dbp->pgsize, ndx) - HOFFDUP_SIZE;
00622
00623 if (shrink != 0) {
00624
00625 src = (u_int8_t *)(pagep) + HOFFSET(pagep);
00626 memmove(src + shrink, src, pagep->inp[ndx] - HOFFSET(pagep));
00627 HOFFSET(pagep) += shrink;
00628
00629
00630 for (i = ndx; i < NUM_ENT(pagep); i++)
00631 pagep->inp[i] += shrink;
00632 }
00633
00634
00635 memcpy(P_ENTRY(pagep, ndx), &od, HOFFDUP_SIZE);
00636 }
00637
00638
00639
00640
00641
00642
00643
00644
00645 void
00646 CDB___ham_dsearch(dbc, dbt, offp, cmpp)
00647 DBC *dbc;
00648 DBT *dbt;
00649 u_int32_t *offp;
00650 int *cmpp;
00651 {
00652 DB *dbp;
00653 HASH_CURSOR *hcp;
00654 DBT cur;
00655 db_indx_t i, len;
00656 int (*func) __P((const DBT *, const DBT *));
00657 u_int8_t *data;
00658
00659 dbp = dbc->dbp;
00660 hcp = (HASH_CURSOR *)dbc->internal;
00661 if (dbp->dup_compare == NULL)
00662 func = CDB___bam_defcmp;
00663 else
00664 func = dbp->dup_compare;
00665
00666 i = F_ISSET(hcp, H_CONTINUE) ? hcp->dup_off: 0;
00667 data = HKEYDATA_DATA(H_PAIRDATA(hcp->page, hcp->indx)) + i;
00668 hcp->dup_tlen = LEN_HDATA(hcp->page, dbp->pgsize, hcp->indx);
00669 while (i < hcp->dup_tlen) {
00670 memcpy(&len, data, sizeof(db_indx_t));
00671 data += sizeof(db_indx_t);
00672 cur.data = data;
00673 cur.size = (u_int32_t)len;
00674 *cmpp = func(dbt, &cur);
00675 if (*cmpp == 0 || (*cmpp < 0 && dbp->dup_compare != NULL))
00676 break;
00677 i += len + 2 * sizeof(db_indx_t);
00678 data += len + sizeof(db_indx_t);
00679 }
00680 *offp = i;
00681 hcp->dup_off = i;
00682 hcp->dup_len = len;
00683 F_SET(hcp, H_ISDUP);
00684 }
00685
00686 #ifdef DEBUG
00687
00688
00689
00690
00691
00692
00693 int
00694 CDB___ham_cprint(dbp)
00695 DB *dbp;
00696 {
00697 HASH_CURSOR *cp;
00698 DBC *dbc;
00699
00700 MUTEX_THREAD_LOCK(dbp->mutexp);
00701 for (dbc = TAILQ_FIRST(&dbp->active_queue);
00702 dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
00703 cp = (HASH_CURSOR *)dbc->internal;
00704 fprintf(stderr, "%#0lx->%#0lx: page: %lu index: %lu",
00705 P_TO_ULONG(dbc), P_TO_ULONG(cp), (u_long)cp->pgno,
00706 (u_long)cp->indx);
00707 if (F_ISSET(cp, H_DELETED))
00708 fprintf(stderr, " (deleted)");
00709 fprintf(stderr, "\n");
00710 }
00711 MUTEX_THREAD_UNLOCK(dbp->mutexp);
00712
00713 return (0);
00714 }
00715 #endif
00716
00717
00718
00719
00720
00721
00722 static int
00723 __ham_dcursor(dbc, pgno, indx)
00724 DBC *dbc;
00725 db_pgno_t pgno;
00726 u_int32_t indx;
00727 {
00728 DB *dbp;
00729 DBC *dbc_nopd;
00730 HASH_CURSOR *hcp;
00731 BTREE_CURSOR *dcp;
00732 int ret;
00733
00734 dbp = dbc->dbp;
00735
00736 dbc_nopd = NULL;
00737 if ((ret = CDB___db_icursor(dbp, dbc->txn,
00738 dbp->dup_compare == NULL ? DB_RECNO : DB_BTREE,
00739 pgno, 1, &dbc_nopd)) != 0)
00740 return (ret);
00741
00742 dcp = (BTREE_CURSOR *)dbc_nopd->internal;
00743 dcp->pgno = pgno;
00744 dcp->indx = indx;
00745
00746 if (dbp->dup_compare == NULL) {
00747
00748
00749
00750
00751
00752 dcp->recno = indx + 1;
00753 }
00754
00755
00756
00757
00758
00759 hcp = (HASH_CURSOR *)dbc->internal;
00760 if (F_ISSET(hcp, H_DELETED)) {
00761 F_SET(dcp, C_DELETED);
00762 F_CLR(hcp, H_DELETED);
00763 }
00764
00765
00766 hcp->opd = dbc_nopd;
00767
00768 return (0);
00769 }