Debian Codegraph @

docs/api_reference/CXX/dbstat.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>Db::stat()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10 <link rel="up" href="db.html" title="Chapter 2.  The Db Handle" />
11 <link rel="prev" href="dbsort_multiple.html" title="Db::sort_multiple()" />
12 <link rel="next" href="dbstat_print.html" title="Db::stat_print()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">Db::stat()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="dbsort_multiple.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 2. 
26 The Db Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="dbstat_print.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="dbstat"></a>Db::stat()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 Db::stat(void *sp, u_int32_t flags); </pre>
45 <p>
46 The <code class="methodname">Db::stat()</code> method creates a statistical structure and copies a
47 pointer to it into user-specified memory locations. Specifically, if
48 <span class="bold"><strong>sp</strong></span> is non-NULL, a pointer to the
49 statistics for the database are copied into the memory location to
50 which it refers.
51 </p>
52 <p>
53 The <code class="methodname">Db::stat()</code> <span>
54
55 <span>
56 method either returns a non-zero error value or throws an
57 exception that encapsulates a non-zero error value on
58 failure, and returns 0 on success.
59 </span>
60 </span>
61 </p>
62 <div class="sect2" lang="en" xml:lang="en">
63 <div class="titlepage">
64 <div>
65 <div>
66 <h3 class="title"><a id="idp5871280"></a>Parameters</h3>
67 </div>
68 </div>
69 </div>
70 <div class="sect3" lang="en" xml:lang="en">
71 <div class="titlepage">
72 <div>
73 <div>
74 <h4 class="title"><a id="idp5875080"></a>txnid</h4>
75 </div>
76 </div>
77 </div>
78 <p>
79 If the operation is part of an application-specified transaction, the
80 <span class="bold"><strong>txnid</strong></span> parameter is a transaction
81 handle returned from <a class="xref" href="txnbegin.html" title="DbEnv::txn_begin()">DbEnv::txn_begin()</a>; if the
82 operation is part of a Berkeley DB Concurrent Data Store group, the
83 <span class="bold"><strong>txnid</strong></span> parameter is a handle returned
84 from <a class="xref" href="envcdsgroup_begin.html" title="DbEnv::cdsgroup_begin()">DbEnv::cdsgroup_begin()</a>;
85 otherwise NULL. If no transaction handle is specified, but the
86 operation occurs in a transactional database, the operation will be
87 implicitly transaction protected.
88 </p>
89 </div>
90 <div class="sect3" lang="en" xml:lang="en">
91 <div class="titlepage">
92 <div>
93 <div>
94 <h4 class="title"><a id="idp5844600"></a>flags</h4>
95 </div>
96 </div>
97 </div>
98 <p>
99 The <span class="bold"><strong>flags</strong></span> parameter must be set to 0
100 or one of the following values:
101 </p>
102 <div class="itemizedlist">
103 <ul type="disc">
104 <li>
105 <p><a id="stat_DB_FAST_STAT"></a>
106 <code class="literal">DB_FAST_STAT</code>
107 </p>
108 <p>
109 Return only the values which do not require traversal of the database.
110 Among other things, this flag makes it possible for applications to
111 request key and record counts without incurring the performance
112 penalty of traversing the entire database.
113 </p>
114 </li>
115 <li>
116 <p><a id="stat_DB_READ_COMMITTED"></a>
117 <code class="literal">DB_READ_COMMITTED</code>
118 </p>
119 <p>
120 Database items read during a transactional call will have degree 2
121 isolation. This ensures the stability of the data items read during
122 the stat operation but permits that data to be modified or deleted by
123 other transactions prior to the commit of the specified transaction.
124 </p>
125 </li>
126 <li>
127 <p><a id="stat_DB_READ_UNCOMMITTED"></a>
128 <code class="literal">DB_READ_UNCOMMITTED</code>
129 </p>
130 <p>
131 Database items read during a transactional call will have degree 1
132 isolation, including modified but not yet committed data. Silently
133 ignored if the
134 <a class="link" href="dbopen.html#dbopen_DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a>
135 flag was not specified when the underlying database was opened.
136 </p>
137 </li>
138 </ul>
139 </div>
140 </div>
141 </div>
142 <div class="sect2" lang="en" xml:lang="en">
143 <div class="titlepage">
144 <div>
145 <div>
146 <h3 class="title"><a id="idp5895432"></a>Statistical Structure</h3>
147 </div>
148 </div>
149 </div>
150 <p>
151 Statistical structures are stored in allocated memory. If
152 application-specific allocation routines have been declared (see
153 <a class="xref" href="envset_alloc.html" title="DbEnv::set_alloc()">DbEnv::set_alloc()</a>
154 for more information), they are used to allocate the
155 memory; otherwise, the standard C library
156 <span class="bold"><strong>malloc</strong></span>(3) is used. The caller is
157 responsible for deallocating the memory. To deallocate the memory, free the
158 memory reference; references inside the returned memory need not be
159 individually freed.
160 </p>
161 <p>
162 If the DB_FAST_STAT flag has not been specified, the
163 <code class="methodname">Db::stat()</code> method will
164 access some of or all the pages in the database, incurring a severe
165 performance penalty as well as possibly flushing the underlying buffer pool.
166 </p>
167 <p>
168 In the presence of multiple threads or processes accessing an active
169 database, the information returned by DB-&gt;stat may be out-of-date.
170 </p>
171 <p>
172 If the database was not opened read-only and the DB_FAST_STAT flag was not
173 specified, the cached key and record numbers will be updated after the
174 statistical information has been gathered.
175 </p>
176 <p>
177 The <code class="methodname">Db::stat()</code> method may not be called before the
178 <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a>
179 method is called.
180 </p>
181 <p>
182 The <code class="methodname">Db::stat()</code> method returns
183 a non-zero error value on failure and 0 on success.
184 </p>
185 <div class="sect3" lang="en" xml:lang="en">
186 <div class="titlepage">
187 <div>
188 <div>
189 <h4 class="title"><a id="idp5900920"></a>Hash Statistics</h4>
190 </div>
191 </div>
192 </div>
193 <p>
194 In the case of a Hash database, the statistics are stored in a
195 structure of type <code class="literal">DB_HASH_STAT</code>. The following fields will be filled
196 in:
197 </p>
198 <div class="itemizedlist">
199 <ul type="disc">
200 <li>
201 <p>
202 <code class="literal">uintmax_t hash_bfree;</code>
203 </p>
204 <p>
205 The number of bytes free on bucket pages.
206 </p>
207 </li>
208 <li>
209 <p>
210 <code class="literal">u_int32_t hash_bigpages;</code>
211 </p>
212 <p>
213 The number of big key/data pages.
214 </p>
215 </li>
216 <li>
217 <p>
218 <code class="literal">uintmax_t hash_big_bfree;</code>
219 </p>
220 <p>
221 The number of bytes free on big item pages.
222 </p>
223 </li>
224 <li>
225 <p>
226 <code class="literal">u_int32_t hash_buckets;</code>
227 </p>
228 <p>
229 The number of hash buckets. Returned if DB_FAST_STAT is set.
230 </p>
231 </li>
232 <li>
233 <p>
234 <code class="literal">u_int32_t hash_dup;</code>
235 </p>
236 <p>
237 The number of duplicate pages.
238 </p>
239 </li>
240 <li>
241 <p>
242 <code class="literal">uintmax_t hash_dup_free;</code>
243 </p>
244 <p>
245 The number of bytes free on duplicate pages.
246 </p>
247 </li>
248 <li>
249 <p>
250 <code class="literal">u_int32_t hash_ffactor;</code>
251 </p>
252 <p>
253 The desired fill factor (number of items per bucket) specified at
254 database-creation time. Returned if DB_FAST_STAT is set.
255 </p>
256 </li>
257 <li>
258 <p>
259 <code class="literal">u_int32_t hash_free;</code>
260 </p>
261 <p>
262 The number of pages on the free list.
263 </p>
264 </li>
265 <li>
266 <p>
267 <code class="literal">u_int32_t hash_magic;</code>
268 </p>
269 <p>
270 Magic number that identifies the file as a Hash file. Returned if
271 DB_FAST_STAT is set.
272 </p>
273 </li>
274 <li>
275 <p>
276 <code class="literal">u_int32_t hash_metaflags;</code>
277 </p>
278 <p>
279 Reports internal flags. For internal use
280 only.
281 </p>
282 </li>
283 <li>
284 <p>
285 <code class="literal">u_int32_t hash_ndata;</code>
286 </p>
287 <p>
288 The number of key/data pairs in the database. If DB_FAST_STAT was
289 specified the count will be the last saved value unless it has never
290 been calculated, in which case it will be 0. Returned if DB_FAST_STAT
291 is set.
292 </p>
293 </li>
294 <li>
295 <p>
296 <code class="literal">u_int32_t hash_nkeys;</code>
297 </p>
298 <p>
299 The number of unique keys in the database. If DB_FAST_STAT was
300 specified the count will be the last saved value unless it has never
301 been calculated, in which case it will be 0. Returned if DB_FAST_STAT
302 is set.
303 </p>
304 </li>
305 <li>
306 <p>
307 <code class="literal">u_int32_t hash_overflows;</code>
308 </p>
309 <p>
310 The number of overflow pages (overflow pages are pages that contain
311 items that did not fit in the main bucket page).
312 </p>
313 </li>
314 <li>
315 <p>
316 <code class="literal">uintmax_t hash_ovfl_free;</code>
317 </p>
318 <p>
319 The number of bytes free on overflow pages.
320 </p>
321 </li>
322 <li>
323 <p>
324 <code class="literal">u_int32_t hash_pagecnt;</code>
325 </p>
326 <p>
327 The number of pages in the database. Returned if DB_FAST_STAT is set.
328 </p>
329 </li>
330 <li>
331 <p>
332 <code class="literal">u_int32_t hash_pagesize;</code>
333 </p>
334 <p>
335 The underlying database page (and bucket) size, in bytes. Returned if
336 DB_FAST_STAT is set.
337 </p>
338 </li>
339 <li>
340 <p>
341 <code class="literal">u_int32_t hash_version;</code>
342 </p>
343 <p>
344 The version of the Hash database. Returned if DB_FAST_STAT is set.
345 </p>
346 </li>
347 </ul>
348 </div>
349 </div>
350 <div class="sect3" lang="en" xml:lang="en">
351 <div class="titlepage">
352 <div>
353 <div>
354 <h4 class="title"><a id="idp5911504"></a>Heap Statistics</h4>
355 </div>
356 </div>
357 </div>
358 <p>
359 In the case of a Heap database, the statistics are stored in a
360 structure of type <code class="literal">DB_HEAP_STAT</code>. The following fields will be filled
361 in:
362 </p>
363 <div class="itemizedlist">
364 <ul type="disc">
365 <li>
366 <p>
367 <code class="literal">u_int32_t heap_magic;</code>
368 </p>
369 <p>
370 Magic number that identifies the file as a Heap file. Returned if
371 DB_FAST_STAT is set.
372 </p>
373 </li>
374 <li>
375 <p>
376 <code class="literal">u_int32_t heap_version;</code>
377 </p>
378 <p>
379 The version of the Heap database. Returned if DB_FAST_STAT is set.
380 </p>
381 </li>
382 <li>
383 <p>
384 <code class="literal">u_int32_t heap_metaflags;</code>
385 </p>
386 <p>
387 Reports internal flags. For internal use
388 only.
389 </p>
390 </li>
391 <li>
392 <p>
393 <code class="literal">u_int32_t heap_nrecs;</code>
394 </p>
395 <p>
396 Reports the number of records in the Heap
397 database. Returned if DB_FAST_STAT is set.
398 </p>
399 </li>
400 <li>
401 <p>
402 <code class="literal">u_int32_t heap_pagecnt;</code>
403 </p>
404 <p>
405 The number of pages in the database. Returned if DB_FAST_STAT is set.
406 </p>
407 </li>
408 <li>
409 <p>
410 <code class="literal">u_int32_t heap_pagesize;</code>
411 </p>
412 <p>
413 The underlying database page (and bucket) size, in bytes. Returned if
414 DB_FAST_STAT is set.
415 </p>
416 </li>
417 <li>
418 <p>
419 <code class="literal">u_int32_t heap_nregions;</code>
420 </p>
421 <p>
422 The number of regions in the Heap database. Returned if
423 DB_FAST_STAT is set.
424 </p>
425 </li>
426 <li>
427 <p>
428 <code class="literal">u_int32_t heap_regionsize;</code>
429 </p>
430 <p>
431 The number of pages in a region in the Heap database. Returned if
432 DB_FAST_STAT is set.
433 </p>
434 </li>
435 </ul>
436 </div>
437 </div>
438 <div class="sect3" lang="en" xml:lang="en">
439 <div class="titlepage">
440 <div>
441 <div>
442 <h4 class="title"><a id="idp5913056"></a>Btree and Recno Statistics</h4>
443 </div>
444 </div>
445 </div>
446 <p>
447 In the case of a Btree or Recno database, the
448 statistics are stored in a structure of type
449 <code class="literal">DB_BTREE_STAT</code>. The following fields
450 will be filled in:
451 </p>
452 <div class="itemizedlist">
453 <ul type="disc">
454 <li>
455 <p>
456 <code class="literal">u_int32_t bt_dup_pg;</code>
457 </p>
458 <p>
459 Number of database duplicate pages.
460 </p>
461 </li>
462 <li>
463 <p>
464 <code class="literal">uintmax_t bt_dup_pgfree;</code>
465 </p>
466 <p>
467 Number of bytes free in database duplicate pages.
468 </p>
469 </li>
470 <li>
471 <p>
472 <code class="literal">u_int32_t bt_empty_pg;</code>
473 </p>
474 <p>
475 Number of empty database pages.
476 </p>
477 </li>
478 <li>
479 <p>
480 <code class="literal">u_int32_t bt_free;</code>
481 </p>
482 <p>
483 Number of pages on the free list.
484 </p>
485 </li>
486 <li>
487 <p>
488 <code class="literal">u_int32_t bt_int_pg;</code>
489 </p>
490 <p>
491 Number of database internal pages.
492 </p>
493 </li>
494 <li>
495 <p>
496 <code class="literal">uintmax_t bt_int_pgfree;</code>
497 </p>
498 <p>
499 Number of bytes free in database internal pages.
500 </p>
501 </li>
502 <li>
503 <p>
504 <code class="literal">u_int32_t bt_leaf_pg;</code>
505 </p>
506 <p>
507 Number of database leaf pages.
508 </p>
509 </li>
510 <li>
511 <p>
512 <code class="literal">uintmax_t bt_leaf_pgfree;</code>
513 </p>
514 <p>
515 Number of bytes free in database leaf pages.
516 </p>
517 </li>
518 <li>
519 <p>
520 <code class="literal">u_int32_t bt_levels;</code>
521 </p>
522 <p>
523 Number of levels in the database.
524 </p>
525 </li>
526 <li>
527 <p>
528 <code class="literal">u_int32_t bt_magic;</code>
529 </p>
530 <p>
531 Magic number that identifies the file as a Btree database. Returned
532 if DB_FAST_STAT is set.
533 </p>
534 </li>
535 <li>
536 <p>
537 <code class="literal">u_int32_t bt_metaflags;</code>
538 </p>
539 <p>
540 Reports internal flags. For internal use
541 only.
542 </p>
543 </li>
544 <li>
545 <p>
546 <code class="literal">u_int32_t bt_minkey;</code>
547 </p>
548 <p>
549 The minimum keys per page. Returned if DB_FAST_STAT is set.
550 </p>
551 </li>
552 <li>
553 <p>
554 <code class="literal">u_int32_t bt_ndata;</code>
555 </p>
556 <p>
557 For the Btree Access Method, the number of key/data pairs in the
558 database. If the DB_FAST_STAT flag is not specified, the count will
559 be exact. Otherwise, the count will be the last saved value unless it
560 has never been calculated, in which case it will be 0.
561 </p>
562 <p>
563 For the Recno Access Method, the number of records in the database.
564 If the database was configured with mutable record numbers (see
565 <a class="link" href="dbset_flags.html#dbset_flags_DB_RENUMBER">DB_RENUMBER</a>),
566 the count will be exact. Otherwise, if the DB_FAST_STAT flag is specified
567 the count will be exact but will include deleted and implicitly
568 created records; if the DB_FAST_STAT flag is not specified, the count
569 will be exact and will not include deleted or implicitly created
570 records.
571 </p>
572 <p>
573 Returned if DB_FAST_STAT is set.
574 </p>
575 </li>
576 <li>
577 <p>
578 <code class="literal">u_int32_t bt_nkeys;</code>
579 </p>
580 <p>
581 For the Btree Access Method, the number of keys in the database. If
582 the DB_FAST_STAT flag is not specified or the database was configured
583 to support record numbers (see
584 <a class="link" href="dbset_flags.html#dbset_flags_DB_RECNUM">DB_RECNUM</a>),
585 the count will be exact. Otherwise, the count will be the last saved
586 value unless it has never been calculated, in which case it will be 0.
587 </p>
588 <p>
589 For the Recno Access Method, the number of records in the database.
590 If the database was configured with mutable record numbers (see
591 <a class="link" href="dbset_flags.html#dbset_flags_DB_RENUMBER">DB_RENUMBER</a>),
592 the count will be exact. Otherwise, if the DB_FAST_STAT flag is specified
593 the count will be exact but will include deleted and implicitly
594 created records; if the DB_FAST_STAT flag is not specified, the count
595 will be exact and will not include deleted or implicitly created
596 records.
597 </p>
598 <p>
599 Returned if DB_FAST_STAT is set.
600 </p>
601 </li>
602 <li>
603 <p>
604 <code class="literal">u_int32_t bt_over_pg;</code>
605 </p>
606 <p>
607 Number of database overflow pages.
608 </p>
609 </li>
610 <li>
611 <p>
612 <code class="literal">uintmax_t bt_over_pgfree;</code>
613 </p>
614 <p>
615 Number of bytes free in database overflow pages.
616 </p>
617 </li>
618 <li>
619 <p>
620 <code class="literal">u_int32_t bt_pagecnt;</code>
621 </p>
622 <p>
623 The number of pages in the database. Returned if DB_FAST_STAT is set.
624 </p>
625 </li>
626 <li>
627 <p>
628 <code class="literal">u_int32_t bt_pagesize;</code>
629 </p>
630 <p>
631 The underlying database page size, in bytes. Returned if DB_FAST_STAT
632 is set.
633 </p>
634 </li>
635 <li>
636 <p>
637 <code class="literal">u_int32_t bt_re_len;</code>
638 </p>
639 <p>
640 The length of fixed-length records. Returned if DB_FAST_STAT is set.
641 </p>
642 </li>
643 <li>
644 <p>
645 <code class="literal">u_int32_t bt_re_pad;</code>
646 </p>
647 <p>
648 The padding byte value for fixed-length records. Returned if
649 DB_FAST_STAT is set.
650 </p>
651 </li>
652 <li>
653 <p>
654 <code class="literal">u_int32_t bt_version;</code>
655 </p>
656 <p>
657 The version of the Btree database. Returned if DB_FAST_STAT is set.
658 </p>
659 </li>
660 </ul>
661 </div>
662 </div>
663 <div class="sect3" lang="en" xml:lang="en">
664 <div class="titlepage">
665 <div>
666 <div>
667 <h4 class="title"><a id="idp5946328"></a>Queue Statistics</h4>
668 </div>
669 </div>
670 </div>
671 <p>
672 In the case of a Queue database, the statistics are
673 stored in a structure of type
674 <code class="literal">DB_QUEUE_STAT</code>. The following fields
675 will be filled in:
676 </p>
677 <div class="itemizedlist">
678 <ul type="disc">
679 <li>
680 <p>
681 <code class="literal">u_int32_t qs_cur_recno;</code>
682 </p>
683 <p>
684 Next available record number. Returned if DB_FAST_STAT is set.
685 </p>
686 </li>
687 <li>
688 <p>
689 <code class="literal">u_int32_t qs_extentsize;</code>
690 </p>
691 <p>
692 Underlying database extent size, in pages. Returned if DB_FAST_STAT
693 is set.
694 </p>
695 </li>
696 <li>
697 <p>
698 <code class="literal">u_int32_t qs_first_recno;</code>
699 </p>
700 <p>
701 First undeleted record in the database. Returned if DB_FAST_STAT is
702 set.
703 </p>
704 </li>
705 <li>
706 <p>
707 <code class="literal">u_int32_t qs_magic;</code>
708 </p>
709 <p>
710 Magic number that identifies the file as a Queue file. Returned if
711 DB_FAST_STAT is set.
712 </p>
713 </li>
714 <li>
715 <p>
716 <code class="literal">u_int32_t qs_metaflags;</code>
717 </p>
718 <p>
719 Reports internal flags. For internal use
720 only.
721 </p>
722 </li>
723 <li>
724 <p>
725 <code class="literal">u_int32_t qs_nkeys;</code>
726 </p>
727 <p>
728 The number of records in the database. If DB_FAST_STAT was specified
729 the count will be the last saved value unless it has never been
730 calculated, in which case it will be 0. Returned if DB_FAST_STAT is
731 set.
732 </p>
733 </li>
734 <li>
735 <p>
736 <code class="literal">u_int32_t qs_ndata;</code>
737 </p>
738 <p>
739 The number of records in the database. If DB_FAST_STAT was specified
740 the count will be the last saved value unless it has never been
741 calculated, in which case it will be 0. Returned if DB_FAST_STAT is
742 set.
743 </p>
744 </li>
745 <li>
746 <p>
747 <code class="literal">u_int32_t qs_pages;</code>
748 </p>
749 <p>
750 Number of pages in the database.
751 </p>
752 </li>
753 <li>
754 <p>
755 <code class="literal">u_int32_t qs_pagesize;</code>
756 </p>
757 <p>
758 Underlying database page size, in bytes. Returned if DB_FAST_STAT is
759 set.
760 </p>
761 </li>
762 <li>
763 <p>
764 <code class="literal">u_int32_t qs_pgfree;</code>
765 </p>
766 <p>
767 Number of bytes free in database pages.
768 </p>
769 </li>
770 <li>
771 <p>
772 <code class="literal">u_int32_t qs_re_len;</code>
773 </p>
774 <p>
775 The length of the records. Returned if DB_FAST_STAT is set.
776 </p>
777 </li>
778 <li>
779 <p>
780 <code class="literal">u_int32_t qs_re_pad;</code>
781 </p>
782 <p>
783 The padding byte value for the records. Returned if DB_FAST_STAT is
784 set.
785 </p>
786 </li>
787 <li>
788 <p>
789 <code class="literal">u_int32_t qs_version;</code>
790 </p>
791 <p>
792 The version of the Queue file type. Returned if DB_FAST_STAT is set.
793 </p>
794 </li>
795 </ul>
796 </div>
797 </div>
798 </div>
799 <div class="sect2" lang="en" xml:lang="en">
800 <div class="titlepage">
801 <div>
802 <div>
803 <h3 class="title"><a id="idp5927368"></a>Errors</h3>
804 </div>
805 </div>
806 </div>
807 <p>
808 The <code class="methodname">Db::stat()</code> <span>
809
810 <span>
811 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
812 exception, encapsulating one of the following non-zero errors, or return one
813 of the following non-zero errors:
814 </span>
815 </span>
816 </p>
817 <div class="sect3" lang="en" xml:lang="en">
818 <div class="titlepage">
819 <div>
820 <div>
821 <h4 class="title"><a id="idp5925816"></a> <span>DbRepHandleDeadException or</span> DB_REP_HANDLE_DEAD</h4>
822 </div>
823 </div>
824 </div>
825 <p>
826 When a client synchronizes with the master, it is possible for committed
827 transactions to be rolled back. This invalidates all the database and cursor
828 handles opened in the replication environment. Once this occurs, an attempt to use
829 such a handle will
830 <span>
831 throw a <a class="xref" href="dbrephandledead.html" title="DbRepHandleDeadException">DbRepHandleDeadException</a> (if
832 your application is configured to throw exceptions), or
833 </span>
834 return <code class="literal">DB_REP_HANDLE_DEAD</code>.
835 The application will need to discard the handle and open a new one in order to
836 continue processing.
837 </p>
838 </div>
839 <div class="sect3" lang="en" xml:lang="en">
840 <div class="titlepage">
841 <div>
842 <div>
843 <h4 class="title"><a id="idp5901416"></a><span>DbDeadlockException or </span>DB_REP_LOCKOUT</h4>
844 </div>
845 </div>
846 </div>
847 <p>
848 The operation was blocked by client/master synchronization.
849 </p>
850 <p>
851 <a class="xref" href="dbdeadlock.html" title="DbDeadlockException">DbDeadlockException</a> is thrown if
852 your Berkeley DB API is configured to throw exceptions.
853 Otherwise, <code class="literal">DB_REP_LOCKOUT</code> is returned.
854 </p>
855 </div>
856 <div class="sect3" lang="en" xml:lang="en">
857 <div class="titlepage">
858 <div>
859 <div>
860 <h4 class="title"><a id="idp5930368"></a>EINVAL</h4>
861 </div>
862 </div>
863 </div>
864 <p>
865 An invalid flag value or parameter was specified.
866 </p>
867 </div>
868 </div>
869 <div class="sect2" lang="en" xml:lang="en">
870 <div class="titlepage">
871 <div>
872 <div>
873 <h3 class="title"><a id="idp5932296"></a>Class</h3>
874 </div>
875 </div>
876 </div>
877 <p>
878 <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>
879 </p>
880 </div>
881 <div class="sect2" lang="en" xml:lang="en">
882 <div class="titlepage">
883 <div>
884 <div>
885 <h3 class="title"><a id="idp5916464"></a>See Also</h3>
886 </div>
887 </div>
888 </div>
889 <p>
890 <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a>
891 </p>
892 </div>
893 </div>
894 <div class="navfooter">
895 <hr />
896 <table width="100%" summary="Navigation footer">
897 <tr>
898 <td width="40%" align="left"><a accesskey="p" href="dbsort_multiple.html">Prev</a> </td>
899 <td width="20%" align="center">
900 <a accesskey="u" href="db.html">Up</a>
901 </td>
902 <td width="40%" align="right"> <a accesskey="n" href="dbstat_print.html">Next</a></td>
903 </tr>
904 <tr>
905 <td width="40%" align="left" valign="top">Db::sort_multiple() </td>
906 <td width="20%" align="center">
907 <a accesskey="h" href="index.html">Home</a>
908 </td>
909 <td width="40%" align="right" valign="top"> Db::stat_print()</td>
910 </tr>
911 </table>
912 </div>
913 </body>
914 </html>