!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/share/doc/db4-devel-4.3.27/ref/upgrade.3.1/   drwxr-xr-x
Free 3.56 GB of 27.03 GB (13.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     put.html (3.71 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Berkeley DB Reference Guide: Release 3.1: DB->put

Berkeley DB Reference Guide:
Upgrading Berkeley DB Applications

PrevRefNext

Release 3.1: DB->put

For the Queue and Recno access methods, when the DB_APPEND flag is specified to the DB->put method, the allocated record number is returned to the application in the key DBT argument. In previous releases of Berkeley DB, this DBT structure did not follow the usual DBT conventions. For example, it was not possible to cause Berkeley DB to allocate space for the returned record number. Rather, it was always assumed that the data field of the key structure referred to memory that could be used as storage for a db_recno_t type.

As of the Berkeley DB 3.1.0 release, the key structure behaves as described in the DBT C++/Java class or C structure documentation.

Applications which are using the DB_APPEND flag for Queue and Recno access method databases will require a change to upgrade to the Berkeley DB 3.1 releases. The simplest change is likely to be to add the DB_DBT_USERMEM flag to the key structure. For example, code that appears as follows:

DBT key;
db_recno_t recno;

memset(&key, 0, sizeof(DBT)); key.data = &recno; key.size = sizeof(recno); DB->put(DB, NULL, &key, &data, DB_APPEND); printf("new record number is %lu\n", (u_long)recno);

would be changed to:

DBT key;
db_recno_t recno;

memset(&key, 0, sizeof(DBT)); key.data = &recno; key.ulen = sizeof(recno); key.flags = DB_DBT_USERMEM; DB->put(DB, NULL, &key, &data, DB_APPEND); printf("new record number is %lu\n", (u_long)recno);

Note that the ulen field is now set as well as the flag value. An alternative change would be:

DBT key;
db_recno_t recno;

memset(&key, 0, sizeof(DBT)); DB->put(DB, NULL, &key, &data, DB_APPEND); recno = *(db_recno_t *)key->data; printf("new record number is %lu\n", (u_long)recno);


PrevRefNext

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.003 ]--