List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:October 30 2007 12:55pm
Subject:Rev 201: Merged in changes from devel. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3

------------------------------------------------------------
revno: 201
revision-id: mtaylor@stripped
parent: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: telco-6.3
timestamp: Tue 2007-10-30 12:55:23 +0000
message:
  Merged in changes from devel.
modified:
  acinclude.m4                   acinclude.m4-20070228020914-u2pk759xg7thauwf-8
  java/com/mysql/cluster/ndbj/Ndb.java ndb.java-20070517181935-98huwjarzuh25b30-2
  java/com/mysql/cluster/ndbj/examples/TestAsync.java
testasync.java-20070703002120-jsnz1ul38pp1h3w3-1
  java/ndbj.i                    ndbj.i-20070913223244-5938mztpztyn9sry-1
  java/testsuite/BaseTestCase.java basetestcase.java-20070523000102-ggam3j202kmrm4es-5
  swig/Ndb.i                     ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
  swig/ndbglobals.i              globals.i-20070228021421-qkr4cbpxymyqdrf3-7
    ------------------------------------------------------------
    revno: 192.1.30
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Tue 2007-10-30 12:02:51 +0000
    message:
      Merged in changes.
    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
        ------------------------------------------------------------
        revno: 192.1.25.1.5
        revision-id: mtaylor@stripped
        parent: mtaylor@stripped
        committer: Monty Taylor <mtaylor@stripped>
        branch nick: ndbjmerge
        timestamp: Tue 2007-10-30 12:02:14 +0000
        message:
          Added helper getTimeMicros() function.
        modified:
          swig/ndbglobals.i              globals.i-20070228021421-qkr4cbpxymyqdrf3-7
        ------------------------------------------------------------
        revno: 192.1.25.1.4
        revision-id: mtaylor@stripped
        parent: mtaylor@stripped
        committer: Monty Taylor <mtaylor@stripped>
        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
    ------------------------------------------------------------
    revno: 192.1.29
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Mon 2007-10-29 18:15:09 +0000
    message:
      Merged changes. 
        ------------------------------------------------------------
        revno: 192.1.25.1.3
        revision-id: mtaylor@stripped
        parent: mtaylor@stripped
        parent: mtaylor@stripped
        committer: Monty Taylor <mtaylor@stripped>
        branch nick: ndbjmerge
        timestamp: Mon 2007-10-29 17:56:01 +0000
        message:
          Merged devel changes.
        modified:
          java/ndbj.i                    ndbj.i-20070913223244-5938mztpztyn9sry-1
        ------------------------------------------------------------
        revno: 192.1.25.1.2
        revision-id: mtaylor@stripped
        parent: mtaylor@stripped
        parent: mtaylor@stripped
        committer: Monty Taylor <mtaylor@stripped>
        branch nick: ndbjmerge
        timestamp: Mon 2007-10-29 17:55:44 +0000
        message:
          Fixed test suite error message
        modified:
          java/testsuite/BaseTestCase.java
basetestcase.java-20070523000102-ggam3j202kmrm4es-5
    ------------------------------------------------------------
    revno: 192.1.28
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Mon 2007-10-29 17:56:16 +0000
    message:
      Merged ndbjmerge changes.
    modified:
      java/com/mysql/cluster/ndbj/Ndb.java ndb.java-20070517181935-98huwjarzuh25b30-2
      swig/Ndb.i                     ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
        ------------------------------------------------------------
        revno: 192.1.25.1.1
        revision-id: mtaylor@stripped
        parent: mtaylor@stripped
        committer: Monty Taylor <mtaylor@stripped>
        branch nick: ndbjmerge
        timestamp: Mon 2007-10-29 17:51:35 +0000
        message:
          Added pollNdb
        modified:
          java/com/mysql/cluster/ndbj/Ndb.java ndb.java-20070517181935-98huwjarzuh25b30-2
          swig/Ndb.i                     ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
    ------------------------------------------------------------
    revno: 192.1.27
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Mon 2007-10-29 17:52:57 +0000
    message:
      Put in realClose() redirect.
    modified:
      java/ndbj.i                    ndbj.i-20070913223244-5938mztpztyn9sry-1
    ------------------------------------------------------------
    revno: 192.1.26
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Mon 2007-10-29 16:39:46 +0000
    message:
      Made logDebug print to STDOUT instead of STDERR so junit doesn't freak.
    modified:
      java/testsuite/BaseTestCase.java basetestcase.java-20070523000102-ggam3j202kmrm4es-5
=== 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/Ndb.java'
--- a/java/com/mysql/cluster/ndbj/Ndb.java	2007-10-28 00:05:03 +0000
+++ b/java/com/mysql/cluster/ndbj/Ndb.java	2007-10-29 17:51:35 +0000
@@ -132,4 +132,14 @@
 
 	public int pollEvents(int aMillisecondNumber) throws NdbApiException;
 
+	public void sendPreparedTransactions(int forceSend);
+
+	public void sendPreparedTransactions();
+
+	public int pollNdb(int aMillisecondNumber, int minNoOfEventsToWakeup) throws
NdbApiException;
+
+	public int pollNdb(int aMillisecondNumber) throws NdbApiException;
+
+	public int pollNdb() throws NdbApiException;
+
 }
\ No newline at end of file

=== 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 'java/ndbj.i'
--- a/java/ndbj.i	2007-10-28 00:46:51 +0000
+++ b/java/ndbj.i	2007-10-30 12:55:23 +0000
@@ -434,6 +434,14 @@
   %}
 */
 
+%rename(realClose) NdbTransaction::close;
+%typemap(javacode) NdbTransaction %{
+  public void close() { 
+    this.realClose();
+    this.swigCPtr=0;
+  }
+%}
+
 %include "NdbTransaction.i"
 
 %extend NdbTransaction { 

=== modified file 'java/testsuite/BaseTestCase.java'
--- a/java/testsuite/BaseTestCase.java	2007-09-18 08:16:15 +0000
+++ b/java/testsuite/BaseTestCase.java	2007-10-29 16:39:46 +0000
@@ -370,7 +370,7 @@
 
 	public void logDebug(String message) {
 		if (System.getProperty("com.mysql.jdbc.testsuite.noDebugOutput") == null) {
-			System.err.println(message);
+			System.out.println(message);
 		}
 	}
 
@@ -595,4 +595,4 @@
 		
 		return buf.toString();
 	}
-}
\ No newline at end of file
+}

=== modified file 'swig/Ndb.i'
--- a/swig/Ndb.i	2007-10-28 00:05:03 +0000
+++ b/swig/Ndb.i	2007-10-29 17:51:35 +0000
@@ -41,6 +41,8 @@
 
   NdbEventOperation *nextEvent();
 
+  void sendPreparedTransactions(int forceSend = 0);
+
   %ndbexception("NdbApiException") { 
     $action
       if (result==-1) { 
@@ -52,6 +54,9 @@
   int sendPollNdb(int aMillisecondNumber = WAITFOR_RESPONSE_TIMEOUT,
 		  int minNoOfEventsToWakeup = 1,
 		  int forceSend = 0);
+  int  pollNdb(int aMillisecondNumber = WAITFOR_RESPONSE_TIMEOUT,
+              int minNoOfEventsToWakeup = 1);
+
 //  int pollEvents(int aMillisecondNumber, Uint64 *latestGCI= 0);
 
   %ndbexception("NdbApiException") { 

=== modified file 'swig/ndbglobals.i'
--- a/swig/ndbglobals.i	2007-10-25 13:24:04 +0000
+++ b/swig/ndbglobals.i	2007-10-30 12:02:14 +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 {
@@ -61,6 +58,13 @@
     cb->callback(theOp,theNdb);
   }
 
+  long long getTimeMicros() 
+  {
+    struct timeval tTime;
+    gettimeofday(&tTime, 0);
+    long long microSeconds = (long long) tTime.tv_sec * 1000000 + tTime.tv_usec;
+    return microSeconds;
+  }
 
 
 typedef int voidint; 
@@ -78,6 +82,7 @@
 } BYTES; 
 %}
 
+long long getTimeMicros();
 /*
 typedef char my_bool;
 enum enum_mysql_timestamp_type

Thread
Rev 201: Merged in changes from devel. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3Monty Taylor30 Oct