1 message in com.mysql.lists.ndb-connectorsRev 221: Fixed async transaction dele...
FromSent OnAttachments
Monty Taylor30 Oct 2007 01:55 
Subject:Rev 221: Fixed async transaction delete. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
From:Monty Taylor (mtay@mysql.com)
Date:10/30/2007 01:55:50 AM
List:com.mysql.lists.ndb-connectors

At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge

------------------------------------------------------------ revno: 221 revision-id: mtay@mysql.com-20071030085554-ro0uyb36hc111jy4 parent: mtay@mysql.com-20071029175601-tkh9cat56cqorsg8 committer: Monty Taylor <mtay@mysql.com> branch nick: ndbjmerge timestamp: Tue 2007-10-30 08:55:54 +0000 message: Fixed async transaction delete. modified: acinclude.m4 acinclude.m4-20070228020914-u2pk759xg7thauwf-8 java/com/mysql/cluster/ndbj/examples/TestAsync.java
testasync.java-20070703002120-jsnz1ul38pp1h3w3-1 swig/ndbglobals.i globals.i-20070228021421-qkr4cbpxymyqdrf3-7 === modified file 'acinclude.m4' --- a/acinclude.m4 2007-10-29 10:26:03 +0000 +++ b/acinclude.m4 2007-10-30 08:55:54 +0000 @@ -2,37 +2,38 @@ dnl configure.in helper macros dnl

-AC_DEFUN([WITH_PHP], [ - - AC_ARG_WITH(php, [ --with-php=PATH path to php_config binary], - with_php=$withval, withval="no") - - if test "X$withval" != "Xno" ; then - if test "X$withval" != "Xyes" ; then - AC_CHECK_PROGS(PHP_CONFIG, $withval) - else - AC_CHECK_PROGS(PHP_CONFIG, [ php-config php-config5 ]) - fi - else - with_php="no" - fi - -if test "X$PHP_CONFIG" != "X"; then - PHP_CFLAGS=`$PHP_CONFIG --includes` - PHP_CPPFLAGS=`$PHP_CONFIG --includes` - PHP_LDFLAGS=`$PHP_CONFIG --ldflags` - PHP_EXTDIR=`$PHP_CONFIG --extension-dir` -else - PHP_CFLAGS= - PHP_CPPFLAGS= - PHP_LDFLAGS= - PHP_EXTDIR= -fi - -AC_SUBST(PHP_CFLAGS) -AC_SUBST(PHP_CPPFLAGS) -AC_SUBST(PHP_LDFLAGS) -AC_SUBST(PHP_EXTDIR) +AC_DEFUN([WITH_PHP],[ + + AC_ARG_WITH([php], + [AS_HELP_STRING([--with-php], + [Build NDB/PHP @<:@default=no@:>@])], + [with_php=$withval], + [with_php=no]) + + AS_IF([test "x$with_php" != "xno"],[ + AS_IF([test "x$with_php" != "xyes"], + [ac_check_php_config=$with_php], + [ac_check_php_config="php-config php-config5"]) + AC_CHECK_PROGS(PHP_CONFIG, [$ac_check_php_config]) + ]) + + AS_IF([test "x$PHP_CONFIG" != "x"],[ + PHP_CFLAGS=`$PHP_CONFIG --includes` + PHP_CPPFLAGS=`$PHP_CONFIG --includes` + PHP_LDFLAGS=`$PHP_CONFIG --ldflags` + PHP_EXTDIR=`$PHP_CONFIG --extension-dir` + ],[ + PHP_CFLAGS= + PHP_CPPFLAGS= + PHP_LDFLAGS= + PHP_EXTDIR= + with_php=no + ]) + + AC_SUBST(PHP_CFLAGS) + AC_SUBST(PHP_CPPFLAGS) + AC_SUBST(PHP_LDFLAGS) + AC_SUBST(PHP_EXTDIR) ])

AC_DEFUN([WITH_PYTHON], [ @@ -75,67 +76,70 @@

AC_DEFUN([WITH_PERL], [

- AC_ARG_WITH(perl, [ --with-perl=PATH path to perl binary], - with_perl=$withval, withval="yes") - - - if test "X$withval" != "Xno" ; then - if test "X$withval" != "Xyes" ; then - AC_CHECK_PROGS(PERL, $withval) - else - AC_CHECK_PROGS(PERL, perl) - fi - fi -if test "X$PERL" != "X"; then - PERLCCFLAGS=`$PERL -MConfig -e 'print $Config{ccflags};'` - PERLCPPFLAGS=`$PERL -MConfig -e 'print $Config{cppflags};'` - PERLLIBS=`$PERL -MConfig -e 'print $Config{perllibs};'` -fi + AC_ARG_WITH([perl], + [AS_HELP_STRING([--with-perl], + [BULD NDB/Perl @<:@default=yes@:>@])], + [with_perl=$withval], + [with_perl=perl]) + + + AS_IF([test "x$with_perl" != "xno"],[ + AS_IF([test "x$with_perl" != "xyes"], + [ac_chk_perl=$with_perl], + [ac_chk_perl=perl]) + AC_CHECK_PROGS(PERL,$ac_chk_perl) + ]) + +dnl Don't think we need these anymore, but it's a good reference +dnl if test "x$PERL" != "x"; then +dnl PERLCCFLAGS=`$PERL -MConfig -e 'print $Config{ccflags};'` +dnl PERLCPPFLAGS=`$PERL -MConfig -e 'print $Config{cppflags};'` +dnl PERLLIBS=`$PERL -MConfig -e 'print $Config{perllibs};'` +dnl fi

])

AC_DEFUN([WITH_RUBY], [

- AC_ARG_WITH(ruby, [ --with-ruby=PATH path to ruby binary], - withval=$withval, withval="yes") - - if test "X$withval" != "Xno" ; then - if test "X$withval" != "Xyes" ; then - AC_CHECK_PROGS(RUBY, $withval) - else - AC_CHECK_PROGS(RUBY, ruby) - fi - fi - - -if test "X$RUBY" != X; then - - dnl need to change quotes to allow square brackets - changequote(<<, >>)dnl - ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"` - RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"` - LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts
Config::CONFIG['LIBRUBYARG_SHARED']"` - RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"` - RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"` - changequote([, ])dnl - - RUBY_INCLUDES="-I$ruby_prefix" -else - # This allows 'make clean' in the ruby directory to work when - # ruby isn't available - RUBY= - RUBY_INCLUDES= - LIBRUBYARG_SHARED= - RUBY_LIB= - RUBY_DIR= - RUBY_LIBDIR= -fi -AC_SUBST(RUBY_INCLUDES) -AC_SUBST(LIBRUBYARG_SHARED) -AC_SUBST(RUBY_LIB) -AC_SUBST(RUBY_DIR) -AC_SUBST(RUBY_LIBDIR) - + AC_ARG_WITH([ruby],[--with-ruby], + [BULD NDB/Ruby @<:@default=yes@:>@], + [with_ruby=$withval], + [with_ruby=ruby]) + + AS_IF([test "x$with_ruby" != "xno"],[ + AS_IF([test "x$with_ruby" != "xyes"], + [ac_chk_ruby=$with_ruby], + [ac_chk_ruby=ruby]) + AC_CHECK_PROGS(RUBY,$ac_chk_ruby) + ]) + + AS_IF([test "x$RUBY" != "x"],[ + + dnl need to change quotes to allow square brackets + changequote(<<, >>)dnl + ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"` + RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"` + LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts
Config::CONFIG['LIBRUBYARG_SHARED']"` + RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"` + RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"` + RUBY_INCLUDES="-I$ruby_prefix" + changequote([, ])dnl + ],[ + # This allows 'make clean' in the ruby directory to work when + # ruby isn't available + RUBY= + RUBY_INCLUDES= + LIBRUBYARG_SHARED= + RUBY_LIB= + RUBY_DIR= + RUBY_LIBDIR= + ]) + + AC_SUBST(RUBY_INCLUDES) + AC_SUBST(LIBRUBYARG_SHARED) + AC_SUBST(RUBY_LIB) + AC_SUBST(RUBY_DIR) + AC_SUBST(RUBY_LIBDIR)

])

=== modified file 'java/com/mysql/cluster/ndbj/examples/TestAsync.java' --- a/java/com/mysql/cluster/ndbj/examples/TestAsync.java 2007-10-24 02:46:38
+0000 +++ b/java/com/mysql/cluster/ndbj/examples/TestAsync.java 2007-10-30 08:55:54
+0000 @@ -121,12 +121,11 @@ for(int i=0;i<BATCH_SIZE-offset;i++) {

- java.math.BigInteger auto_id =
myNdb.getAutoIncrementValue(myTable,BATCH_SIZE); NdbOperation myOperation = myTransaction.getNdbOperation(myTable);

myOperation.insertTuple();

- myOperation.equal("ATTR1",((t-1)*BATCH_SIZE)+i); + myOperation.equalInt("ATTR1",((t-1)*BATCH_SIZE)+i); myOperation.setLong("ATTR2", t*BATCH_SIZE+i);

} @@ -196,7 +195,7 @@ NdbOperation myOper = myTrans.getNdbOperation(table_name); myOper.readTuple(NdbOperation.LockMode.LM_Read);

- myOper.equal("ATTR1",id_num); + myOper.equalInt("ATTR1",id_num);

myOper.getValue("ATTR2");

@@ -232,8 +231,7 @@ NdbOperation myOper = myTrans.getNdbOperation(table_name); myOper.readTuple(NdbOperation.LockMode.LM_Read);

- myOper.equal("ATTR1",id_num); - + myOper.equalInt("ATTR1",id_num);

myOper.getValue("ATTR2");

@@ -242,7 +240,6 @@

myTrans.executeAsynchPrepare(ExecType.Commit, cb,
AbortOption.AbortOnError); cbs.add(cb); - // foo=myRecAttr.int32_value(); // myNdb.closeTransaction(myTrans); }

=== modified file 'swig/ndbglobals.i' --- a/swig/ndbglobals.i 2007-10-25 13:24:04 +0000 +++ b/swig/ndbglobals.i 2007-10-30 08:55:54 +0000 @@ -40,9 +40,6 @@ void theNdbCallback(int ret, NdbTransaction * trans, void * anyObject) { BaseCallback * cb = (BaseCallback *)anyObject; cb->callback(ret, trans); - /* TODO: Fix the transaction leak here so we don't need this */ - trans->close(); - delete cb; }

class BaseEventCallback {