Permalink
Browse files

sync with tokyocabinet-1.4.5.tar.gz

  • Loading branch information...
1 parent 42f26cf commit 7e11ebcc82bcd82e4600f782155e65dcf6341a7f @etrepum etrepum committed Feb 13, 2009
Showing with 781 additions and 92 deletions.
  1. +12 −0 ChangeLog
  2. +10 −0 Makefile.in
  3. +11 −11 configure
  4. +3 −3 configure.in
  5. +1 −1 doc/index.html
  6. +1 −1 doc/index.ja.html
  7. +12 −8 doc/spex-en.html
  8. +15 −11 doc/spex-ja.html
  9. BIN hogehoge
  10. +1 −1 man/tcbdb.3
  11. +10 −10 man/tctdb.3
  12. +1 −1 man/tcutil.3
  13. +3 −0 myconf.c
  14. +16 −6 myconf.h
  15. +25 −4 tcbdb.h
  16. +263 −1 tcbmttest.c
  17. +13 −2 tcfdb.h
  18. +15 −14 tchdb.c
  19. +21 −5 tchdb.h
  20. +254 −0 tchmttest.c
  21. +18 −3 tctdb.h
  22. +48 −9 tcutil.h
  23. +28 −1 tokyocabinet.idl
View
@@ -1,3 +1,15 @@
+2009-02-02 Mikio Hirabayashi <mikio@users.sourceforge.net>
+
+ * tchdb.c (tchdbput, tchdbget, tchdbout): bugs related to race condition were fixed.
+
+ * tchdb.c (tchdbputimpl): bugs related to race condition were fixed.
+
+ * tchmttest.c (runrace, procrace): new functions.
+
+ * tcbmttest.c (runrace, procrace): new functions.
+
+ - Release: 1.4.5
+
2009-01-29 Mikio Hirabayashi <mikio@users.sourceforge.net>
* tcutil.c (tcmapputproc, tctreeputproc, tcmdbputproc, tcndbputproc): new functions.
View
@@ -262,6 +262,7 @@ check-hdb :
$(RUNENV) $(RUNCMD) ./tchmttest typical casket 5 50000 5000
$(RUNENV) $(RUNCMD) ./tchmttest typical -rr 1000 casket 5 50000 5000
$(RUNENV) $(RUNCMD) ./tchmttest typical -tl -rc 50000 -nc casket 5 50000 5000
+ $(RUNENV) $(RUNCMD) ./tchmttest race casket 5 10000
$(RUNENV) $(RUNCMD) ./tchmgr create casket 3 1 1
$(RUNENV) $(RUNCMD) ./tchmgr inform casket
$(RUNENV) $(RUNCMD) ./tchmgr put casket one first
@@ -338,6 +339,7 @@ check-bdb :
$(RUNENV) $(RUNCMD) ./tcbmttest typical casket 5 50000 5 5
$(RUNENV) $(RUNCMD) ./tcbmttest typical -rr 1000 casket 5 50000 5 5
$(RUNENV) $(RUNCMD) ./tcbmttest typical -tl -nc casket 5 50000 5 5
+ $(RUNENV) $(RUNCMD) ./tcbmttest race casket 5 10000
$(RUNENV) $(RUNCMD) ./tcbmgr create casket 4 4 3 1 1
$(RUNENV) $(RUNCMD) ./tcbmgr inform casket
$(RUNENV) $(RUNCMD) ./tcbmgr put casket one first
@@ -576,6 +578,14 @@ check-forever :
done
+check-race :
+ while true ; \
+ do \
+ ./tchmttest race casket 5 10000 || break ; \
+ ./tcbmttest race casket 5 10000 || break ; \
+ done
+
+
words :
rm -f casket-* words.tsv
cat /usr/share/dict/words | \
View
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for tokyocabinet 1.4.4.
+# Generated by GNU Autoconf 2.61 for tokyocabinet 1.4.5.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,8 +572,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='tokyocabinet'
PACKAGE_TARNAME='tokyocabinet'
-PACKAGE_VERSION='1.4.4'
-PACKAGE_STRING='tokyocabinet 1.4.4'
+PACKAGE_VERSION='1.4.5'
+PACKAGE_STRING='tokyocabinet 1.4.5'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -1192,7 +1192,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tokyocabinet 1.4.4 to adapt to many kinds of systems.
+\`configure' configures tokyocabinet 1.4.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1253,7 +1253,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tokyocabinet 1.4.4:";;
+ short | recursive ) echo "Configuration of tokyocabinet 1.4.5:";;
esac
cat <<\_ACEOF
@@ -1354,7 +1354,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tokyocabinet configure 1.4.4
+tokyocabinet configure 1.4.5
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1368,7 +1368,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tokyocabinet $as_me 1.4.4, which was
+It was created by tokyocabinet $as_me 1.4.5, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1724,7 +1724,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Package information
MYLIBVER=7
-MYLIBREV=9
+MYLIBREV=10
MYFORMATVER="1.0"
# Targets
@@ -1746,7 +1746,7 @@ MYPCFILES="tokyocabinet.pc"
# Building flags
MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
-MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT"
+MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
MYCMDLDFLAGS=""
MYRUNPATH="\$(LIBDIR)"
@@ -6346,7 +6346,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tokyocabinet $as_me 1.4.4, which was
+This file was extended by tokyocabinet $as_me 1.4.5, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6389,7 +6389,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-tokyocabinet config.status 1.4.4
+tokyocabinet config.status 1.4.5
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
View
@@ -7,11 +7,11 @@
#================================================================
# Package name
-AC_INIT(tokyocabinet, 1.4.4)
+AC_INIT(tokyocabinet, 1.4.5)
# Package information
MYLIBVER=7
-MYLIBREV=9
+MYLIBREV=10
MYFORMATVER="1.0"
# Targets
@@ -33,7 +33,7 @@ MYPCFILES="tokyocabinet.pc"
# Building flags
MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
-MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT"
+MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
MYCMDLDFLAGS=""
MYRUNPATH="\$(LIBDIR)"
View
@@ -126,7 +126,7 @@ <h2 id="packages">Packages</h2>
<p>The following are the source packages of Tokyo Cabinet. As for binary packages, see the site of each distributor.</p>
<ul>
-<li><a href="tokyocabinet-1.4.4.tar.gz">Latest Source Package (version 1.4.4)</a></li>
+<li><a href="tokyocabinet-1.4.5.tar.gz">Latest Source Package (version 1.4.5)</a></li>
<li><a href="pastpkg/">Past Versions</a></li>
</ul>
View
@@ -167,7 +167,7 @@ <h2 id="packages">ダウンロード</h2>
<p>以下のソースパッケージをダウンロードしてください。バイナリパッケージについては、各ディストリビュータのサイトをご覧ください。</p>
<ul>
-<li><a href="tokyocabinet-1.4.4.tar.gz">最新のソースパッケージ(バージョン1.4.4)</a></li>
+<li><a href="tokyocabinet-1.4.5.tar.gz">最新のソースパッケージ(バージョン1.4.5)</a></li>
<li><a href="pastpkg/">過去のバージョン</a></li>
</ul>
View
@@ -1016,7 +1016,7 @@ <h3 id="tcutilapi_treeapi">API of Ordered Tree</h3>
<dl class="api">
<dt><code>TCTREE *tctreenew2(TCCMP <var>cmp</var>, void *<var>cmpop</var>);</code></dt>
-<dd>`<var>cmp</var>' specifies the pointer to the custom comparison function.</dd>
+<dd>`<var>cmp</var>' specifies the pointer to the custom comparison function. It receives five parameters. The first parameter is the pointer to the region of one key. The second parameter is the size of the region of one key. The third parameter is the pointer to the region of the other key. The fourth parameter is the size of the region of the other key. The fifth parameter is the pointer to the optional opaque object. It returns positive if the former is big, negative if the latter is big, 0 if both are equivalent.</dd>
<dd>`<var>cmpop</var>' specifies an arbitrary pointer to be given as a parameter of the comparison function. If it is not needed, `NULL' can be specified.</dd>
<dd>The return value is the new tree object.</dd>
<dd>The default comparison function compares keys of two records by lexical order. The functions `tccmplexical' (dafault), `tccmpdecimal', `tccmpint32', and `tccmpint64' are built-in.</dd>
@@ -3537,6 +3537,8 @@ <h3 id="tchdbapi_cli">CLI</h3>
<dd>Perform updating operations selected at random.</dd>
<dt><code>tchmttest typical [-tl] [-td|-tb|-tt|-tx] [-rc <var>num</var>] [-xm <var>num</var>] [-nl|-nb] [-nc] [-rr <var>num</var>] <var>path</var> <var>tnum</var> <var>rnum</var> [<var>bnum</var> [<var>apow</var> [<var>fpow</var>]]</code></dt>
<dd>Perform typical operations selected at random.</dd>
+<dt><code>tchmttest race [-tl] [-td|-tb|-tt|-tx] [-xm <var>num</var>] [-nl|-nb] <var>path</var> <var>tnum</var> <var>rnum</var> [<var>bnum</var> [<var>apow</var> [<var>fpow</var>]]</code></dt>
+<dd>Perform race condition test.</dd>
</dl>
<p>Options feature the following.</p>
@@ -3679,7 +3681,7 @@ <h3 id="tcbdbapi_api">API</h3>
<dl class="api">
<dt><code>bool tcbdbsetcmpfunc(TCBDB *<var>bdb</var>, TCCMP <var>cmp</var>, void *<var>cmpop</var>);</code></dt>
<dd>`<var>bdb</var>' specifies the B+ tree database object which is not opened.</dd>
-<dd>`<var>cmp</var>' specifies the pointer to the custom comparison function.</dd>
+<dd>`<var>cmp</var>' specifies the pointer to the custom comparison function. It receives five parameters. The first parameter is the pointer to the region of one key. The second parameter is the size of the region of one key. The third parameter is the pointer to the region of the other key. The fourth parameter is the size of the region of the other key. The fifth parameter is the pointer to the optional opaque object. It returns positive if the former is big, negative if the latter is big, 0 if both are equivalent.</dd>
<dd>`<var>cmpop</var>' specifies an arbitrary pointer to be given as a parameter of the comparison function. If it is not needed, `NULL' can be specified.</dd>
<dd>If successful, the return value is true, else, it is false.</dd>
<dd>The default comparison function compares keys of two records by lexical order. The functions `tccmplexical' (dafault), `tccmpdecimal', `tccmpint32', and `tccmpint64' are built-in. Note that the comparison function should be set before the database is opened. Moreover, user-defined comparison functions should be set every time the database is being opened.</dd>
@@ -4440,6 +4442,8 @@ <h3 id="tcbdbapi_cli">CLI</h3>
<dd>Perform updating operations selected at random.</dd>
<dt><code>tcbmttest typical [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] [-nc] [-rr <var>num</var>] <var>path</var> <var>tnum</var> <var>rnum</var> [<var>lmemb</var> [<var>nmemb</var> [<var>bnum</var> [<var>apow</var> [<var>fpow</var>]]]]]</code></dt>
<dd>Perform typical operations selected at random.</dd>
+<dt><code>tcbmttest race [-tl] [-td|-tb|-tt|-tx] [-nl|-nb] <var>path</var> <var>tnum</var> <var>rnum</var> [<var>lmemb</var> [<var>nmemb</var> [<var>bnum</var> [<var>apow</var> [<var>fpow</var>]]]]]</code></dt>
+<dd>Perform race condition test.</dd>
</dl>
<p>Options feature the following.</p>
@@ -5713,21 +5717,21 @@ <h3 id="tctdbapi_api">API</h3>
<dd>Because the object of the return value is created with the function `tclistnew', it should be deleted with the function `tclistdel' when it is no longer in use.</dd>
</dl>
-<p>The function `tctdbqryproc' is used in order to process each record corresponding to a query object.</p>
+<p>The function `tctdbqrysearchout' is used in order to remove each record corresponding to a query object.</p>
<dl class="api">
-<dt><code>bool tctdbqryproc(TDBQRY *<var>qry</var>, TDBQRYPROC <var>proc</var>, void *<var>op</var>);</code></dt>
+<dt><code>bool tctdbqrysearchout(TDBQRY *<var>qry</var>);</code></dt>
<dd>`<var>qry</var>' specifies the query object of the database connected as a writer.</dd>
-<dd>`<var>proc</var>' specifies the pointer to the iterator function called for each record.</dd>
-<dd>`<var>op</var>' specifies an arbitrary pointer to be given as a parameter of the iterator function. If it is not needed, `NULL' can be specified.</dd>
<dd>If successful, the return value is true, else, it is false.</dd>
</dl>
-<p>The function `tctdbqrysearchout' is used in order to remove each record corresponding to a query object.</p>
+<p>The function `tctdbqryproc' is used in order to process each record corresponding to a query object.</p>
<dl class="api">
-<dt><code>bool tctdbqrysearchout(TDBQRY *<var>qry</var>);</code></dt>
+<dt><code>bool tctdbqryproc(TDBQRY *<var>qry</var>, TDBQRYPROC <var>proc</var>, void *<var>op</var>);</code></dt>
<dd>`<var>qry</var>' specifies the query object of the database connected as a writer.</dd>
+<dd>`<var>proc</var>' specifies the pointer to the iterator function called for each record. It receives four parameters. The first parameter is the pointer to the region of the primary key. The second parameter is the size of the region of the primary key. The third parameter is a map object containing columns. The fourth parameter is the pointer to the optional opaque object. It returns flags of the post treatment by bitwise or: `TDBQPPUT' to modify the record, `TDBQPOUT' to remove the record, `TDBQPSTOP' to stop the iteration.</dd>
+<dd>`<var>op</var>' specifies an arbitrary pointer to be given as a parameter of the iterator function. If it is not needed, `NULL' can be specified.</dd>
<dd>If successful, the return value is true, else, it is false.</dd>
</dl>
Oops, something went wrong.

0 comments on commit 7e11ebc

Please sign in to comment.