mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Improve accuracy of put documentation. Addresses #52.
git-svn-id: file:///svn/tokudb@1215 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
a1ede89ae2
commit
6f7605553c
2 changed files with 16 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
@page
|
||||
@section @code{DB->put}
|
||||
@setfilename tokudb
|
||||
@settitle DB->put
|
||||
|
@ -26,7 +27,7 @@ Data items are limited to 256KB in size (for now.)
|
|||
@c man begin PARAMETERS
|
||||
@table @var
|
||||
@item db
|
||||
The @code{DB} handle for the database}.
|
||||
The @code{DB} handle for the database.
|
||||
@item txnid
|
||||
Either @code{NULL} or a @code{TXNID}.
|
||||
@item key
|
||||
|
@ -34,11 +35,15 @@ The key to be inserted.
|
|||
@item data
|
||||
The data to be inserted.
|
||||
@item flags
|
||||
Must not be zero, but instead must be one of the following flagsd:.
|
||||
Must be zero or must be one of the following flags. However, @code{flags} must be nonzero for sorted duplicates.
|
||||
@table @code
|
||||
@item 0
|
||||
For non-dup databases, insert the new key/data pair, overwriting any pair with a matching key.
|
||||
Zero is not allowed databases with duplicates (returns @code{EINVAL}).
|
||||
|
||||
@item DB_YESOVERWRITE
|
||||
|
||||
Insert the new key/data pair, overwriting any matching pair.. If the
|
||||
Insert the new key/data pair, overwriting any matching pair. If the
|
||||
database supports sorted duplicates, then the matching key/data pair
|
||||
(if any) is overwritten. If the database does not support duplicates,
|
||||
then the pair with a matching key (if any) is overwritten. (TokuDB
|
||||
|
@ -64,6 +69,7 @@ it the implementation must perform a @code{DB->get} to determine
|
|||
whether the pair already exists.
|
||||
@end table
|
||||
|
||||
|
||||
Rationale: Using @code{0} for flags does not give the results that
|
||||
many users expect. The Berkeley DB documentation says that someday
|
||||
they will support duplicate duplicates, and that if you want the
|
||||
|
@ -96,9 +102,12 @@ In an environment configured for lock timeouts, the system was unable to grant a
|
|||
@item ENOENT
|
||||
The file or directory does not exist.
|
||||
@item EINVAL
|
||||
You passed invalid parameters to this operation.
|
||||
You passed invalid parameters to this operation.
|
||||
|
||||
If @var{flags} is zero, returns @code{BEINVAL}.
|
||||
In particular, if you pass 0 to a database configured for duplicates,
|
||||
then @code{DB->put()} returns @code{EINVAL}.
|
||||
|
||||
@end table
|
||||
@c man end
|
||||
|
||||
@include everyman.texi
|
||||
|
|
|
@ -39,6 +39,8 @@ Copyright @copyright{} 2007, Tokutek, Inc.
|
|||
|
||||
@include tdb_del.texi
|
||||
|
||||
@include tdb_put.texi
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue