List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:December 14 2007 6:13pm
Subject:Rev 372: Fixed GCJ build errors. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel

------------------------------------------------------------
revno: 372
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Fri 2007-12-14 16:13:30 -0200
message:
  Fixed GCJ build errors.
modified:
  Makefile.am                    makefile.am-20070228020914-u2pk759xg7thauwf-4
  configure.in                   configure.in-20070228020914-u2pk759xg7thauwf-13
  java/com/mysql/cluster/ndbj/NdbOperationResultsImpl.java
ndboperationresultsi-20071011074824-qn692jc6vcd81pxb-1
  java/com/mysql/cluster/ndbj/NdbResultSetImpl.java
ndbresultsetimpl.jav-20070517181935-98huwjarzuh25b30-22
  java/com/mysql/cluster/ndbj/NdbResultSetMetaData.java
ndbresultsetmetadata-20071121015730-7k6adr4x7a7nkpuh-1
  java/com/mysql/cluster/ndbj/ThrowingResultSet.java
throwingresultset.ja-20071127095043-2ypprut7dyfhjkfy-1
  java/com/mysql/cluster/ndbj/ThrowingResultSetJDBC4.java
throwingresultsetjdb-20071212130812-wei7y13tengq7up8-1
  java/ndbj.i                    ndbj.i-20070913223244-5938mztpztyn9sry-1
  m4/java.m4                     java.m4-20071024032738-xuzaza2fu10nw2lr-1
=== modified file 'Makefile.am'
--- a/Makefile.am	2007-12-12 16:25:57 +0000
+++ b/Makefile.am	2007-12-14 18:13:30 +0000
@@ -25,7 +25,7 @@
   d_php = php
 endif
 SUBDIRS = mgmpp $(d_swig) $(d_java) $(d_python) $(d_perl) $(d_csharp) $(d_ruby) $(d_php)
$(d_lua) 
-EXTRA_DIST = testndbapi interface autogen.sh 
+EXTRA_DIST = testndbapi interface/*i interface/ndbapi/*i interface/mgmapi/*i autogen.sh 
 
 distclean-local:
 	rm -fr autom4te.cache

=== modified file 'configure.in'
--- a/configure.in	2007-12-13 00:07:58 +0000
+++ b/configure.in	2007-12-14 18:13:30 +0000
@@ -1,4 +1,4 @@
-AC_INIT([ndb-connectors], [0.5.1.22.17])
+AC_INIT([ndb-connectors], [0.5.1.22.18])
 AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE([1.9 tar-ustar])
 AM_CONFIG_HEADER(config.h)

=== modified file 'java/com/mysql/cluster/ndbj/NdbOperationResultsImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbOperationResultsImpl.java	2007-12-09 22:26:12 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbOperationResultsImpl.java	2007-12-14 18:13:30 +0000
@@ -6,6 +6,7 @@
 public class NdbOperationResultsImpl implements NdbOperationResults {
 
 
+	protected NdbResultSet theResultSet; 
 	protected Map<String,NdbRecAttr> resultSet;
 	protected Map<String,NdbBlob> blobResultSet;
 
@@ -32,6 +33,7 @@
 		super();
 		resultSet = new HashMap<String, NdbRecAttr>();
 		blobResultSet = new HashMap<String,NdbBlob>();
+		theResultSet = new NdbResultSetImpl();
 	}
 	
 	public void getValue(long columnId) throws NdbApiException {

=== modified file 'java/com/mysql/cluster/ndbj/NdbResultSetImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbResultSetImpl.java	2007-12-09 22:26:12 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbResultSetImpl.java	2007-12-14 18:13:30 +0000
@@ -1,6 +1,9 @@
 package com.mysql.cluster.ndbj;
 
 import java.util.Map;
+import java.util.HashMap;
+import java.util.ArrayList;
+import java.sql.SQLException;
 import java.sql.Timestamp;
 
 /**
@@ -14,11 +17,13 @@
  * Id counts start at '0' (for the first column in a table).
  */
 class NdbResultSetImpl extends ThrowingResultSet implements NdbResultSet {
+
+
 	/**
 	 * We start reading results from '0'
 	 */
-	private Map<String,NdbRecAttr> resultSet;
-
+	protected Map<String,NdbRecAttr> resultSet;
+	protected ArrayList<NdbColumn> theColumns;
 	NdbBaseOperation op = null;
 
 
@@ -28,8 +33,13 @@
 
         private boolean fetched = false;
 
-
-
+    	NdbResultSetMetaData theMetaData = null;
+
+
+
+    protected NdbResultSetImpl() {
+    	resultSet = new HashMap<String,NdbRecAttr>();
+    }
 	/**
 	 * Package-hidden constructor.
 	 * <br> Use resultData() method on an operation object to create
@@ -220,7 +230,6 @@
 		return this.op.getBlobHandle(columnName);
 	}
 
-	@Override
     public boolean next(boolean fetchAllowed) throws NdbApiException {
 	  // TODO: Seriously - this method and the next need to be redesigned
 	  if (NdbScanOperationImpl.class.isInstance(op))  {
@@ -228,12 +237,14 @@
 
 	    return (scanCheck==0);
 	  } else {
-	    if (fetched) 
+//		 It's not a scan operation
+	    if (fetched) {
 	      return false;
+	    }
 	    fetched=true;
 	    return true;
-                }
-	  // It's not a scan operation
+      }
+	  
 	}
 
 	/**
@@ -373,7 +384,7 @@
 	 * and sets a flag if true.
 	 * It is not thread-safe.
 	 * @param rec
-	 */
+libndbclient-dev.links	 */
 	private void testNull(NdbRecAttr rec) throws NdbApiException {
 		if (rec == null) {
 			throw new NdbApiException("Couldn't find NdbRecAttrImpl for column. Have you called
getXXX() on the column?");
@@ -386,5 +397,17 @@
 		}
 	}
 
+	/* (non-Javadoc)
+	 * @see com.mysql.cluster.ndbj.ThrowingResultSet#getMetaData()
+	 */
+	@Override
+	public NdbResultSetMetaData getMetaData() throws SQLException {
+
+		if (theMetaData == null) { 
+			theMetaData = new NdbResultSetMetaData(this);
+		}
+		return theMetaData;
+		
+	}
 }
 

=== modified file 'java/com/mysql/cluster/ndbj/NdbResultSetMetaData.java'
--- a/java/com/mysql/cluster/ndbj/NdbResultSetMetaData.java	2007-11-21 19:00:29 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbResultSetMetaData.java	2007-12-14 18:13:30 +0000
@@ -38,8 +38,7 @@
 	}
 
 	public int getColumnCount() throws SQLException {
-		// TODO Auto-generated method stub
-		return 0;
+		return theResultSet.resultSet.keySet().size();
 	}
 
 	public int getColumnDisplaySize(int arg0) throws SQLException {

=== modified file 'java/com/mysql/cluster/ndbj/ThrowingResultSet.java'
--- a/java/com/mysql/cluster/ndbj/ThrowingResultSet.java	2007-12-12 13:09:04 +0000
+++ b/java/com/mysql/cluster/ndbj/ThrowingResultSet.java	2007-12-14 18:13:30 +0000
@@ -781,13 +781,13 @@
         throw new NotImplementedException(columnLabel).asSQL();
     }
 
-    public Object getObject(int columnIndex, Map/* <String, Class<?>> */map)
+    public Object getObject(int columnIndex, Map<String, Class<?>> map)
             throws SQLException {
         throw new NotImplementedException(new Integer(columnIndex), map)
                 .asSQL();
     }
 
-    public Object getObject(String columnLabel, Map/* <String, Class<?>>
*/map)
+    public Object getObject(String columnLabel, Map<String, Class<?>>map)
             throws SQLException {
         throw new NotImplementedException(columnLabel, map).asSQL();
     }

=== modified file 'java/com/mysql/cluster/ndbj/ThrowingResultSetJDBC4.java'
--- a/java/com/mysql/cluster/ndbj/ThrowingResultSetJDBC4.java	2007-12-12 13:09:04 +0000
+++ b/java/com/mysql/cluster/ndbj/ThrowingResultSetJDBC4.java	2007-12-14 18:13:30 +0000
@@ -1,128 +1,12 @@
+/* This is a generated file to work around jre5/jre6 issues. If this file
+   is here, the build thinks you are using java5. If you aren't please
+   report a bug */
 package com.mysql.cluster.ndbj;
 
-import java.io.Reader;
-import java.sql.SQLException;
-import java.sql.RowId;
-import java.sql.SQLXML;
-import java.sql.NClob;
-
-
 public class ThrowingResultSetJDBC4 {
 
 	public ThrowingResultSetJDBC4() {
 		super();
 	}
 
-	public RowId getRowId(int arg0) throws SQLException {
-		// TODO Auto-generated method stub
-		// return null;
-		throw new NotImplementedException("getRowId");
-		
-	}
-
-	public RowId getRowId(String arg0) throws SQLException {
-		// TODO Auto-generated method stub
-		// return null;
-		throw new NotImplementedException("getRowId");
-		
-	}
-
-	public SQLXML getSQLXML(int arg0) throws SQLException {
-		// TODO Auto-generated method stub
-		// return null;
-		throw new NotImplementedException("getSQLXML");
-		
-	}
-
-	public SQLXML getSQLXML(String arg0) throws SQLException {
-		// TODO Auto-generated method stub
-		// return null;
-		throw new NotImplementedException("getSQLXML");
-		
-	}
-
-	public void updateNCharacterStream(int arg0, Reader arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateNCharacterStream");
-		
-	}
-
-	public void updateNCharacterStream(String arg0, Reader arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateNCharacterStream");
-		
-	}
-
-	public void updateNClob(int arg0, NClob arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateNClob");
-		
-	}
-
-	public void updateNClob(int arg0, Reader arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateNClob");
-		
-	}
-
-	public void updateNClob(String arg0, NClob arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateNClob");
-		
-	}
-
-	public void updateNClob(String arg0, Reader arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateNClob");
-		
-	}
-
-	public void updateRowId(int arg0, RowId arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateRowId");
-		
-	}
-
-	public void updateRowId(String arg0, RowId arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateRowId");
-		
-	}
-
-	public void updateSQLXML(int arg0, SQLXML arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateSQLXML");
-		
-	}
-
-	public void updateSQLXML(String arg0, SQLXML arg1) throws SQLException {
-		// TODO Auto-generated method stub
-		// 
-		throw new NotImplementedException("updateSQLXML");
-		
-	}
-
-	public NClob getNClob(int arg0) throws SQLException {
-		// TODO Auto-generated method stub
-		// return null;
-		throw new NotImplementedException("getNClob");
-		
-	}
-
-	public NClob getNClob(String arg0) throws SQLException {
-		// TODO Auto-generated method stub
-		// return null;
-		throw new NotImplementedException("getNClob");
-		
-	}
-
-}
\ No newline at end of file
+}

=== modified file 'java/ndbj.i'
--- a/java/ndbj.i	2007-12-10 07:39:46 +0000
+++ b/java/ndbj.i	2007-12-14 18:13:30 +0000
@@ -422,85 +422,71 @@
 %typemap(javabase) NdbOperation "NdbOperationResultsImpl";
 %typemap(javacode) NdbOperation %{
 
-@Override
 @Deprecated
 public void equal(long columnId, BigInteger val) throws NdbApiException {
 	equalUlong(columnId,val);
 }
 
-@Override
 @Deprecated
 public void equal(long columnId, byte[] val) throws NdbApiException {
 	equalBytes(columnId,val);
 }
 
-@Override
 @Deprecated
 public void equal(long columnId, Calendar val) throws NdbApiException {
 	equalDatetime(columnId,val);
 }
 
-@Override
 @Deprecated
 public void equal(long columnId, int val) throws NdbApiException {
 	equalInt(columnId,val);
 }
 
-@Override
 @Deprecated
 public void equal(long columnId, long val) throws NdbApiException {
 	equalLong(columnId,val);
 }
 
-@Override
 @Deprecated
 public void equal(long columnId, String val) throws NdbApiException {
 	equalString(columnId,val);
 }
 
-@Override
 @Deprecated
 public void equal(long columnId, Timestamp val) throws NdbApiException {
 	equalTimestamp(columnId,val);
 }
 
-@Override
 @Deprecated
 public void equal(String columnName, BigInteger val) throws NdbApiException {
 	equalUlong(columnName,val);
 }
 
-@Override
 @Deprecated
 public void equal(String columnName, byte[] val) throws NdbApiException {
 	equalBytes(columnName,val);
 }
 
-@Override
 @Deprecated
 public void equal(String columnName, Calendar val) throws NdbApiException {
 	equalDatetime(columnName,val);
 }
 
-@Override
 @Deprecated
 public void equal(String columnName, int val) throws NdbApiException {
 	equalInt(columnName,val);
 }
 
-@Override
 @Deprecated
 public void equal(String columnName, long val) throws NdbApiException {
 	equalLong(columnName,val);
 }
 
-@Override
 @Deprecated
 public void equal(String columnName, String val) throws NdbApiException {
 	equalString(columnName,val);
 }
 
-@Override
 @Deprecated
 public void equal(String columnName, Timestamp val) throws NdbApiException {
 	equalTimestamp(columnName,val);
@@ -607,8 +593,8 @@
 
 %include "ndbapi/NdbIndexOperation.i"
 
-%javamethodmodifiers NdbIndexScanOperation::readTuples "@Override
-  public";
+/*%javamethodmodifiers NdbIndexScanOperation::readTuples "@Override
+  public";*/
 %typemap(jstype) NdbIndexScanOperation::BoundType "NdbIndexScanOperation.BoundType"
 %typemap(javaout) NdbIndexScanOperation::BoundType { 
         return
NdbIndexScanOperation.BoundType.swigToEnum(ndbjJNI.NdbIndexScanOperationImpl_getBoundType(swigCPtr,
this));

=== modified file 'm4/java.m4'
--- a/m4/java.m4	2007-12-12 16:43:24 +0000
+++ b/m4/java.m4	2007-12-14 18:13:30 +0000
@@ -162,7 +162,7 @@
     JAVA_INC="$JAVAINCDIR"
     JAVA_BIN="$JAVA_HOME/bin"
     JAVA_LIB="$JAVAINC/.."
-    JAVAOPTS="-source 1.6"
+    JAVAOPTS="-source 1.5"
     ;;
   *)
     AC_MSG_WARN([Unknown or unsupported JDK])

Thread
Rev 372: Fixed GCJ build errors. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor14 Dec