diff options
Diffstat (limited to 'src/regress/lib/libc/db/README')
| -rw-r--r-- | src/regress/lib/libc/db/README | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/regress/lib/libc/db/README b/src/regress/lib/libc/db/README new file mode 100644 index 0000000000..fddf5c3d5a --- /dev/null +++ b/src/regress/lib/libc/db/README | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | # $NetBSD: README,v 1.5 1996/05/03 21:54:19 cgd Exp $ | ||
| 2 | # @(#)README 8.8 (Berkeley) 7/31/94 | ||
| 3 | |||
| 4 | To run the tests, enter "make regress". | ||
| 5 | |||
| 6 | Fairly large files (the command files) are built in this directory during | ||
| 7 | the test runs, and even larger files (the database files) are created in | ||
| 8 | "/var/tmp". If the latter directory doesn't exist, set the environmental | ||
| 9 | variable TMPDIR to a directory where the files can be built. | ||
| 10 | |||
| 11 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | ||
| 12 | The script file consists of lines with an initial character which is | ||
| 13 | the command for that line, or an initial character indicating a key | ||
| 14 | or data entry for a previous command. | ||
| 15 | |||
| 16 | Legal command characters are as follows: | ||
| 17 | |||
| 18 | c: compare a record | ||
| 19 | + must be followed by [kK][dD]; the data value in the database | ||
| 20 | associated with the specified key is compared to the specified | ||
| 21 | data value. | ||
| 22 | e: echo a string | ||
| 23 | + writes out the rest of the line into the output file; if the | ||
| 24 | last character is not a carriage-return, a newline is appended. | ||
| 25 | f: set the flags for the next command | ||
| 26 | + no value zero's the flags | ||
| 27 | g: do a get command | ||
| 28 | + must be followed by [kK] | ||
| 29 | + writes out the retrieved data DBT. | ||
| 30 | o [r]: dump [reverse] | ||
| 31 | + dump the database out, if 'r' is set, in reverse order. | ||
| 32 | p: do a put command | ||
| 33 | + must be followed by [kK][dD] | ||
| 34 | r: do a del command | ||
| 35 | + must be followed by [kK] unless R_CURSOR flag set. | ||
| 36 | S: sync the database | ||
| 37 | s: do a seq command | ||
| 38 | + must be followed by [kK] if R_CURSOR flag set. | ||
| 39 | + writes out the retrieved data DBT. | ||
| 40 | |||
| 41 | Legal key/data characters are as follows: | ||
| 42 | |||
| 43 | D [file]: data file | ||
| 44 | + set the current data value to the contents of the file | ||
| 45 | d [data]: | ||
| 46 | + set the current key value to the contents of the line. | ||
| 47 | K [file]: key file | ||
| 48 | + set the current key value to the contents of the file | ||
| 49 | k [data]: | ||
| 50 | + set the current key value to the contents of the line. | ||
| 51 | |||
| 52 | Blank lines, lines with leading white space, and lines with leading | ||
| 53 | hash marks (#) are ignored. | ||
| 54 | |||
| 55 | Options to dbtest are as follows: | ||
| 56 | |||
| 57 | -d: Set the DB_LOCK flag. | ||
| 58 | -f: Use the file argument as the database file. | ||
| 59 | -i: Use the rest of the argument to set elements in the info | ||
| 60 | structure. If the type is btree, then "-i cachesize=10240" | ||
| 61 | will set BTREEINFO.cachesize to 10240. | ||
| 62 | -o: The rest of the argument is the output file instead of | ||
| 63 | using stdout. | ||
| 64 | -s: Don't delete the database file before opening it, i.e. | ||
| 65 | use the database file from a previous run. | ||
| 66 | |||
| 67 | Dbtest requires two arguments, the type of access "hash", "recno" | ||
| 68 | or "btree", and the script name or "-" to indicate stdin. | ||
