changeset 102:08bc9009d190 embedded

Merged with default
author Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
date Fri, 13 Jan 2017 18:16:30 +0100 (2017-01-13)
parents 551093abca52 (current diff) cb588f26082c (diff)
children a00241382675
files build.xml example/PreparedExample.java example/SQLImport.java example/SQLcopyinto.java src/main/java/nl/cwi/monetdb/client/JMonetDB.java src/main/java/nl/cwi/monetdb/client/JdbcClient.java src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java src/main/java/nl/cwi/monetdb/jdbc/MonetDataSource.java src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java src/main/java/nl/cwi/monetdb/jdbc/MonetSavepoint.java src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java src/main/java/nl/cwi/monetdb/mcl/connection/MCLException.java src/main/java/nl/cwi/monetdb/mcl/protocol/ProtocolException.java src/main/java/nl/cwi/monetdb/merovingian/Control.java src/main/java/nl/cwi/monetdb/merovingian/SabaothDB.java src/main/java/nl/cwi/monetdb/util/CmdLineOpts.java src/main/java/nl/cwi/monetdb/util/Exporter.java src/main/java/nl/cwi/monetdb/util/Extract.java src/main/java/nl/cwi/monetdb/util/SQLExporter.java src/main/java/nl/cwi/monetdb/util/SQLRestore.java src/main/java/nl/cwi/monetdb/util/XMLExporter.java tests/Test_PSsqldata.java tests/Test_Rsqldata.java version.sh
diffstat 10 files changed, 137 insertions(+), 129 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/.hgtags
@@ -0,0 +1,1 @@
+80de05f07508fec938845b4a6e05f600bf0b48c0 v2.24
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,82 +1,3 @@
-# ChangeLog file for java
+# ChangeLog file for monetdb-java
 # This file is updated with Maddlog
 
-* Thu Nov 17 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- The MapiSocket object now supports getting and setting the
-  socket timeout, even before the TCP socket is created.  To set
-  the socket timeout specify it in the JDBC URL, for example:
-    jdbc:monetdb://localhost:50000/demo?so_timeout=8000
-  This enables the timeout and sets it to 8000 milliseconds (= 8 seconds).
-  By default the timeout is not set, so wait infinitely.
-
-* Thu Nov 10 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Implemented Connection methods: getClientInfo(name) and getClientInfo().
-  They used to return null and empty Properties object.
-  Corrected implementation of Connection methods: setClientInfo(name, value)
-  and setClientInfo(properties). They are now processed as expected.
-  Corrected implementation of Connection.setHoldability(holdability). It now
-  throws an SQLFeatureNotSupportedException when holdability is not
-  ResultSet.HOLD_CURSORS_OVER_COMMIT (which is the only supported holdability).
-
-* Thu Oct 13 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Corrected implementation of java.sql.Wrapper methods isWrapperFor()
-  and unwrap().  They now properly return expected results instead of
-  always return false or throw an SQLException.
-
-* Thu Oct  6 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Corrected return values of DatabaseMetaData methods nullsAreSortedHigh(),
-  nullsAreSortedLow(), getMaxCursorNameLength(), getMaxProcedureNameLength(),
-  getMaxStatementLength() and getMaxUserNameLength().
-  Improved return values of DatabaseMetaData methods getMaxBinaryLiteralLength(),
-  getMaxCharLiteralLength() and getMaxColumnsInTable().
-- Implemented Statement methods: getQueryTimeout() and setQueryTimeout(int
-  seconds).  getQueryTimeout() used to always return 0, now it returns the
-  query timeout retrieved from the server.  setQueryTimeout(int seconds)
-  used to always throw SQLException: query time outs not supported.
-  Now it sets the query timeout for the current connection/session on
-  the server.
-
-* Thu Sep 29 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Corrected ResultSet methods: getByte(), getBigDecimal(), getShort(),
-  getInt(), getLong(), getFloat() and getDouble() in case the conversion
-  to the native type failed due to a Number Format conversion error.
-  It used to silently ignore the conversion error and return 0 instead,
-  which is not correct.  Now it throws an SQLException with message
-  "Could not convert value to a number." and SQLstate "22003" meaning:
-  Numeric value out of range.
-
-* Thu Sep 22 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Improved JdbcClient program when doing dump of table definition.  It now
-  outputs CREATE TABLE definition more similar to mclient program.
-
-* Thu Sep 15 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Improved performance of following JDBC ResultSet and ResultSetMetaData
-  methods:
-  - ResultSet.getBoolean(column)
-  - ResultSet.getBinaryStream(column)
-  - ResultSet.getBytes(column)
-  - ResultSet.getObject(column)
-  - ResultSet.getObject(column, map)
-  - ResultSet.getDate(column)
-  - ResultSet.getTime(column)
-  - ResultSet.getTimestamp(column)
-  - ResultSet.getDate(column, calendar)
-  - ResultSet.getTime(column, calendar)
-  - ResultSet.getTimestamp(column, calendar)
-  - ResultSetMetaData.getColumnClassName(column)
-  - ResultSetMetaData.getColumnType(column)
-  - ResultSetMetaData.isCaseSensitive(column)
-  - ResultSetMetaData.isSigned(column)
-  - ResultSetMetaData.getPrecision(column)
-
-* Thu Sep  8 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Improved JdbcClient program by fixing some resource leaks.
-- Extended JdbcClient program by showing elapsed time information for each
-  query or command when started in interactive mode (no -f was used at startup).
-
-* Thu Sep  1 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Improved fetching and output speed of JdbcClient program for query results.
-
-* Thu Aug 11 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
-- Improved performance of method ResultSet.getObject(column_ID) significantly.
-
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -1,5 +1,91 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
-# This file contains past ChangeLog entries
+# This file contains past monetdb-java ChangeLog entries
+
+* Wed Dec 21 2016 Sjoerd Mullender <sjoerd@acm.org>
+- Compiled and released new jars: monetdb-jdbc-2.24.jar, monetdb-mcl-1.14.jar
+  and updated jdbcclient.jar
+
+* Thu Nov 17 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- The MapiSocket object now supports getting and setting the
+  socket timeout, even before the TCP socket is created.  To set
+  the socket timeout specify it in the JDBC URL, for example:
+    jdbc:monetdb://localhost:50000/demo?so_timeout=8000
+  This enables the timeout and sets it to 8000 milliseconds (= 8 seconds).
+  By default the timeout is not set, so wait infinitely.
+
+* Thu Nov 10 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Implemented Connection methods: getClientInfo(name) and getClientInfo().
+  They used to return null and empty Properties object.
+  Corrected implementation of Connection methods: setClientInfo(name, value)
+  and setClientInfo(properties). They are now processed as expected.
+  Corrected implementation of Connection.setHoldability(holdability). It now
+  throws an SQLFeatureNotSupportedException when holdability is not
+  ResultSet.HOLD_CURSORS_OVER_COMMIT (which is the only supported holdability).
+
+* Thu Oct 13 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Corrected implementation of java.sql.Wrapper methods isWrapperFor()
+  and unwrap().  They now properly return expected results instead of
+  always return false or throw an SQLException.
+
+* Thu Oct  6 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Corrected return values of DatabaseMetaData methods nullsAreSortedHigh(),
+  nullsAreSortedLow(), getMaxCursorNameLength(), getMaxProcedureNameLength(),
+  getMaxStatementLength() and getMaxUserNameLength().
+  Improved return values of DatabaseMetaData methods getMaxBinaryLiteralLength(),
+  getMaxCharLiteralLength() and getMaxColumnsInTable().
+- Implemented Statement methods: getQueryTimeout() and setQueryTimeout(int
+  seconds).  getQueryTimeout() used to always return 0, now it returns the
+  query timeout retrieved from the server.  setQueryTimeout(int seconds)
+  used to always throw SQLException: query time outs not supported.
+  Now it sets the query timeout for the current connection/session on
+  the server.
+
+* Thu Sep 29 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Corrected ResultSet methods: getByte(), getBigDecimal(), getShort(),
+  getInt(), getLong(), getFloat() and getDouble() in case the conversion
+  to the native type failed due to a Number Format conversion error.
+  It used to silently ignore the conversion error and return 0 instead,
+  which is not correct.  Now it throws an SQLException with message
+  "Could not convert value to a number." and SQLstate "22003" meaning:
+  Numeric value out of range.
+
+* Thu Sep 22 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Improved JdbcClient program when doing dump of table definition.  It now
+  outputs CREATE TABLE definition more similar to mclient program.
+
+* Thu Sep 15 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Improved performance of following JDBC ResultSet and ResultSetMetaData
+  methods:
+  - ResultSet.getBoolean(column)
+  - ResultSet.getBinaryStream(column)
+  - ResultSet.getBytes(column)
+  - ResultSet.getObject(column)
+  - ResultSet.getObject(column, map)
+  - ResultSet.getDate(column)
+  - ResultSet.getTime(column)
+  - ResultSet.getTimestamp(column)
+  - ResultSet.getDate(column, calendar)
+  - ResultSet.getTime(column, calendar)
+  - ResultSet.getTimestamp(column, calendar)
+  - ResultSetMetaData.getColumnClassName(column)
+  - ResultSetMetaData.getColumnType(column)
+  - ResultSetMetaData.isCaseSensitive(column)
+  - ResultSetMetaData.isSigned(column)
+  - ResultSetMetaData.getPrecision(column)
+
+* Thu Sep  8 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Improved JdbcClient program by fixing some resource leaks.
+- Extended JdbcClient program by showing elapsed time information for each
+  query or command when started in interactive mode (no -f was used at startup).
+
+* Thu Sep  1 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Improved fetching and output speed of JdbcClient program for query results.
+
+* Thu Aug 11 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Improved performance of method ResultSet.getObject(column_ID) significantly.
+
+* Wed Jul 13 2016 Sjoerd Mullender <sjoerd@acm.org>
+- Compiled and released new JDBC driver jar: monetdb-jdbc-2.23.jar
 
 * Thu Jul  7 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.23.7-20160713
 - Corrected PROCEDURE_TYPE output value of method DatabaseMetaData.getProcedures().
@@ -28,6 +114,9 @@
   arguments of the specific overloaded function by matching the SPECIFIC_NAME
   value.
 
+* Fri Jun 10 2016 Sjoerd Mullender <sjoerd@acm.org>
+- Compiled and released new JDBC driver jar: monetdb-jdbc-2.21.jar
+
 * Thu May 26 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.23.1-20160601
 - Fixed problem in DatabaseMetaData.getUDTs() when it was called with
   types parameter filled.  It used to throw SQException with message:
@@ -40,6 +129,21 @@
   It used to always return false. Now it returns true for the supported conversions.
   This fixes Bug 3460.
 
+* Thu May 12 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.23.1-20160601
+- Improved JdbcClient program when presenting query data to console.
+  It used to send an SQL catalog query for each query result column
+  which slowed down the interactive response considerably.
+  These additional SQL catalog queries have been eliminated.
+
+* Thu May 12 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.23.1-20160601
+- Corrected MonetResultSet.getObject(String columnName). It no longer
+  throws a NullPointerException in cases where internally a
+  MonetVirtualResultSet is used.
+
+* Sun May  8 2016 Jennie Zhang <y.zhang@cwi.nl> - 11.23.1-20160601
+- Fixed Connection.isValid(): this method should never attempt to
+  close the connection, even if an error has occurred.
+
 * Sun May  8 2016 Jennie Zhang <y.zhang@cwi.nl> - 11.23.1-20160601
 - ResultSet.setFetchSize(): added a dummy implementation to get rid
   of the SQLFeatureNotSupportedException. In MonetDB, it does not
@@ -112,20 +216,12 @@
 - Fixed a memory leak in MonetDatabaseMetaData.java for a static cache
   which kept references to closed Connection objects.
 
-* Thu May 12 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.23.1-20160601
-- Improved JdbcClient program when presenting query data to console.
-  It used to send an SQL catalog query for each query result column
-  which slowed down the interactive response considerably.
-  These additional SQL catalog queries have been eliminated.
+* Tue Jan  5 2016 Sjoerd Mullender <sjoerd@acm.org>
+- Compiled and released new JDBC driver jar: monetdb-jdbc-2.19.jar
 
-* Thu May 12 2016 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.23.1-20160601
-- Corrected MonetResultSet.getObject(String columnName). It no longer
-  throws a NullPointerException in cases where internally a
-  MonetVirtualResultSet is used.
-
-* Sun May  8 2016 Jennie Zhang <y.zhang@cwi.nl> - 11.23.1-20160601
-- Fixed Connection.isValid(): this method should never attempt to
-  close the connection, even if an error has occurred.
+* Fri Oct 30 2015 Sjoerd Mullender <sjoerd@acm.org>
+- Compiled and released new jars: monetdb-jdbc-2.18.jar, monetdb-mcl-1.13.jar
+  and updated jdbcclient.jar
 
 * Thu Aug  6 2015 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.21.1-20150807
 - Improved JDBC driver to not throw NullPointerException anymore
--- a/build.properties
+++ b/build.properties
@@ -9,7 +9,7 @@
 # major release number
 MCL_MAJOR=1
 # minor release number
-MCL_MINOR=13
+MCL_MINOR=14
 
 
 ##
@@ -19,7 +19,7 @@ MCL_MINOR=13
 # major release number
 JDBC_MAJOR=2
 # minor release number
-JDBC_MINOR=23
+JDBC_MINOR=24
 # an additional identifying string
 JDBC_VER_SUFFIX=Liberica
 # the default port to connect on, if no port given when using SQL
--- a/release.txt
+++ b/release.txt
@@ -1,6 +1,6 @@
 RELEASE NOTES
-MonetDB JDBC driver version 2.23 (Liberica/MCL-1.13)
-Release date: 2016-07-13
+MonetDB JDBC driver version 2.24 (Liberica/MCL-1.14)
+Release date: 2016-12-15
 
 This JDBC driver is designed for use with MonetDB, a main-memory
 database.  For more information see https://www.monetdb.org/.
@@ -29,13 +29,10 @@ Currently implemented JDBC 4.1 interface
 
   * java.sql.Connection
     The next features/methods are NOT implemented:
-    - createArrayOf
-    - createBlob, createClob, createNClob
-    - createStruct
-    - createSQLXML
+    - createArrayOf, createNClob, createStruct, createSQLXML
     - createStatement with result set holdability
     - prepareCall (CallableStatement is not supported)
-    - prepareStatement with column indices or names
+    - prepareStatement with array of column indices or column names
     - setHoldability (close/hold cursors over commit is not
       configurable)
   NOTE: be sure to check for warnings after setting concurrencies or
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetBlob.java
@@ -8,9 +8,14 @@
 
 package nl.cwi.monetdb.jdbc;
 
-import java.sql.*;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.sql.Blob;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.Arrays;
-import java.io.*;
 
 /**
  * The MonetBlob class implements the {@link java.sql.Blob} interface.  Because
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetClob.java
@@ -8,8 +8,9 @@
 
 package nl.cwi.monetdb.jdbc;
 
-import java.sql.*;
 import java.io.*;
+import java.sql.Clob;
+import java.sql.SQLException;
 
 /**
  * The MonetClob class implements the {@link java.sql.Clob} interface.  Because
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDataSource.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDataSource.java
@@ -8,21 +8,23 @@
 
 package nl.cwi.monetdb.jdbc;
 
-import java.sql.*;
-import javax.sql.*;
-import java.util.*;
-import java.io.*;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import javax.sql.DataSource;
+import java.util.Properties;
 import java.util.logging.Logger;
 
 /**
  * A DataSource suitable for the MonetDB database.
- * 
+ *
  * This DataSource allows retrieval of a Connection using the JNDI bean like
  * framework.  A DataSource has numerous advantages over using the DriverManager
  * to retrieve a Connection object.  Using the DataSource interface enables a
  * more transparent application where the location or database can be changed
  * without changing any application code.
- * 
+ *
  * Additionally, pooled connections can be used when using a DataSource.
  *
  * @author Fabian Groffen
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetSavepoint.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetSavepoint.java
@@ -8,7 +8,8 @@
 
 package nl.cwi.monetdb.jdbc;
 
-import java.sql.*;
+import java.sql.SQLException;
+import java.sql.Savepoint;
 import java.util.concurrent.atomic.AtomicInteger;
 
 /**
--- a/version.sh
+++ b/version.sh
@@ -97,22 +97,6 @@ sed \
 	-e "s|Release date: 20[0-9][0-9]-[01][0-9]-[0-3][0-9]|Release date: `date +%F`|" \
 	${file} | ${diff} ${file} - | ${patch}
 
-for file in \
-	Makefile.ag \
-	; do
-	if [[ -f ${file} ]] ; then
-		for f in $FILES ; do
-			fr=${f//XXX/${NEW_MAJOR}.${NEW_MINOR}}
-			fo=${f//XXX/${ESC_MAJOR}.${ESC_MINOR}}
-			fo=${fo//./\\.}
-			sed -e "s|${fo}|${fr}|g" \
-				${file} | ${diff} ${file} - | ${patch}
-		done
-	else
-		echo "Please do not forget to patch file '${file##*../}', too."
-	fi
-done
-
 file="build.properties"
 sed \
 	-e "s|${TYPE}_MAJOR=${ESC_MAJOR}|${TYPE}_MAJOR=${NEW_MAJOR}|g" \