| 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->get()</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="dbfd.html" title="DB->fd()" /> |
| 12 | <link rel="next" href="dbget_bt_minkey.html" title="DB->get_bt_minkey()" /> |
| 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->get()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="dbfd.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="dbget_bt_minkey.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="dbget"></a>DB->get()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | DB->get(DB *db, |
| 45 | DB_TXN *txnid, DBT *key, DBT *data, u_int32_t flags); |
| 46 | |
| 47 | int |
| 48 | DB->pget(DB *db, |
| 49 | DB_TXN *txnid, DBT *key, DBT *pkey, DBT *data, u_int32_t flags); </pre> |
| 50 | <p> |
| 51 | The <code class="methodname">DB->get()</code> method retrieves key/data |
| 52 | pairs from the database. The address and length of the data |
| 53 | associated with the specified <span class="bold"><strong>key</strong></span> |
| 54 | are returned in the structure to which |
| 55 | <span class="bold"><strong>data</strong></span> refers. |
| 56 | </p> |
| 57 | <p> |
| 58 | In the presence of duplicate key values, |
| 59 | <code class="methodname">DB->get()</code> will return the first data |
| 60 | item for the designated key. Duplicates are sorted by: |
| 61 | </p> |
| 62 | <div class="itemizedlist"> |
| 63 | <ul type="disc"> |
| 64 | <li> |
| 65 | <p> |
| 66 | Their sort order, if a duplicate sort function was specified. |
| 67 | </p> |
| 68 | </li> |
| 69 | <li> |
| 70 | <p> |
| 71 | Any explicit cursor designated insertion. |
| 72 | </p> |
| 73 | </li> |
| 74 | <li> |
| 75 | <p> |
| 76 | By insert order. This is the default behavior. |
| 77 | </p> |
| 78 | </li> |
| 79 | </ul> |
| 80 | </div> |
| 81 | <p> |
| 82 | <span class="bold"><strong>Retrieval of duplicates requires the use of cursor operations.</strong></span> |
| 83 | See <a class="xref" href="dbcget.html" title="DBcursor->get()">DBcursor->get()</a> for details. |
| 84 | </p> |
| 85 | <p> |
| 86 | When called on a database that has been made into a secondary |
| 87 | index using the |
| 88 | <a class="xref" href="dbassociate.html" title="DB->associate()">DB->associate()</a> method, the |
| 89 | <code class="methodname">DB->get()</code> and |
| 90 | <code class="methodname">DB->pget()</code> methods return the key from |
| 91 | the secondary index and the data item from the primary database. |
| 92 | In addition, the <code class="methodname">DB->pget()</code> method |
| 93 | returns the key from the primary database. In databases that are |
| 94 | not secondary indices, the <code class="methodname">DB->pget()</code> |
| 95 | method will always fail. |
| 96 | </p> |
| 97 | <p> |
| 98 | The <code class="methodname">DB->get()</code> method will return |
| 99 | <a href="../../programmer_reference/program_errorret.html#program_errorret.DB_NOTFOUND" class="olink">DB_NOTFOUND</a> if |
| 100 | the specified key is not in the database. The |
| 101 | <code class="methodname">DB->get()</code> method will return |
| 102 | <a href="../../programmer_reference/program_errorret.html#program_errorret.DB_KEYEMPTY" class="olink">DB_KEYEMPTY</a> if |
| 103 | the database is a Queue or Recno database and the specified key |
| 104 | exists, but was never explicitly created by the application or was |
| 105 | later deleted. Unless otherwise specified, the |
| 106 | <code class="methodname">DB->get()</code> <span> |
| 107 | <span> |
| 108 | method returns a non-zero error value on failure and 0 on success. |
| 109 | </span> |
| 110 | |
| 111 | </span> |
| 112 | </p> |
| 113 | <div class="sect2" lang="en" xml:lang="en"> |
| 114 | <div class="titlepage"> |
| 115 | <div> |
| 116 | <div> |
| 117 | <h3 class="title"><a id="idp49540248"></a>Parameters</h3> |
| 118 | </div> |
| 119 | </div> |
| 120 | </div> |
| 121 | <div class="sect3" lang="en" xml:lang="en"> |
| 122 | <div class="titlepage"> |
| 123 | <div> |
| 124 | <div> |
| 125 | <h4 class="title"><a id="idp49517608"></a>txnid</h4> |
| 126 | </div> |
| 127 | </div> |
| 128 | </div> |
| 129 | <p> |
| 130 | If the operation is part of an application-specified transaction, the |
| 131 | <span class="bold"><strong>txnid</strong></span> parameter is a transaction |
| 132 | handle returned from <a class="xref" href="txnbegin.html" title="DB_ENV->txn_begin()">DB_ENV->txn_begin()</a>; |
| 133 | if the operation is part of a Berkeley DB Concurrent Data Store group, the |
| 134 | <span class="bold"><strong>txnid</strong></span> parameter is a handle returned |
| 135 | from <a class="xref" href="envcdsgroup_begin.html" title="DB_ENV->cdsgroup_begin()">DB_ENV->cdsgroup_begin()</a>; |
| 136 | otherwise NULL. If no transaction handle is specified, but the |
| 137 | operation occurs in a transactional database, the operation will be |
| 138 | implicitly transaction protected. |
| 139 | </p> |
| 140 | </div> |
| 141 | <div class="sect3" lang="en" xml:lang="en"> |
| 142 | <div class="titlepage"> |
| 143 | <div> |
| 144 | <div> |
| 145 | <h4 class="title"><a id="idp49523872"></a>key</h4> |
| 146 | </div> |
| 147 | </div> |
| 148 | </div> |
| 149 | <p> |
| 150 | The key <a class="link" href="dbt.html" title="Chapter 4. The DBT Handle">DBT</a> operated on. |
| 151 | </p> |
| 152 | <p> |
| 153 | If <a class="link" href="dbt.html#dbt_DB_DBT_PARTIAL">DB_DBT_PARTIAL</a> |
| 154 | is set for the DBT used for this parameter, |
| 155 | and if the <span class="bold"><strong>flags</strong></span> |
| 156 | parameter is not set to |
| 157 | <a class="link" href="dbget.html#dbget_DB_CONSUME">DB_CONSUME</a> |
| 158 | <a class="link" href="dbget.html#dbget_DB_CONSUME_WAIT">DB_CONSUME_WAIT</a>, or |
| 159 | <a class="link" href="dbget.html#dbget_DB_SET_RECNO">DB_SET_RECNO</a>, |
| 160 | then this method will fail and return <code class="literal">EINVAL</code>. |
| 161 | </p> |
| 162 | </div> |
| 163 | <div class="sect3" lang="en" xml:lang="en"> |
| 164 | <div class="titlepage"> |
| 165 | <div> |
| 166 | <div> |
| 167 | <h4 class="title"><a id="idp49550944"></a>pkey</h4> |
| 168 | </div> |
| 169 | </div> |
| 170 | </div> |
| 171 | <p> |
| 172 | The <span class="bold"><strong>pkey</strong></span> parameter is the return key |
| 173 | from the primary database. If |
| 174 | <a class="link" href="dbt.html#dbt_DB_DBT_PARTIAL">DB_DBT_PARTIAL</a> |
| 175 | is set for the DBT used for this parameter, |
| 176 | then this method will fail and return <code class="literal">EINVAL</code>. |
| 177 | </p> |
| 178 | </div> |
| 179 | <div class="sect3" lang="en" xml:lang="en"> |
| 180 | <div class="titlepage"> |
| 181 | <div> |
| 182 | <div> |
| 183 | <h4 class="title"><a id="idp49515000"></a>data</h4> |
| 184 | </div> |
| 185 | </div> |
| 186 | </div> |
| 187 | <p> |
| 188 | The data <a class="link" href="dbt.html" title="Chapter 4. The DBT Handle">DBT</a> operated on. |
| 189 | </p> |
| 190 | </div> |
| 191 | <div class="sect3" lang="en" xml:lang="en"> |
| 192 | <div class="titlepage"> |
| 193 | <div> |
| 194 | <div> |
| 195 | <h4 class="title"><a id="idp49525296"></a>flags</h4> |
| 196 | </div> |
| 197 | </div> |
| 198 | </div> |
| 199 | <p> |
| 200 | The <span class="bold"><strong>flags</strong></span> parameter must be set to 0 |
| 201 | or one of the following values: |
| 202 | </p> |
| 203 | <div class="itemizedlist"> |
| 204 | <ul type="disc"> |
| 205 | <li> |
| 206 | <p><a id="dbget_DB_CONSUME"></a> |
| 207 | <code class="literal">DB_CONSUME</code> |
| 208 | </p> |
| 209 | <p> |
| 210 | Return the record number and data from the available record closest to |
| 211 | the head of the queue, and delete the record. The record number will |
| 212 | be returned in <span class="bold"><strong>key</strong></span>, as described in |
| 213 | <a class="link" href="dbt.html" title="Chapter 4. The DBT Handle">DBT</a>. The data will be |
| 214 | returned in the <span class="bold"><strong>data</strong></span> parameter. A |
| 215 | record is available if it is not deleted and is not currently locked. |
| 216 | The underlying database must be of type Queue for DB_CONSUME to be |
| 217 | specified. |
| 218 | </p> |
| 219 | </li> |
| 220 | <li> |
| 221 | <p><a id="dbget_DB_CONSUME_WAIT"></a> |
| 222 | <code class="literal">DB_CONSUME_WAIT</code> |
| 223 | </p> |
| 224 | <p> |
| 225 | The DB_CONSUME_WAIT flag is the same as the DB_CONSUME flag, except |
| 226 | that if the Queue database is empty, the thread of control will wait |
| 227 | until there is data in the queue before returning. The underlying |
| 228 | database must be of type Queue for DB_CONSUME_WAIT to be specified. |
| 229 | </p> |
| 230 | <p> |
| 231 | If lock or transaction timeouts have been |
| 232 | specified, the <code class="methodname">DB->get()</code> |
| 233 | method with the DB_CONSUME_WAIT flag may return |
| 234 | <a href="../../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_NOTGRANTED" class="olink">DB_LOCK_NOTGRANTED</a>. |
| 235 | This failure, by itself, does not require the |
| 236 | enclosing transaction be aborted. |
| 237 | </p> |
| 238 | </li> |
| 239 | <li> |
| 240 | <p><a id="get_DB_GET_BOTH"></a> |
| 241 | <code class="literal">DB_GET_BOTH</code> |
| 242 | </p> |
| 243 | <p> |
| 244 | Retrieve the key/data pair only if both the key and data match the |
| 245 | arguments. |
| 246 | </p> |
| 247 | <p> |
| 248 | When using a secondary index handle, the <code class="literal">DB_GET_BOTH</code>: |
| 249 | flag causes: |
| 250 | </p> |
| 251 | <div class="itemizedlist"> |
| 252 | <ul type="circle"> |
| 253 | <li> |
| 254 | <p> |
| 255 | the <code class="methodname">DB->pget()</code> version of |
| 256 | this method to retun the secondary key/primary |
| 257 | key/data tuple only if both the primary and |
| 258 | secondary keys match the arguments. |
| 259 | </p> |
| 260 | </li> |
| 261 | <li> |
| 262 | <p> |
| 263 | the <code class="methodname">DB->get()</code> version of this method |
| 264 | to result in an error. |
| 265 | </p> |
| 266 | </li> |
| 267 | </ul> |
| 268 | </div> |
| 269 | </li> |
| 270 | <li> |
| 271 | <p><a id="dbget_DB_SET_RECNO"></a> |
| 272 | <code class="literal">DB_SET_RECNO</code> |
| 273 | </p> |
| 274 | <p> |
| 275 | Retrieve the specified numbered key/data pair from a database. Upon |
| 276 | return, both the <span class="bold"><strong>key</strong></span> and <span class="bold"><strong>data</strong></span> items will have been filled in. |
| 277 | </p> |
| 278 | <p> |
| 279 | The <span class="bold"><strong>data</strong></span> field of the specified |
| 280 | <span class="bold"><strong>key</strong></span> must be a pointer to a logical |
| 281 | record number (that is, a <span class="bold"><strong>db_recno_t</strong></span>). This record number determines the |
| 282 | record to be retrieved. |
| 283 | </p> |
| 284 | <p> |
| 285 | For DB_SET_RECNO to be specified, the underlying database must be of |
| 286 | type Btree, and it must have been created with the DB_RECNUM flag. |
| 287 | </p> |
| 288 | </li> |
| 289 | </ul> |
| 290 | </div> |
| 291 | <p> |
| 292 | In addition, the following flags may be set by bitwise inclusively |
| 293 | <span class="bold"><strong>OR</strong></span>'ing them into the <span class="bold"><strong>flags</strong></span> parameter: |
| 294 | </p> |
| 295 | <div class="itemizedlist"> |
| 296 | <ul type="disc"> |
| 297 | <li> |
| 298 | <p><a id="get_DB_IGNORE_LEASE"></a> |
| 299 | <code class="literal">DB_IGNORE_LEASE</code> |
| 300 | </p> |
| 301 | <p> |
| 302 | Return the data item irrespective of the state of master leases. The |
| 303 | item will be returned under all conditions: if master leases are not |
| 304 | configured, if the request is made to a client, if the request is made |
| 305 | to a master with a valid lease, or if the request is made to a master |
| 306 | without a valid lease. |
| 307 | </p> |
| 308 | </li> |
| 309 | <li> |
| 310 | <p><a id="get_DB_MULTIPLE"></a> |
| 311 | <code class="literal">DB_MULTIPLE</code> |
| 312 | </p> |
| 313 | <p> |
| 314 | Return multiple data items in the buffer to which the <span class="bold"><strong>data</strong></span> parameter refers. |
| 315 | </p> |
| 316 | <p> |
| 317 | In the case of Btree or Hash databases, all of the data items |
| 318 | associated with the specified key are entered into the buffer. In the |
| 319 | case of Queue, Recno or Heap databases, all of the data items in the |
| 320 | database, starting at, and subsequent to, the specified key, are |
| 321 | entered into the buffer. |
| 322 | </p> |
| 323 | <p> |
| 324 | The buffer to which the <span class="bold"><strong>data</strong></span> |
| 325 | parameter refers must be provided from user memory (see |
| 326 | <a class="link" href="dbt.html#dbt_DB_DBT_USERMEM">DB_DBT_USERMEM</a>). |
| 327 | The buffer must be at least as large as the page size of the |
| 328 | underlying database, aligned for unsigned integer access, and be a |
| 329 | multiple of 1024 bytes in size. If the buffer size is insufficient, |
| 330 | then upon return from the call the size field of the <span class="bold"><strong>data</strong></span> parameter will have been set to an |
| 331 | estimated buffer size, and the error DB_BUFFER_SMALL is returned. |
| 332 | (The size is an estimate as the exact size needed may not be known |
| 333 | until all entries are read. It is best to initially provide a |
| 334 | relatively large buffer, but applications should be prepared to resize |
| 335 | the buffer as necessary and repeatedly call the method.) |
| 336 | </p> |
| 337 | <p> |
| 338 | The DB_MULTIPLE flag may only be used alone, or with the DB_GET_BOTH |
| 339 | and DB_SET_RECNO options. The DB_MULTIPLE flag may not be used when |
| 340 | accessing databases made into secondary indices using the |
| 341 | <a class="xref" href="dbassociate.html" title="DB->associate()">DB->associate()</a> method. |
| 342 | </p> |
| 343 | <p> |
| 344 | See the <a class="xref" href="dbt.html#dbtlist" title="DBT and Bulk Operations">DBT and Bulk Operations</a> |
| 345 | for more information on working with bulk get. |
| 346 | </p> |
| 347 | </li> |
| 348 | <li> |
| 349 | <p><a id="get_DB_READ_COMMITTED"></a> |
| 350 | <code class="literal">DB_READ_COMMITTED</code> |
| 351 | </p> |
| 352 | <p> |
| 353 | Configure a transactional get operation to have degree 2 isolation |
| 354 | (the read is not repeatable). |
| 355 | </p> |
| 356 | </li> |
| 357 | <li> |
| 358 | <p><a id="get_DB_READ_UNCOMMITTED"></a> |
| 359 | <code class="literal">DB_READ_UNCOMMITTED</code> |
| 360 | </p> |
| 361 | <p> |
| 362 | Configure a transactional get operation to have degree 1 isolation, |
| 363 | reading modified but not yet committed data. Silently ignored if the |
| 364 | <a class="link" href="dbopen.html#dbopen_DB_READ_UNCOMMITTED">DB_READ_UNCOMMITTED</a> |
| 365 | flag was not specified when the underlying database was opened. |
| 366 | </p> |
| 367 | </li> |
| 368 | <li> |
| 369 | <p><a id="get_DB_RMW"></a> |
| 370 | <code class="literal">DB_RMW</code> |
| 371 | </p> |
| 372 | <p> |
| 373 | Acquire write locks instead of read locks when doing the read, if |
| 374 | locking is configured. Setting this flag can eliminate deadlock |
| 375 | during a read-modify-write cycle by acquiring the write lock during |
| 376 | the read part of the cycle so that another thread of control acquiring |
| 377 | a read lock for the same item, in its own read-modify-write cycle, |
| 378 | will not result in deadlock. |
| 379 | </p> |
| 380 | <p> |
| 381 | Because the <code class="methodname">DB->get()</code> |
| 382 | method will not hold locks across Berkeley DB |
| 383 | calls in non-transactional operations, the |
| 384 | <a class="link" href="dbcget.html#dbcget_DB_RMW">DB_RMW</a> |
| 385 | flag to the <code class="methodname">DB->get()</code> call is |
| 386 | meaningful only in the presence of transactions. |
| 387 | </p> |
| 388 | </li> |
| 389 | </ul> |
| 390 | </div> |
| 391 | </div> |
| 392 | </div> |
| 393 | <div class="sect2" lang="en" xml:lang="en"> |
| 394 | <div class="titlepage"> |
| 395 | <div> |
| 396 | <div> |
| 397 | <h3 class="title"><a id="idp49562944"></a>Errors</h3> |
| 398 | </div> |
| 399 | </div> |
| 400 | </div> |
| 401 | <p> |
| 402 | The <code class="methodname">DB->get()</code> <span> |
| 403 | <span> |
| 404 | method may fail and return one of the following non-zero errors: |
| 405 | </span> |
| 406 | |
| 407 | </span> |
| 408 | </p> |
| 409 | <div class="sect3" lang="en" xml:lang="en"> |
| 410 | <div class="titlepage"> |
| 411 | <div> |
| 412 | <div> |
| 413 | <h4 class="title"><a id="idp49582752"></a>DB_BUFFER_SMALL</h4> |
| 414 | </div> |
| 415 | </div> |
| 416 | </div> |
| 417 | <p> |
| 418 | The requested item could not be returned due to undersized buffer. |
| 419 | </p> |
| 420 | </div> |
| 421 | <div class="sect3" lang="en" xml:lang="en"> |
| 422 | <div class="titlepage"> |
| 423 | <div> |
| 424 | <div> |
| 425 | <h4 class="title"><a id="idp49584456"></a>DB_LOCK_DEADLOCK</h4> |
| 426 | </div> |
| 427 | </div> |
| 428 | </div> |
| 429 | <p> |
| 430 | A transactional database environment operation was selected to resolve |
| 431 | a deadlock. |
| 432 | </p> |
| 433 | </div> |
| 434 | <div class="sect3" lang="en" xml:lang="en"> |
| 435 | <div class="titlepage"> |
| 436 | <div> |
| 437 | <div> |
| 438 | <h4 class="title"><a id="idp49525360"></a>DB_LOCK_NOTGRANTED</h4> |
| 439 | </div> |
| 440 | </div> |
| 441 | </div> |
| 442 | <p> |
| 443 | A Berkeley DB Concurrent Data Store database environment configured |
| 444 | for lock timeouts was unable to grant a lock in the allowed time. |
| 445 | </p> |
| 446 | <p> |
| 447 | You attempted to open a database handle that is configured |
| 448 | for no waiting exclusive locking, but the exclusive lock could not be |
| 449 | immediately obtained. See |
| 450 | <a class="xref" href="dbset_lk_exclusive.html" title="DB->set_lk_exclusive()">DB->set_lk_exclusive()</a> |
| 451 | for more information. |
| 452 | </p> |
| 453 | </div> |
| 454 | <div class="sect3" lang="en" xml:lang="en"> |
| 455 | <div class="titlepage"> |
| 456 | <div> |
| 457 | <div> |
| 458 | <h4 class="title"><a id="idp49557504"></a>DB_LOCK_NOTGRANTED</h4> |
| 459 | </div> |
| 460 | </div> |
| 461 | </div> |
| 462 | <p> |
| 463 | The <code class="literal">DB_CONSUME_WAIT</code> flag was specified, lock or transaction timers |
| 464 | were configured and the lock could not be granted before the wait-time |
| 465 | expired. |
| 466 | </p> |
| 467 | </div> |
| 468 | <div class="sect3" lang="en" xml:lang="en"> |
| 469 | <div class="titlepage"> |
| 470 | <div> |
| 471 | <div> |
| 472 | <h4 class="title"><a id="idp49544928"></a> DB_REP_HANDLE_DEAD</h4> |
| 473 | </div> |
| 474 | </div> |
| 475 | </div> |
| 476 | <p> |
| 477 | When a client synchronizes with the master, it is possible for committed |
| 478 | transactions to be rolled back. This invalidates all the database and cursor |
| 479 | handles opened in the replication environment. Once this occurs, an attempt to use |
| 480 | such a handle will |
| 481 | |
| 482 | return <code class="literal">DB_REP_HANDLE_DEAD</code>. |
| 483 | The application will need to discard the handle and open a new one in order to |
| 484 | continue processing. |
| 485 | </p> |
| 486 | </div> |
| 487 | <div class="sect3" lang="en" xml:lang="en"> |
| 488 | <div class="titlepage"> |
| 489 | <div> |
| 490 | <div> |
| 491 | <h4 class="title"><a id="idp49584640"></a>DB_REP_LEASE_EXPIRED</h4> |
| 492 | </div> |
| 493 | </div> |
| 494 | </div> |
| 495 | <p> |
| 496 | The operation failed because the site's replication master lease has expired. |
| 497 | </p> |
| 498 | </div> |
| 499 | <div class="sect3" lang="en" xml:lang="en"> |
| 500 | <div class="titlepage"> |
| 501 | <div> |
| 502 | <div> |
| 503 | <h4 class="title"><a id="idp49561208"></a>DB_REP_LOCKOUT</h4> |
| 504 | </div> |
| 505 | </div> |
| 506 | </div> |
| 507 | <p> |
| 508 | The operation was blocked by client/master synchronization. |
| 509 | </p> |
| 510 | </div> |
| 511 | <div class="sect3" lang="en" xml:lang="en"> |
| 512 | <div class="titlepage"> |
| 513 | <div> |
| 514 | <div> |
| 515 | <h4 class="title"><a id="idp49231680"></a>DB_SECONDARY_BAD</h4> |
| 516 | </div> |
| 517 | </div> |
| 518 | </div> |
| 519 | <p> |
| 520 | A secondary index references a nonexistent primary key. |
| 521 | </p> |
| 522 | </div> |
| 523 | <div class="sect3" lang="en" xml:lang="en"> |
| 524 | <div class="titlepage"> |
| 525 | <div> |
| 526 | <div> |
| 527 | <h4 class="title"><a id="idp49560280"></a>EINVAL</h4> |
| 528 | </div> |
| 529 | </div> |
| 530 | </div> |
| 531 | <p> |
| 532 | If a record number of 0 was specified; the |
| 533 | <a class="link" href="envopen.html#envopen_DB_THREAD">DB_THREAD</a> flag was |
| 534 | specified to the <a class="xref" href="dbopen.html" title="DB->open()">DB->open()</a> method and none of the |
| 535 | <a class="link" href="dbt.html#dbt_DB_DBT_MALLOC">DB_DBT_MALLOC</a>, |
| 536 | <a class="link" href="dbt.html#dbt_DB_DBT_REALLOC">DB_DBT_REALLOC</a> or |
| 537 | <a class="link" href="dbt.html#dbt_DB_DBT_USERMEM">DB_DBT_USERMEM</a> |
| 538 | flags were set in the <a class="link" href="dbt.html" title="Chapter 4. The DBT Handle">DBT</a>; |
| 539 | the <code class="methodname">DB->pget()</code> method was called with a |
| 540 | <a class="link" href="db.html" title="Chapter 2. The DB Handle">DB</a> handle |
| 541 | that does not refer to a secondary index; or if an invalid flag value |
| 542 | or parameter was specified. |
| 543 | </p> |
| 544 | </div> |
| 545 | </div> |
| 546 | <div class="sect2" lang="en" xml:lang="en"> |
| 547 | <div class="titlepage"> |
| 548 | <div> |
| 549 | <div> |
| 550 | <h3 class="title"><a id="idp49544032"></a>Class</h3> |
| 551 | </div> |
| 552 | </div> |
| 553 | </div> |
| 554 | <p> |
| 555 | <a class="link" href="db.html" title="Chapter 2. The DB Handle">DB</a> |
| 556 | </p> |
| 557 | </div> |
| 558 | <div class="sect2" lang="en" xml:lang="en"> |
| 559 | <div class="titlepage"> |
| 560 | <div> |
| 561 | <div> |
| 562 | <h3 class="title"><a id="idp49578584"></a>See Also</h3> |
| 563 | </div> |
| 564 | </div> |
| 565 | </div> |
| 566 | <p> |
| 567 | <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> |
| 568 | </p> |
| 569 | </div> |
| 570 | </div> |
| 571 | <div class="navfooter"> |
| 572 | <hr /> |
| 573 | <table width="100%" summary="Navigation footer"> |
| 574 | <tr> |
| 575 | <td width="40%" align="left"><a accesskey="p" href="dbfd.html">Prev</a> </td> |
| 576 | <td width="20%" align="center"> |
| 577 | <a accesskey="u" href="db.html">Up</a> |
| 578 | </td> |
| 579 | <td width="40%" align="right"> <a accesskey="n" href="dbget_bt_minkey.html">Next</a></td> |
| 580 | </tr> |
| 581 | <tr> |
| 582 | <td width="40%" align="left" valign="top">DB->fd() </td> |
| 583 | <td width="20%" align="center"> |
| 584 | <a accesskey="h" href="index.html">Home</a> |
| 585 | </td> |
| 586 | <td width="40%" align="right" valign="top"> DB->get_bt_minkey()</td> |
| 587 | </tr> |
| 588 | </table> |
| 589 | </div> |
| 590 | </body> |
| 591 | </html> |