List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:December 7 2007 10:42am
Subject:Rev 286: Merged 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: 286
revision-id: mtaylor@stripped
parent: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: telco-6.3
timestamp: Fri 2007-12-07 02:42:22 -0800
message:
  Merged
modified:
  NEWS                           news-20070228020914-u2pk759xg7thauwf-6
  README                         readme-20070228020914-u2pk759xg7thauwf-7
  configure.in                   configure.in-20070228020914-u2pk759xg7thauwf-13
  java/.classpath                classpath-20071116042946-npnq9g3hwm24x1ga-1
  java/Makefile.am               makefile.am-20070415032352-9dpe6aurqcnuwcrd-1
  java/com/mysql/cluster/mgmj/examples/SampleMGMJ.java
samplemgmj.java-20071119093428-2f2zw02dpk5jlq9f-2
  java/com/mysql/cluster/ndbj/NdbResultSet.java
ndbresultset.java-20070517181935-98huwjarzuh25b30-21
  java/com/mysql/cluster/ndbj/ThrowingResultSet.java
throwingresultset.ja-20071127095043-2ypprut7dyfhjkfy-1
  python/Makefile.am             makefile.am-20070925115907-x2wrdte5kicyfrrw-1
  python/setup.py                setup.py-20071027082659-u3uu8u83f54jtbn4-1
    ------------------------------------------------------------
    revno: 192.1.25.1.107.1.28
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Fri 2007-12-07 02:40:58 -0800
    message:
      Build fixes to make VPATH builds work (at least for everything that isn't perl)
    modified:
      configure.in                   configure.in-20070228020914-u2pk759xg7thauwf-13
      java/Makefile.am               makefile.am-20070415032352-9dpe6aurqcnuwcrd-1
      python/Makefile.am             makefile.am-20070925115907-x2wrdte5kicyfrrw-1
      python/setup.py                setup.py-20071027082659-u3uu8u83f54jtbn4-1
    ------------------------------------------------------------
    revno: 192.1.25.1.107.1.27
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Fri 2007-12-07 02:38:59 -0800
    message:
      NOTE: JDK6 is the only supported version. 
    modified:
      NEWS                           news-20070228020914-u2pk759xg7thauwf-6
      README                         readme-20070228020914-u2pk759xg7thauwf-7
    ------------------------------------------------------------
    revno: 192.1.25.1.107.1.26
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Fri 2007-12-07 02:03:14 -0800
    message:
      Reverted jdk5 change. JDK6 is now the only supported JDK until further notice.
    modified:
      java/.classpath                classpath-20071116042946-npnq9g3hwm24x1ga-1
      java/com/mysql/cluster/ndbj/NdbResultSet.java
ndbresultset.java-20070517181935-98huwjarzuh25b30-21
      java/com/mysql/cluster/ndbj/ThrowingResultSet.java
throwingresultset.ja-20071127095043-2ypprut7dyfhjkfy-1
    ------------------------------------------------------------
    revno: 192.1.25.1.107.1.25
    revision-id: mtaylor@stripped
    parent: mtaylor@stripped
    committer: Monty Taylor <mtaylor@stripped>
    branch nick: devel
    timestamp: Fri 2007-12-07 02:01:58 -0800
    message:
      Added Johan's Sample program
    modified:
      java/com/mysql/cluster/mgmj/examples/SampleMGMJ.java
samplemgmj.java-20071119093428-2f2zw02dpk5jlq9f-2
=== modified file 'NEWS'
--- a/NEWS	2007-02-28 07:08:22 +0000
+++ b/NEWS	2007-12-07 10:38:59 +0000
@@ -0,0 +1,1 @@
+Java only supports JDKv6 

=== modified file 'README'
--- a/README	2007-12-04 18:38:04 +0000
+++ b/README	2007-12-07 10:42:22 +0000
@@ -13,3 +13,6 @@
 Currently, the entire API's of the NDB API and MGM API are supported, although async
transactions are only implemented in Java, Python and Perl and there are some datatype
conversions that are missing. 
 
 ATTENTION: If you are using 64-bit system and 64-bit MySQL, you need to also use a 64-bit
JVM. 
+
+**IMPORTANT** 
+For Java: At the moment, only JDK6 is supported. If you need 1.4 or 1.5, give me a shout
and we can talk about how to accomplish that. 

=== modified file 'configure.in'
--- a/configure.in	2007-12-06 22:25:42 +0000
+++ b/configure.in	2007-12-07 10:42:22 +0000
@@ -25,8 +25,8 @@
 
 if test "$with_debug" = "yes"
 then
-  CXXFLAGS="-ggdb3 -Wall -I\${top_srcdir}"
-  CFLAGS="-ggdb3 -Wall -I\${top_srcdir}"
+  CXXFLAGS="-ggdb3 -Wall"
+  CFLAGS="-ggdb3 -Wall"
 else
   # -02 causes problems per SWIG... although I think we should get that fixed
   if test -z $CXXFLAGS ; then 
@@ -36,6 +36,8 @@
     CFLAGS="-O0 -g -Wall"
   fi 
 fi
+CXXFLAGS="${CXXFLAGS} -I\${top_srcdir} -I\${top_builddir}"
+CFLAGS="${CXXFLAGS} -ggdb3 -Wall -I\${top_srcdir} -I\${top_builddir}"
 
 AC_PROG_SWIG(1.3.32)
 AS_IF([test "x$SWIG" = "xno"],[

=== modified file 'java/.classpath'
--- a/java/.classpath	2007-12-05 10:22:50 +0000
+++ b/java/.classpath	2007-12-07 10:42:22 +0000
@@ -5,8 +5,8 @@
 			<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"
value="ndbj-telco-6.3/.libs"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="lib" path="/usr/share/java/junit.jar"/>
-	<classpathentry kind="lib" path="/usr/lib/jvm/java-6-sun/jre/lib/rt.jar"/>
 	<classpathentry kind="lib" path="lib/mysql-connector-java-5.1.5-bin.jar"/>
+	<classpathentry kind="lib" path="lib/junit.jar"/>
+	<classpathentry kind="lib"
path="/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/rt.jar"/>
 	<classpathentry kind="output" path=""/>
 </classpath>

=== modified file 'java/Makefile.am'
--- a/java/Makefile.am	2007-12-06 21:15:14 +0000
+++ b/java/Makefile.am	2007-12-07 10:42:22 +0000
@@ -1,6 +1,6 @@
 package_namespace=com/mysql/cluster
 builddir=.
-classpath=$(srcdir):$(builddir):$(builddir)/lib/mysql-connector-java-5.1.5-bin.jar:$(builddir)/lib/junit.jar
+classpath=$(srcdir):$(builddir):$(srcdir)/lib/mysql-connector-java-5.1.5-bin.jar:$(srcdir)/lib/junit.jar
 package_builddir=$(builddir)/$(package_namespace)
 package_srcdir=$(srcdir)/$(package_namespace)
 ndbapi_examples_dir=$(package_namespace)/ndbapi/examples
@@ -389,7 +389,7 @@
 
 .java.class:
 	@mkdir -p `dirname $*`
-	$(JAVAC) -classpath
$(srcdir):$(srcdir)/lib/mysql-connector-java-5.1.5-bin.jar:$(srcdir)/lib/junit.jar
-sourcepath $(srcdir):$(builddir) -d $(builddir) $<
+	$(JAVAC) -classpath $(classpath) -sourcepath $(srcdir):$(builddir) -d $(builddir) $<
 
 .i.cxx: 
 
@@ -422,9 +422,9 @@
 	@echo "Building ndbj.jar"
 	@$(JAR) cf $@ ${NDBAPI_JAVA_CLASSES} ${package_builddir}/ndbj/*\$$*class
 
-check-local: all-am
-	$(JAVA) -Djava.library.path=$(builddir)/.libs 
-Dcom.mysql.jdbc.testsuite.url=jdbc:mysql://localhost/test -classpath $(classpath) 
junit.textui.TestRunner testsuite.ndbj.AllTests
-	$(JAVA) -Djava.library.path=$(builddir)/.libs 
-Dcom.mysql.jdbc.testsuite.url=jdbc:mysql://localhost/test -classpath $(classpath)
junit.textui.TestRunner testsuite.mgmj.AllTests
+#check-local: all-am
+#	$(JAVA) -Djava.library.path=$(builddir)/.libs 
-Dcom.mysql.jdbc.testsuite.url=jdbc:mysql://localhost/test -classpath $(classpath) 
junit.textui.TestRunner testsuite.ndbj.AllTests
+#	$(JAVA) -Djava.library.path=$(builddir)/.libs 
-Dcom.mysql.jdbc.testsuite.url=jdbc:mysql://localhost/test -classpath $(classpath)
junit.textui.TestRunner testsuite.mgmj.AllTests
 
 install-exec-local: ndbj.jar mgmj.jar
 	mkdir -p $(DESTDIR)$(datadir)/java

=== modified file 'java/com/mysql/cluster/mgmj/examples/SampleMGMJ.java'
--- a/java/com/mysql/cluster/mgmj/examples/SampleMGMJ.java	2007-12-06 08:07:23 +0000
+++ b/java/com/mysql/cluster/mgmj/examples/SampleMGMJ.java	2007-12-07 10:01:58 +0000
@@ -17,44 +17,56 @@
 
 		mgm.setConnectTimeout(4000);
 		mgm.connect(5, 3, true);
-		/*int[] filter = { 15,
NdbMgmEventCategory.NDB_MGM_EVENT_CATEGORY_STATISTIC.swigValue(), 0 };
-		NdbLogEventManager manager = mgm.createNdbLogEventManager(filter); */
+
 
 		NdbFilterList theList = new NdbFilterList();
-		NdbFilterItem theItem = new
NdbFilterItem(15,NdbLogEventCategory.NDB_MGM_EVENT_CATEGORY_STATISTIC);
-		theList.add(theItem);
+		NdbFilterItem theItem1 = new
NdbFilterItem(15,NdbLogEventCategory.NDB_MGM_EVENT_CATEGORY_STATISTIC);
+		NdbFilterItem theItem2 = new
NdbFilterItem(15,NdbLogEventCategory.NDB_MGM_EVENT_CATEGORY_CONNECTION);
+		NdbFilterItem theItem3 = new
NdbFilterItem(15,NdbLogEventCategory.NDB_MGM_EVENT_CATEGORY_NODE_RESTART);
+
+		theList.add(theItem1);
+		theList.add(theItem2);
+		theList.add(theItem3);
+
+
 		NdbLogEventManager manager = mgm.createNdbLogEventManager(theList);
-		TransReportListener theListener = new TransReportListener();
+		TransReportListener theListener1 = new TransReportListener();
+		ConnectedListener theListener2 = new ConnectedListener();
+		DisconnectListener theListener3 = new DisconnectListener();
+		NodeFailReportedListener theListener4 = new NodeFailReportedListener();
+		CommunicationOpenedListener theListener5 = new CommunicationOpenedListener();
+		CommunicationClosedListener theListener6 = new CommunicationClosedListener();
+		StartPhaseListener theListener7 = new StartPhaseListener();
+
 		System.out.println("Registering listener");
-		manager.registerListener(theListener);
+		manager.registerListener(theListener1);
+		manager.registerListener(theListener2);
+		manager.registerListener(theListener3);
+		manager.registerListener(theListener4);
+		manager.registerListener(theListener5);
+		manager.registerListener(theListener6);
+		manager.registerListener(theListener7);
 		System.out.println("Done");
-		
+
+		ClusterState cs = mgm.getStatus();
+		for(int i=0; i< cs.getNoOfNodes(); i++)
+		    {
+			NodeState ns = cs.getNodeState(i);
+			NodeType type= ns.getNodeType();			
+			System.out.println("Type: " + type.toString() + 
+					   " Version " 
+					   + (short)(ns.getVersion()>>16 & 0xFF)
+					   + "." 
+					   + (short)(ns.getVersion()>>8 & 0xFF)
+					   + "." 
+					   + (short)(ns.getVersion()>>0 & 0xFF)
+					   + " connected address " +  ns.getConnectAddress());
+
+		    }
+				
 		while(true) { 	
-			//mgm.dumpState(1, 1000);
+
 			manager.pollEvents(5000); 
-			/*NdbLogEvent event = manager.pollEvents(5000); 
-			if (event != null)  {
-				System.out.println("Got an Event from Node" + event.getSourceNodeId()+" 
"+event.getEventType());
-			if (event.getEventType() == NdbLogEventType.NDB_LE_TransReportCounters) {
-				TransReportCounters theEvent = new TransReportCounters(event);
-				System.out.println("Trans count:"+theEvent.getTransCount());
-				System.out.println("Read count:"+theEvent.getReadCount());
-				System.out.println("Scan count:"+theEvent.getScanCount());
-				System.out.println("Range Scan count:"+theEvent.getRangeScanCount());
-			} else if (event.getEventType() == NdbLogEventType.NDB_LE_MemoryUsage) { 
-				MemoryUsage theEvent = new MemoryUsage(event); 
-				if (theEvent.getPageSizeKb() == 8192) { 
-					System.out.println("Index Memory: "+theEvent.getPagesUsed());
-				} else if (theEvent.getPageSizeKb() == 32768) { 
-					System.out.println("Data Memory: "+theEvent.getPagesUsed());
-				}
-				
-
-			}
-			} else { 
-				//System.out.println("Still null");
-			}
-			*/
 		}
 
 	}
@@ -71,11 +83,107 @@
 	 */
 	@Override
 	public void handleEvent(TransReportCounters event) {
-		System.out.println("Listner Trans count:"+event.getTransCount());
-		System.out.println("Listner Read count:"+event.getReadCount());
-		System.out.println("Listner Scan count:"+event.getScanCount());
-		System.out.println("Listner Range Scan count:"+event.getRangeScanCount());
-	} 
-	
-	
+	    System.out.println("Node " + event.getSourceNodeId() +
+			       ": Listner Trans count:"+ event.getTransCount());
+	    
+	    System.out.println("Node " + event.getSourceNodeId() + 
+			       ": Listner Read count:"+event.getReadCount());
+	    System.out.println("Node " + event.getSourceNodeId() + 
+			       ": Listner Scan count:"+event.getScanCount());
+	    System.out.println("Node " + event.getSourceNodeId() + 
+			       ": Listner Range Scan count:"
+			       +event.getRangeScanCount());
+	} 
+	
+	
+}
+
+
+
+class DisconnectListener extends DisconnectedTypeListener {
+
+
+
+
+	/* (non-Javadoc)
+	 * @see
com.mysql.cluster.mgmj.NdbLogEventCategoryListener#handleEvent(com.mysql.cluster.mgmj.NdbLogEvent)
+	 */
+	@Override
+	public void handleEvent(Disconnected event) {
+		System.out.println("Disconnected node:" + event.getNode());
+	} 
+}
+
+
+
+class ConnectedListener extends ConnectedTypeListener {
+
+	
+	public void handleEvent(Connected event) {
+		System.out.println("Connected node:" + event.getNode());
+	} 
+
+}
+
+
+
+class CommunicationOpenedListener extends CommunicationOpenedTypeListener {
+
+
+
+
+	/* (non-Javadoc)
+	 * @see
com.mysql.cluster.mgmj.NdbLogEventCategoryListener#handleEvent(com.mysql.cluster.mgmj.NdbLogEvent)
+	 */
+	@Override
+	public void handleEvent(CommunicationOpened event) {
+	    System.out.println("Comm opened to node:" + event.getNode() + " reported by " +
event.getSourceNodeId());
+	} 
+}
+
+
+
+class CommunicationClosedListener extends CommunicationClosedTypeListener {
+
+
+
+	/* (non-Javadoc)
+	 * @see
com.mysql.cluster.mgmj.NdbLogEventCategoryListener#handleEvent(com.mysql.cluster.mgmj.NdbLogEvent)
+	 */
+	@Override
+	public void handleEvent(CommunicationClosed event) {
+		System.out.println("Comm closed to node:" + event.getNode());
+	} 
+}
+
+
+class NodeFailReportedListener extends NodeFailReportedTypeListener {
+
+
+
+
+
+	/* (non-Javadoc)
+	 * @see
com.mysql.cluster.mgmj.NdbLogEventCategoryListener#handleEvent(com.mysql.cluster.mgmj.NdbLogEvent)
+	 */
+	@Override
+	public void handleEvent(NodeFailReported event) {
+		System.out.println("Failed node:" + event.getFailedNode());
+	} 
+}
+
+
+
+class StartPhaseListener extends StartPhaseCompletedTypeListener {
+
+
+
+	/* (non-Javadoc)
+	 * @see
com.mysql.cluster.mgmj.NdbLogEventCategoryListener#handleEvent(com.mysql.cluster.mgmj.NdbLogEvent)
+	 */
+	@Override
+	public void handleEvent(StartPhaseCompleted event) {
+		System.out.println("Node " + event.getSourceNodeId() );
+		//				   + ": start phase" + theEvent.getPhase());
+	} 
 }

=== modified file 'java/com/mysql/cluster/ndbj/NdbResultSet.java'
--- a/java/com/mysql/cluster/ndbj/NdbResultSet.java	2007-12-07 08:29:57 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbResultSet.java	2007-12-07 10:03:14 +0000
@@ -13,7 +13,7 @@
  * Either access columns by name (String) or id (int).
  * Do not mix usage of access by name and id.
  */
-public interface NdbResultSet //extends java.sql.ResultSet 
+public interface NdbResultSet extends java.sql.ResultSet 
 {
 
     /**

=== modified file 'java/com/mysql/cluster/ndbj/ThrowingResultSet.java'
--- a/java/com/mysql/cluster/ndbj/ThrowingResultSet.java	2007-12-07 08:29:57 +0000
+++ b/java/com/mysql/cluster/ndbj/ThrowingResultSet.java	2007-12-07 10:03:14 +0000
@@ -8,30 +8,27 @@
 import java.sql.Blob;
 import java.sql.Clob;
 import java.sql.Date;
+import java.sql.NClob;
 import java.sql.Ref;
-//import java.sql.ResultSet;
-
+import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
-
-//import java.sql.NClob;
-//import java.sql.RowId;
+import java.sql.RowId;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
-//import java.sql.SQLXML;
+import java.sql.SQLXML;
 import java.sql.Statement;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.Map;
 
-public class ThrowingResultSet { //implements java.sql.ResultSet {
-
-	// TODO: Seriously, figure out the NClob 1.5 vs. 1.6 ResultSet nonsense
-
-
-/*	 (non-Javadoc)
+public class ThrowingResultSet implements ResultSet {
+
+
+
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#getNClob(int)
-	 
+	 */
 	public NClob getNClob(int arg0) throws SQLException {
 		// TODO Auto-generated method stub
 		// return null;
@@ -39,9 +36,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#getNClob(java.lang.String)
-	 
+	 */
 	public NClob getNClob(String arg0) throws SQLException {
 		// TODO Auto-generated method stub
 		// return null;
@@ -49,9 +46,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#getRowId(int)
-	 
+	 */
 	public RowId getRowId(int arg0) throws SQLException {
 		// TODO Auto-generated method stub
 		// return null;
@@ -59,9 +56,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#getRowId(java.lang.String)
-	 
+	 */
 	public RowId getRowId(String arg0) throws SQLException {
 		// TODO Auto-generated method stub
 		// return null;
@@ -69,9 +66,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#getSQLXML(int)
-	 
+	 */
 	public SQLXML getSQLXML(int arg0) throws SQLException {
 		// TODO Auto-generated method stub
 		// return null;
@@ -79,15 +76,15 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#getSQLXML(java.lang.String)
-	 
+	 */
 	public SQLXML getSQLXML(String arg0) throws SQLException {
 		// TODO Auto-generated method stub
 		// return null;
 		throw new NotImplementedException("getSQLXML");
 		
-	}*/
+	}
 
 	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateAsciiStream(int, java.io.InputStream)
@@ -209,9 +206,9 @@
 		
 	}
 
-/*	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateNClob(int, java.sql.NClob)
-	 
+	 */
 	public void updateNClob(int arg0, NClob arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
@@ -219,9 +216,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateNClob(int, java.io.Reader)
-	 
+	 */
 	public void updateNClob(int arg0, Reader arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
@@ -229,9 +226,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateNClob(java.lang.String, java.sql.NClob)
-	 
+	 */
 	public void updateNClob(String arg0, NClob arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
@@ -239,9 +236,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader)
-	 
+	 */
 	public void updateNClob(String arg0, Reader arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
@@ -249,9 +246,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateRowId(int, java.sql.RowId)
-	 
+	 */
 	public void updateRowId(int arg0, RowId arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
@@ -259,9 +256,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateRowId(java.lang.String, java.sql.RowId)
-	 
+	 */
 	public void updateRowId(String arg0, RowId arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
@@ -269,9 +266,9 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateSQLXML(int, java.sql.SQLXML)
-	 
+	 */
 	public void updateSQLXML(int arg0, SQLXML arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
@@ -279,15 +276,15 @@
 		
 	}
 
-	 (non-Javadoc)
+	/* (non-Javadoc)
 	 * @see java.sql.ResultSet#updateSQLXML(java.lang.String, java.sql.SQLXML)
-	 
+	 */
 	public void updateSQLXML(String arg0, SQLXML arg1) throws SQLException {
 		// TODO Auto-generated method stub
 		// 
 		throw new NotImplementedException("updateSQLXML");
 		
-	}*/
+	}
 
 	/* (non-Javadoc)
 	 * @see java.sql.Wrapper#isWrapperFor(java.lang.Class)

=== modified file 'python/Makefile.am'
--- a/python/Makefile.am	2007-12-06 09:25:04 +0000
+++ b/python/Makefile.am	2007-12-07 10:40:58 +0000
@@ -6,7 +6,7 @@
 CLEANFILES=ndbapi.cpp ndbapi.h mgmapi.cpp mysql/cluster/ndbapi.py mysql/cluster/mgmapi.py
mysql/cluster/events.py mysql/cluster/listeners.py *.so mysql/cluster/*pyc *pyc mgmapi.h
events.cpp listeners.cpp events.h listeners.h
 EXTRA_DIST = *py mgmapi.i ndbapi.i events.i listeners.i PKG-INFO README MANIFEST.in
mysql/cluster/alchemy.py mysql/__init__.py mysql/cluster/__init__.py 
mysql/cluster/NdbObject mysql/cluster/tests
 
-SWIG_OPTS=-O -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(SWIG_DIR) @MYSQL_INCLUDES@
-outdir $(builddir)/mysql/cluster
+SWIG_OPTS=-O -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/mgmpp
-I$(SWIG_DIR) @MYSQL_INCLUDES@ -outdir $(builddir)/mysql/cluster
 
 
 ${SWIG_BIN}:
@@ -23,17 +23,20 @@
 SUFFIXES = .cpp .i
 
 .i.cpp: $(SWIG_SOURCES) ${SWIG_BIN}
+	@test ! -d $(builddir)/mysql && cp -a $(srcdir)/mysql $(builddir) || true
+	@chmod -R u+w $(builddir)/mysql
 	$(SWIG) -c++ -python $(SWIG_OPTS) -o $@ $<
 
 $(builddir)/mysql/cluster/_ndbapi.so $(builddir)/mysql/cluster/_mgmapi.so
$(builddir)/mysql/cluster/_events.so $(builddir)/mysql/cluster/_listeners.so:
$(builddir)/ndbapi.cpp $(builddir)/mgmapi.cpp $(builddir)/events.cpp
$(builddir)/listeners.cpp
-	 CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ${PYTHON}
setup.py build 
+	 CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
SRCDIR="${srcdir}" TOP_SRCDIR="${top_srcdir}" BUILDDIR="${builddir}"
TOP_BUILDDIR="${top_builddir}" ${PYTHON} $(srcdir)/setup.py build 
--build-base="${top_builddir}/python/build"
 
 clean-local:
-	${PYTHON} setup.py clean
-	rm -rf build
+	${PYTHON} ${srcdir}/setup.py clean
+	rm -rf ${builddir}/build
+	@test ${builddir}/mysql -ef ${srcdir}/mysql || rm -rf ${builddir}/mysql
 
 install: $(builddir)/mysql/cluster/_ndbapi.so $(builddir)/mysql/cluster/_mgmapi.so 
-	CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ${PYTHON}
setup.py install --prefix=${DESTDIR}${prefix}
+	CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ${PYTHON}
${srcdir}/setup.py install --prefix=${DESTDIR}${prefix}
 
 develop: $(builddir)/mysql/cluster/_ndbapi.so $(builddir)/mysql/cluster/_mgmapi.so
 	CC="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" ${PYTHON}
setup.py develop --prefix=${DESTDIR}${prefix}

=== modified file 'python/setup.py'
--- a/python/setup.py	2007-12-06 08:07:23 +0000
+++ b/python/setup.py	2007-12-07 10:40:58 +0000
@@ -16,7 +16,6 @@
 ##    along with this program; if not, write to the Free Software
 ##    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 # bootstrap setuptools if necessary
 from ez_setup import use_setuptools
 use_setuptools()
@@ -24,9 +23,14 @@
 from distutils.command.clean import clean
 from distutils.command.build import build
 from setuptools import setup,Extension
-import os.path
+import os.path, os
 import sys
 
+srcdir=os.environ.get("SRCDIR",".")
+top_srcdir=os.environ.get("TOP_SRCDIR","..")
+builddir=os.environ.get("BUILDDIR",".")
+top_builddir=os.environ.get("TOP_BUILDDIR","..")
+
 description = """Python wrapper of the NDBAPI"""
 
 classifiers="""\
@@ -55,30 +59,31 @@
                     Extension("mysql.cluster._mgmapi",
                               sources=["mgmapi.cpp"],
                               libraries=["mgmpp"],
-                             
library_dirs=["/home/mtaylor/src/ndb-connectors/devel/mgmpp/.libs"],
-                              depends=["../interface/mgmapi/%s" % f for f in
os.listdir("../interface/mgmapi")],
+                              library_dirs=["%s/mgmpp/.libs" % top_builddir],
+                              depends=["%s/interface/mgmapi/%s" % (top_srcdir,f) for f in
os.listdir("%s/interface/mgmapi" % top_srcdir)],
                               language="c++",
                              
                               ),
                     Extension("mysql.cluster._ndbapi",
                               sources=["ndbapi.cpp"],
-                              depends=["../interface/ndbapi/%s" % f for f in
os.listdir("../interface/ndbapi")],
+                              library_dirs=["%s/mgmpp/.libs" % top_builddir],
+                              depends=["%s/interface/ndbapi/%s" % (top_srcdir,f) for f in
os.listdir("%s/interface/ndbapi" % top_srcdir)],
                               language="c++",
                              
                               ),
                     Extension("mysql.cluster._events",
                               sources=["events.cpp"],
                               libraries=["mgmpp"],
-                             
library_dirs=["/home/mtaylor/src/ndb-connectors/devel/mgmpp/.libs"],
-                              depends=["../interface/mgmapi/%s" % f for f in
os.listdir("../interface/mgmapi")],
+                              library_dirs=["%s/mgmpp/.libs" % top_builddir],
+                              depends=["%s/interface/mgmapi/%s" % (top_srcdir,f) for f in
os.listdir("%s/interface/mgmapi" % top_srcdir)],
                               language="c++",
                              
                               ),
                     Extension("mysql.cluster._listeners",
                               sources=["listeners.cpp"],
                               libraries=["mgmpp"],
-                             
library_dirs=["/home/mtaylor/src/ndb-connectors/devel/mgmpp/.libs"],
-                              depends=["../interface/mgmapi/%s" % f for f in
os.listdir("../interface/mgmapi")],
+                              library_dirs=["%s/mgmpp/.libs" % top_builddir],
+                              depends=["%s/interface/mgmapi/%s" % (top_srcdir,f) for f in
os.listdir("%s/interface/mgmapi" % top_srcdir)],
                               language="c++",
                              
                               ),

Thread
Rev 286: Merged in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3Monty Taylor7 Dec