diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
|---|---|---|
| committer | <> | 2015-03-17 16:26:24 +0000 |
| commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
| tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /docs/gsg_txn/C | |
| parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
| download | berkeleydb-master.tar.gz | |
Diffstat (limited to 'docs/gsg_txn/C')
39 files changed, 136 insertions, 106 deletions
diff --git a/docs/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf b/docs/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf Binary files differindex 3f7bc513..39230291 100644 --- a/docs/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf +++ b/docs/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf diff --git a/docs/gsg_txn/C/abortresults.html b/docs/gsg_txn/C/abortresults.html index 014d787d..b2949426 100644 --- a/docs/gsg_txn/C/abortresults.html +++ b/docs/gsg_txn/C/abortresults.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/apireq.html b/docs/gsg_txn/C/apireq.html index e143b6bb..eecc3f76 100644 --- a/docs/gsg_txn/C/apireq.html +++ b/docs/gsg_txn/C/apireq.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/architectrecovery.html b/docs/gsg_txn/C/architectrecovery.html index de624c74..5d59c8d8 100644 --- a/docs/gsg_txn/C/architectrecovery.html +++ b/docs/gsg_txn/C/architectrecovery.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/autocommit.html b/docs/gsg_txn/C/autocommit.html index 1f2edd82..4e8265ed 100644 --- a/docs/gsg_txn/C/autocommit.html +++ b/docs/gsg_txn/C/autocommit.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/backuprestore.html b/docs/gsg_txn/C/backuprestore.html index 707c26ba..b66c89a8 100644 --- a/docs/gsg_txn/C/backuprestore.html +++ b/docs/gsg_txn/C/backuprestore.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -113,6 +113,14 @@ </li> </ul> </div> + <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> + <h3 class="title">Note</h3> + <p> + DB backups are byte-order independent. That is, a backup + taken on a big-endian machine can be used to restore a database + residing on a little-endian machine. + </p> + </div> <p> Once you have performed a backup, you can perform <span class="emphasis"><em>catastrophic recovery</em></span> to restore @@ -284,7 +292,7 @@ <span> For more information, see the - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/envset_flags.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/api_reference/C/envset_flags.html" target="_top"> DB_ENV->set_flags() API reference page. </a> @@ -373,7 +381,7 @@ For more information, see the description of the <code class="literal">DB_TXN_BULK</code> flag in the - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/txnbegin.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/api_reference/C/txnbegin.html" target="_top"> DB_ENV->txn_begin() API reference page. </a> diff --git a/docs/gsg_txn/C/blocking_deadlocks.html b/docs/gsg_txn/C/blocking_deadlocks.html index f997e5a6..ac0c7259 100644 --- a/docs/gsg_txn/C/blocking_deadlocks.html +++ b/docs/gsg_txn/C/blocking_deadlocks.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/enabletxn.html b/docs/gsg_txn/C/enabletxn.html index 8eb1390c..2bac87f4 100644 --- a/docs/gsg_txn/C/enabletxn.html +++ b/docs/gsg_txn/C/enabletxn.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -488,7 +488,7 @@ in the environment's <code class="literal">DB_CONFIG</code> file. Note that the <code class="literal">add_data_dir</code> parameter overrides any value set by the - <code class="methodname">DB_ENV->set_data_dir()</code> + <code class="methodname">DB_ENV->add_data_dir()</code> method. diff --git a/docs/gsg_txn/C/envopen.html b/docs/gsg_txn/C/envopen.html index d791fa79..56e9426e 100644 --- a/docs/gsg_txn/C/envopen.html +++ b/docs/gsg_txn/C/envopen.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/exclusivelock.html b/docs/gsg_txn/C/exclusivelock.html index 1d844d0f..4fb5c624 100644 --- a/docs/gsg_txn/C/exclusivelock.html +++ b/docs/gsg_txn/C/exclusivelock.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/filemanagement.html b/docs/gsg_txn/C/filemanagement.html index 29dacd03..2b09bf49 100644 --- a/docs/gsg_txn/C/filemanagement.html +++ b/docs/gsg_txn/C/filemanagement.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -178,10 +178,11 @@ </li> <li> <p> - Temporary files, which are created only under certain special circumstances. These files never need to - be backed up or otherwise managed and so they are not a consideration for the topics described in this - chapter. See <a class="xref" href="enabletxn.html#security" title="Security Considerations">Security Considerations</a> - for more information on temporary files. + Temporary files, which are created only under certain + special circumstances. These files never need to be backed + up or otherwise managed and so they are not a consideration + for the topics described in this chapter. See <a class="xref" href="enabletxn.html#security" title="Security Considerations">Security Considerations</a> for more + information on temporary files. </p> </li> </ul> @@ -227,11 +228,15 @@ <ul type="disc"> <li> <p> - Flushes dirty pages from the in-memory cache. This means that data modifications found in your - in-memory cache are written to the database files on disk. Note that a checkpoint also causes data - dirtied by an uncommitted transaction to also be written to your database files on disk. In this latter - case, DB's normal recovery is used to remove any such modifications that were subsequently - abandoned by your application using a transaction abort. + Flushes dirty pages from the in-memory cache. This + means that data modifications found in your in-memory + cache are written to the database files on disk. Note that + a checkpoint also causes data dirtied by an uncommitted + transaction to also be written to your database files on + disk. In this latter case, DB's normal recovery is + used to remove any such modifications that were + subsequently abandoned by your application using a + transaction abort. </p> <p> Normal recovery is describe in <a class="xref" href="recovery.html" title="Recovery Procedures">Recovery Procedures</a>. @@ -244,7 +249,8 @@ </li> <li> <p> - Flushes the log. This causes all log data that has not yet been written to disk to be written. + Flushes the log. This causes all log data that has not + yet been written to disk to be written. </p> </li> <li> @@ -256,8 +262,9 @@ </div> <p> There are several ways to run a checkpoint. One way is to use - the <span class="command"><strong>db_checkpoint</strong></span> command line utility. (Note, however, that this command line utility - cannot be used if your environment was opened using + the <span class="command"><strong>db_checkpoint</strong></span> command line utility. + (Note, however, that this command line utility cannot be used + if your environment was opened using <span> <code class="literal">DB_PRIVATE</code>.) </span> @@ -283,7 +290,7 @@ </p> <p> For configuration information, see the - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/txncheckpoint.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/api_reference/C/txncheckpoint.html" target="_top"> DB_ENV->txn_checkpoint() API reference page. </a> diff --git a/docs/gsg_txn/C/hotfailover.html b/docs/gsg_txn/C/hotfailover.html index b46fab8e..12b9963c 100644 --- a/docs/gsg_txn/C/hotfailover.html +++ b/docs/gsg_txn/C/hotfailover.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -152,9 +152,10 @@ <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <h3 class="title">Note</h3> <p> - Rather than use the previous procedure, you can use the <span class="command"><strong>db_hotbackup</strong></span> command line utility - to do the same thing. This utility will (optionally) run a checkpoint and then copy all necessary files to a target - directory for you. + Rather than use the previous procedure, you can use the + <span class="command"><strong>db_hotbackup</strong></span> command line utility to do the + same thing. This utility will (optionally) run a checkpoint and + then copy all necessary files to a target directory for you. </p> </div> <p> @@ -169,14 +170,18 @@ </li> <li> <p> - If you have an archival copy of the backup environment, you can optionally try copying the remaining - log files from the original environment and running catastrophic recovery against that backup - environment. Do this <span class="emphasis"><em>only</em></span> if you have a an archival copy of the backup - environment. + If you have an archival copy of the backup environment, + you can optionally try copying the remaining log files + from the original environment and running catastrophic + recovery against that backup environment. Do this + <span class="emphasis"><em>only</em></span> if you have a an archival + copy of the backup environment. </p> <p> - This step can allow you to recover data created or modified in the original environment, but which - did not have a chance to be reflected in the hot backup environment. + This step can allow you to recover data created or + modified in the original environment, but which did not + have a chance to be reflected in the hot backup + environment. </p> </li> <li> diff --git a/docs/gsg_txn/C/index.html b/docs/gsg_txn/C/index.html index b9c9b658..b79923b5 100644 --- a/docs/gsg_txn/C/index.html +++ b/docs/gsg_txn/C/index.html @@ -12,7 +12,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -30,11 +30,11 @@ <div class="titlepage"> <div> <div> - <h1 class="title"><a id="idm741240"></a>Getting Started with Berkeley DB Transaction Processing</h1> + <h1 class="title"><a id="idm713112"></a>Getting Started with Berkeley DB Transaction Processing</h1> </div> <div> <div class="legalnotice"> - <a id="idm836312"></a> + <a id="idm547384"></a> <p class="legalnotice-title"> <b>Legal Notice</b> </p> @@ -64,7 +64,7 @@ <p> To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: - <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a> + <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a> </p> @@ -72,7 +72,7 @@ </div> </div> <div> - <p class="pubdate">5/11/2012</p> + <p class="pubdate">2/17/2015</p> </div> </div> <hr /> diff --git a/docs/gsg_txn/C/inmem_txnexample_c.html b/docs/gsg_txn/C/inmem_txnexample_c.html index f53a76c7..d8876e9f 100644 --- a/docs/gsg_txn/C/inmem_txnexample_c.html +++ b/docs/gsg_txn/C/inmem_txnexample_c.html @@ -13,7 +13,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -138,7 +138,7 @@ * create our own thread IDs for reporting purposes. */ int global_thread_num; -pthread_mutex_t thread_num_lock; +mutex_t thread_num_lock; /* Forward declarations */ int count_records(DB *, DB_TXN *); @@ -162,7 +162,7 @@ main(void) DB *dbp = NULL; DB_ENV *envp = NULL; - pthread_t writer_threads[NUMWRITERS]; + thread_t writer_threads[NUMWRITERS]; int i, ret, ret_t; u_int32_t env_flags; @@ -294,16 +294,16 @@ main(void) we change the error message string so as to not reference the database filename. </p> <pre class="programlisting"> /* Initialize a pthread mutex. Used to help provide thread ids. */ - (void)pthread_mutex_init(&thread_num_lock, NULL); + (void)mutex_init(&thread_num_lock, NULL); /* Start the writer threads. */ for (i = 0; i < NUMWRITERS; i++) - (void)pthread_create( + (void)thread_create( &writer_threads[i], NULL, (void *)writer_thread, (void *)dbp); /* Join the writers */ for (i = 0; i < NUMWRITERS; i++) - (void)pthread_join(writer_threads[i], NULL); + (void)thread_join(writer_threads[i], NULL); err: /* Close our database handle, if it was opened. */ @@ -360,16 +360,16 @@ writer_thread(void *args) "key 9", "key 10"}; DB *dbp = (DB *)args; - DbEnv *envp = dbp-&gt;get_env(); + DbEnv *envp = dbp->get_env(); /* Get the thread number */ - (void)pthread_mutex_lock(&thread_num_lock); + (void)mutex_lock(&thread_num_lock); global_thread_num++; thread_num = global_thread_num; - (void)pthread_mutex_unlock(&thread_num_lock); + (void)mutex_unlock(&thread_num_lock); /* Initialize the random number generator */ - srand((u_int)pthread_self()); + srand(thread_num); /* Write 50 times and then quit */ for (i = 0; i < 50; i++) { @@ -379,13 +379,13 @@ retry: ret = envp->txn_begin(envp, NULL, &txn, 0); if (ret != 0) { envp->err(envp, ret, "txn_begin failed"); - return (EXIT_FAILURE); + return ((void *)EXIT_FAILURE); } for (j = 0; j < 10; j++) { /* Set up our key and values DBTs */ memset(&key, 0, sizeof(DBT)); key.data = key_strings[j]; - key.size = (strlen(key_strings[j]) + 1) * sizeof(char); + key.size = (u_int32_t)strlen(key_strings[j]) + 1; memset(&value, 0, sizeof(DBT)); payload = rand() + i; @@ -463,7 +463,7 @@ retry: /* * If all goes well, we can commit the transaction and - * loop to the next transaction. + * exit the thread. */ ret = txn->commit(txn, 0); if (ret != 0) { @@ -595,7 +595,7 @@ open_db(DB **dbpp, const char *progname, const char *file_name, experiment with this code, you can find the example in the following location in your DB distribution: </p> - <pre class="programlisting"><span class="emphasis"><em>DB_INSTALL</em></span>/examples_c/txn_guide</pre> + <pre class="programlisting"><span class="emphasis"><em>DB_INSTALL</em></span>/examples/c/txn_guide</pre> </div> <div class="navfooter"> <hr /> diff --git a/docs/gsg_txn/C/introduction.html b/docs/gsg_txn/C/introduction.html index 87a786ee..1c6789b6 100644 --- a/docs/gsg_txn/C/introduction.html +++ b/docs/gsg_txn/C/introduction.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/isolation.html b/docs/gsg_txn/C/isolation.html index 8ece9421..ea3f5276 100644 --- a/docs/gsg_txn/C/isolation.html +++ b/docs/gsg_txn/C/isolation.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/lockingsubsystem.html b/docs/gsg_txn/C/lockingsubsystem.html index 1f328844..3afc15af 100644 --- a/docs/gsg_txn/C/lockingsubsystem.html +++ b/docs/gsg_txn/C/lockingsubsystem.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -447,7 +447,7 @@ main(void) <pre class="programlisting">> /usr/local/db_install/bin/db_deadlock -h /export/dbenv -a y</pre> <p> For more information, see the - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/db_deadlock.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/api_reference/C/db_deadlock.html" target="_top"> <code class="literal">db_deadlock</code> reference documentation. </a> </p> diff --git a/docs/gsg_txn/C/logconfig.html b/docs/gsg_txn/C/logconfig.html index 4144f8e0..aff13a11 100644 --- a/docs/gsg_txn/C/logconfig.html +++ b/docs/gsg_txn/C/logconfig.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/logfileremoval.html b/docs/gsg_txn/C/logfileremoval.html index f75086c0..06a24646 100644 --- a/docs/gsg_txn/C/logfileremoval.html +++ b/docs/gsg_txn/C/logfileremoval.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/maxtxns.html b/docs/gsg_txn/C/maxtxns.html index b7f38a0d..709a1979 100644 --- a/docs/gsg_txn/C/maxtxns.html +++ b/docs/gsg_txn/C/maxtxns.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/moreinfo.html b/docs/gsg_txn/C/moreinfo.html index fe5648ac..fee48e13 100644 --- a/docs/gsg_txn/C/moreinfo.html +++ b/docs/gsg_txn/C/moreinfo.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -54,7 +54,7 @@ <ul type="disc"> <li> <p> - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg/C/index.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg/C/index.html" target="_top"> Getting Started with Berkeley DB for C </a> @@ -68,7 +68,7 @@ </li> <li> <p> - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg_db_rep/C/index.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg_db_rep/C/index.html" target="_top"> Berkeley DB Getting Started with Replicated Applications for C </a> @@ -77,7 +77,7 @@ </li> <li> <p> - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/index.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/programmer_reference/index.html" target="_top"> Berkeley DB Programmer's Reference Guide </a> </p> @@ -85,7 +85,7 @@ <li> <p> <span> - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/frame_main.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/api_reference/C/frame_main.html" target="_top"> Berkeley DB C API Reference Guide </a> @@ -115,7 +115,7 @@ downloads, visit - <a class="ulink" href="http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html</a>. + <a class="ulink" href="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html</a>. </p> </span> <div class="sect2" lang="en" xml:lang="en"> @@ -130,8 +130,8 @@ You can post your comments and questions at the Oracle Technology (OTN) forum for <span> - Oracle Berkeley DB at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>, - or for Oracle Berkeley DB High Availability at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=272</a>. + Oracle Berkeley DB at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a>, + or for Oracle Berkeley DB High Availability at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=272</a>. </span> diff --git a/docs/gsg_txn/C/multithread-intro.html b/docs/gsg_txn/C/multithread-intro.html index 05bc3602..d6d4f411 100644 --- a/docs/gsg_txn/C/multithread-intro.html +++ b/docs/gsg_txn/C/multithread-intro.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/nestedtxn.html b/docs/gsg_txn/C/nestedtxn.html index 830342a4..5e6a03ba 100644 --- a/docs/gsg_txn/C/nestedtxn.html +++ b/docs/gsg_txn/C/nestedtxn.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/nodurabletxn.html b/docs/gsg_txn/C/nodurabletxn.html index ed3a0642..e7b5ba1c 100644 --- a/docs/gsg_txn/C/nodurabletxn.html +++ b/docs/gsg_txn/C/nodurabletxn.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/perftune-intro.html b/docs/gsg_txn/C/perftune-intro.html index 7a8c2e67..97e1b001 100644 --- a/docs/gsg_txn/C/perftune-intro.html +++ b/docs/gsg_txn/C/perftune-intro.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -55,11 +55,11 @@ <span> However, for a more complete description of them, see the - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/transapp_tune.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/programmer_reference/transapp_tune.html" target="_top"> Transaction tuning </a> and - <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/transapp_throughput.html" target="_top"> + <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/programmer_reference/transapp_throughput.html" target="_top"> Transaction throughput </a> sections of the <em class="citetitle">Berkeley DB Programmer's Reference Guide</em>. diff --git a/docs/gsg_txn/C/preface.html b/docs/gsg_txn/C/preface.html index 1ffb0acc..805b272c 100644 --- a/docs/gsg_txn/C/preface.html +++ b/docs/gsg_txn/C/preface.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -73,8 +73,8 @@ have for deadlock detection. </p> <p> - This book describes Berkeley DB 11<span class="emphasis"><em>g</em></span> Release 2, which provides library - version 11.2.5.3. + This book describes Berkeley DB 12<span class="emphasis"><em>c</em></span> Release 1, which provides library + version 12.1.6.1. </p> <p> This book is aimed at the software engineer responsible for writing a diff --git a/docs/gsg_txn/C/readmodifywrite.html b/docs/gsg_txn/C/readmodifywrite.html index 72b686e0..0379fb95 100644 --- a/docs/gsg_txn/C/readmodifywrite.html +++ b/docs/gsg_txn/C/readmodifywrite.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/recovery-intro.html b/docs/gsg_txn/C/recovery-intro.html index 5a1a596f..756334df 100644 --- a/docs/gsg_txn/C/recovery-intro.html +++ b/docs/gsg_txn/C/recovery-intro.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/recovery.html b/docs/gsg_txn/C/recovery.html index d9884ee2..ad2e9a09 100644 --- a/docs/gsg_txn/C/recovery.html +++ b/docs/gsg_txn/C/recovery.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/reversesplit.html b/docs/gsg_txn/C/reversesplit.html index 949e0626..d4a1d0c0 100644 --- a/docs/gsg_txn/C/reversesplit.html +++ b/docs/gsg_txn/C/reversesplit.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/sysfailure.html b/docs/gsg_txn/C/sysfailure.html index 55442f47..46a5188b 100644 --- a/docs/gsg_txn/C/sysfailure.html +++ b/docs/gsg_txn/C/sysfailure.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/txn_ccursor.html b/docs/gsg_txn/C/txn_ccursor.html index e771903c..7c44d197 100644 --- a/docs/gsg_txn/C/txn_ccursor.html +++ b/docs/gsg_txn/C/txn_ccursor.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/txnconcurrency.html b/docs/gsg_txn/C/txnconcurrency.html index 61667bff..b2d699dc 100644 --- a/docs/gsg_txn/C/txnconcurrency.html +++ b/docs/gsg_txn/C/txnconcurrency.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/txncursor.html b/docs/gsg_txn/C/txncursor.html index f87fd6e3..16bd0d1d 100644 --- a/docs/gsg_txn/C/txncursor.html +++ b/docs/gsg_txn/C/txncursor.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/txnexample_c.html b/docs/gsg_txn/C/txnexample_c.html index ddb94dce..8927d7a5 100644 --- a/docs/gsg_txn/C/txnexample_c.html +++ b/docs/gsg_txn/C/txnexample_c.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -97,7 +97,7 @@ extern int getopt(int, char * const *, const char *); * create our own thread IDs for reporting purposes. */ int global_thread_num; -pthread_mutex_t thread_num_lock; +mutex_t thread_num_lock; /* Forward declarations */ int count_records(DB *, DB_TXN *); @@ -128,7 +128,7 @@ main(int argc, char *argv[]) DB *dbp = NULL; DB_ENV *envp = NULL; - pthread_t writer_threads[NUMWRITERS]; + thread_t writer_threads[NUMWRITERS]; int ch, i, ret, ret_t; u_int32_t env_flags; char *db_home_dir; @@ -274,16 +274,16 @@ main(int argc, char *argv[]) thread. </p> <pre class="programlisting"> /* Initialize a pthread mutex. Used to help provide thread ids. */ - (void)pthread_mutex_init(&thread_num_lock, NULL); + (void)mutex_init(&thread_num_lock, NULL); /* Start the writer threads. */ for (i = 0; i < NUMWRITERS; i++) - (void)pthread_create(&writer_threads[i], NULL, + (void)thread_create(&writer_threads[i], NULL, writer_thread, (void *)dbp); /* Join the writers */ for (i = 0; i < NUMWRITERS; i++) - (void)pthread_join(writer_threads[i], NULL); </pre> + (void)thread_join(writer_threads[i], NULL); </pre> <p> Finally, to wrap up <code class="function">main()</code>, we close out our database and environment handle, as is normal for any DB @@ -359,13 +359,13 @@ writer_thread(void *args) We use this random number generator for data generation. </p> <pre class="programlisting"> /* Get the thread number */ - (void)pthread_mutex_lock(&thread_num_lock); + (void)mutex_lock(&thread_num_lock); global_thread_num++; thread_num = global_thread_num; - (void)pthread_mutex_unlock(&thread_num_lock); + (void)mutex_unlock(&thread_num_lock); /* Initialize the random number generator */ - srand((u_int)pthread_self()); </pre> + srand(thread_num); </pre> <p> Now we begin the loop that we use to write data to the database. <span> @@ -429,8 +429,8 @@ retry: <pre class="programlisting"> for (j = 0; j < 10; j++) { /* Set up our key and values DBTs */ memset(&key, 0, sizeof(DBT)); - key.data = key_strings[j]; - key.size = (strlen(key_strings[j]) + 1) * sizeof(char); + key.data = (void *)key_strings[j]; + key.size = (u_int32_t)(strlen(key_strings[j]) + 1); memset(&value, 0, sizeof(DBT)); payload = rand() + i; @@ -523,7 +523,7 @@ retry: /* * If all goes well, we can commit the transaction and - * loop to the next transaction. + * exit the thread. */ ret = txn->commit(txn, 0); if (ret != 0) { @@ -615,12 +615,22 @@ retry: </p> <pre class="programlisting">/* * This simply counts the number of records contained in the - * database and returns the result. + * database and returns the result. You can use this function + * in three ways: + * + * First call it with an active txn handle. + * Secondly, configure the cursor for uncommitted reads (this + * is what the example currently does). + * Third, call count_records AFTER the writer has committed + * its transaction. + * + * If you do none of these things, the writer thread will + * self-deadlock. * * Note that this function exists only for illustrative purposes. * A more straight-forward way to count the number of records in * a database is to use DB->stat() or DB->stat_print(). - */ +*/ int count_records(DB *dbp, DB_TXN *txn) @@ -736,7 +746,7 @@ open_db(DB **dbpp, const char *progname, const char *file_name, experiment with this code, you can find the example in the following location in your DB distribution: </p> - <pre class="programlisting"><span class="emphasis"><em>DB_INSTALL</em></span>/examples_c/txn_guide</pre> + <pre class="programlisting"><span class="emphasis"><em>DB_INSTALL</em></span>/examples/c/txn_guide</pre> </div> <div class="navfooter"> <hr /> diff --git a/docs/gsg_txn/C/txnindices.html b/docs/gsg_txn/C/txnindices.html index 8d0fda98..a20f1dec 100644 --- a/docs/gsg_txn/C/txnindices.html +++ b/docs/gsg_txn/C/txnindices.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/txnnowait.html b/docs/gsg_txn/C/txnnowait.html index b7ee83dd..e6572021 100644 --- a/docs/gsg_txn/C/txnnowait.html +++ b/docs/gsg_txn/C/txnnowait.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/usingtxns.html b/docs/gsg_txn/C/usingtxns.html index 8b124476..1b8d96c9 100644 --- a/docs/gsg_txn/C/usingtxns.html +++ b/docs/gsg_txn/C/usingtxns.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> diff --git a/docs/gsg_txn/C/wrapup.html b/docs/gsg_txn/C/wrapup.html index 80543ba5..8a588fde 100644 --- a/docs/gsg_txn/C/wrapup.html +++ b/docs/gsg_txn/C/wrapup.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> |
