monetdb-java: embedded - Merge with default.
Changeset: 2ad7f42f141d for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=2ad7f42f141d Added Files: tests/Bug_LargeQueries_6571_6693.java Removed Files: src/main/java/nl/cwi/monetdb/mcl/connection/SenderThread.java Modified Files: src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.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 tests/build.xml Branch: embedded Log Message: Merge with default. diffs (truncated from 4428 to 300 lines): diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @@ -11,7 +11,6 @@ package nl.cwi.monetdb.jdbc; import nl.cwi.monetdb.mcl.connection.ControlCommands; import nl.cwi.monetdb.mcl.connection.IMonetDBLanguage; import nl.cwi.monetdb.mcl.connection.MCLException; -import nl.cwi.monetdb.mcl.connection.SenderThread; import nl.cwi.monetdb.mcl.protocol.AbstractProtocol; import nl.cwi.monetdb.mcl.protocol.ProtocolException; import nl.cwi.monetdb.mcl.protocol.ServerResponses; @@ -50,8 +49,10 @@ import java.util.concurrent.Executor; * @author Fabian Groffen, Martin van Dinther, Pedro Ferreira * @version 1.3 */ -public abstract class MonetConnection extends MonetWrapper implements Connection, AutoCloseable { - +public abstract class MonetConnection + extends MonetWrapper + implements Connection, AutoCloseable +{ /** The sequence counter */ private static int SeqCounter = 0; @@ -66,18 +67,22 @@ public abstract class MonetConnection ex /** The successful processed input properties */ protected final Properties conn_props; + /** The language to connect with */ protected IMonetDBLanguage language; + /** Authentication hash method */ protected final String hash; - /** An optional thread that is used for sending large queries */ - private SenderThread senderThread; + /** Whether this Connection is closed (and cannot be used anymore) */ private boolean closed; + /** Whether this Connection is in autocommit mode */ private boolean autoCommit = true; + /** The stack of warnings for this Connection object */ - private SQLWarning warnings; + private SQLWarning warnings = null; + /** The Connection specific mapping of user defined types to Java types */ private Map> typeMap = new HashMap>() { private static final long serialVersionUID = 1L; { @@ -86,25 +91,32 @@ public abstract class MonetConnection ex } }; - // See javadoc for documentation about WeakHashMap if you don't know what it does !!!NOW!!! - // (only when you deal with it of course) + // See javadoc for documentation about WeakHashMap if you don't know what + // it does !!!NOW!!! (only when you deal with it of course) /** A Map containing all (active) Statements created from this Connection */ - private Map statements = new WeakHashMap<>(); + private Map statements = new WeakHashMap(); + /** The number of results we receive from the server at once */ - private int curReplySize = -1; // the server by default uses -1 (all) + private int curReplySize = -1; // the server by default uses -1 (all) /** Whether or not BLOB is mapped to Types.VARBINARY instead of Types.BLOB within this connection */ - private final boolean treatBlobAsVarBinary; + private boolean treatBlobAsVarBinary = false; /** Whether or not CLOB is mapped to Types.VARCHAR instead of Types.CLOB within this connection */ - private final boolean treatClobAsVarChar; + private boolean treatClobAsVarChar = false; /** The underlying proticol provided by the connection (MAPI or embedded) */ protected AbstractProtocol protocol; /** Tells if the connection is embedded or not */ private final boolean isEmbedded; /** -* Constructor of a Connection for MonetDB. At this moment the current implementation limits itself to storing the -* given host, database, username and password for later use by the createStatement() call. This constructor is -* only accessible to classes from the jdbc package. +* Constructor of a Connection for MonetDB. At this moment the +* current implementation limits itself to storing the given host, +* database, username and password for later use by
monetdb-java: embedded - Merge with default.
Changeset: 4face9f42efc for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=4face9f42efc Added Files: src/main/java/nl/cwi/monetdb/jdbc/MonetCallableStatement.java tests/Test_CallableStmt.java Modified Files: ChangeLog SQLSTATEs build.xml example/MJDBCTest.java example/PreparedExample.java example/SQLImport.java release.txt 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/MonetINET.java 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/jdbc/MonetURL.java src/main/java/nl/cwi/monetdb/jdbc/MonetWrapper.java src/main/java/nl/cwi/monetdb/mcl/connection/ControlCommands.java src/main/java/nl/cwi/monetdb/mcl/connection/IMonetDBLanguage.java src/main/java/nl/cwi/monetdb/mcl/connection/MCLException.java src/main/java/nl/cwi/monetdb/mcl/connection/SenderThread.java src/main/java/nl/cwi/monetdb/mcl/connection/helpers/BufferReallocator.java src/main/java/nl/cwi/monetdb/mcl/connection/helpers/ChannelSecurity.java src/main/java/nl/cwi/monetdb/mcl/connection/helpers/GregorianCalendarParser.java src/main/java/nl/cwi/monetdb/mcl/connection/helpers/TimestampHelper.java src/main/java/nl/cwi/monetdb/mcl/connection/mapi/AbstractSocket.java src/main/java/nl/cwi/monetdb/mcl/connection/mapi/MapiConnection.java src/main/java/nl/cwi/monetdb/mcl/connection/mapi/MapiLanguage.java src/main/java/nl/cwi/monetdb/mcl/connection/mapi/OldMapiSocket.java src/main/java/nl/cwi/monetdb/mcl/protocol/AbstractProtocol.java src/main/java/nl/cwi/monetdb/mcl/protocol/ProtocolException.java src/main/java/nl/cwi/monetdb/mcl/protocol/ServerResponses.java src/main/java/nl/cwi/monetdb/mcl/protocol/StarterHeaders.java src/main/java/nl/cwi/monetdb/mcl/protocol/TableResultHeaders.java src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiDataBlockResponse.java src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiProtocol.java src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiServerResponseParser.java src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiStartOfHeaderParser.java src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTableHeaderParser.java src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParser.java src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParserHelper.java src/main/java/nl/cwi/monetdb/mcl/responses/AbstractDataBlockResponse.java src/main/java/nl/cwi/monetdb/mcl/responses/AutoCommitResponse.java src/main/java/nl/cwi/monetdb/mcl/responses/IIncompleteResponse.java src/main/java/nl/cwi/monetdb/mcl/responses/IResponse.java src/main/java/nl/cwi/monetdb/mcl/responses/ResultSetResponse.java src/main/java/nl/cwi/monetdb/mcl/responses/SchemaResponse.java src/main/java/nl/cwi/monetdb/mcl/responses/UpdateResponse.java src/main/java/nl/cwi/monetdb/merovingian/Control.java src/main/java/nl/cwi/monetdb/merovingian/MerovingianException.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/OptionsException.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/BugConcurrent_clients_SF_1504657.java tests/BugConcurrent_sequences.java tests/BugDatabaseMetaData_Bug_3356.java tests/BugDecimalRound_Bug_3561.java tests/BugExecuteUpdate_Bug_3350.java tests/BugResultSetMetaData_Bug_6183.java tests/BugSetQueryTimeout_Bug_3357.java tests/Bug_Connect_as_voc_getMetaData_Failure_Bug_6388.java tests/Bug_PrepStmtSetObject_CLOB_6349.java tests/Bug_PrepStmtSetString_6382.java tests/SQLcopyinto.java tests/Test_Cautocommit.java tests/Test_Cforkbomb.java
monetdb-java: embedded - Merge with default.
Changeset: 96057ee68017 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=96057ee68017 Added Files: tests/SQLcopyinto.java Removed Files: example/SQLcopyinto.java Modified Files: ChangeLog src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.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/MonetStatement.java tests/BugSetQueryTimeout_Bug_3357.java tests/build.xml Branch: embedded Log Message: Merge with default. diffs (truncated from 781 to 300 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,39 +1,12 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog -* Wed May 23 2018 Sjoerd Mullender -- Compiled and released new jars: monetdb-jdbc-2.28.jar, monetdb-mcl-1.17.jar - and updated jdbcclient.jar - -* Thu Apr 26 2018 Martin van Dinther -- Corrected and extended output of DatabaseMetaData methods - getTimeDateFunctions() and getSystemFunctions(). The Date/Time functions - (curdate, current_date, current_time, current_timestamp, curtime, - local_timezone, localtime, localtimestamp) were returned by - getSystemFunctions() but are now returned by getTimeDateFunctions(). - getTimeDateFunctions() now also lists functions: date_to_str, extract, now, - str_to_date, str_to_time, str_to_timestamp, time_to_str and timestamp_to_str. -- Improved DatabaseMetaData methods getTablePrivileges() and - getColumnPrivileges() by returning also any combination of privileges - for the table or column in the PRIVILEGE result column. Previously only - single privileges (SELECT or UPDATE or INSERT or DELETE or EXECUTE or - GRANT) would be returned. +* Thu Sep 20 2018 Martin van Dinther +- Improved example program SQLcopyinto.java and moved it to tests directory + for automatic testing. -* Thu Apr 19 2018 Martin van Dinther -- Corrected method DatabaseMetaData.getFunctions() for result column - FUNCTION_TYPE. It used to return DatabaseMetaData.functionResultUnknown - value for Analytic (functions.type 6) and Loader function (functions type 7). - It now returns DatabaseMetaData.functionNoTable for Analytic functions and - DatabaseMetaData.functionReturnsTable for Loader functions. -- DatabaseMetaData methods getTables(), getColumns(), getProcedures() and - getFunctions() now return the comment in the REMARKS result column when a - comment has been set for the table / view / column / procedure / function - via the SQL command COMMENT ON IS 'comment-text'. +* Thu Jun 28 2018 Martin van Dinther +- Corrected return values of DatabaseMetaData methods + allTablesAreSelectable() and allProceduresAreCallable(). + They used to return true but now return false. -* Thu Dec 14 2017 Martin van Dinther -- Fixed a problem with retrieving Dates and Timestamps which contained a - year value less than 1000. It would throw an SQLDataException with message: - Could not convert value to a Date. Expected JDBC date escape format - -[m]m-[d]d. - See also: https://www.monetdb.org/bugzilla/show_bug.cgi?id=6468 - diff --git a/example/SQLcopyinto.java b/example/SQLcopyinto.java deleted file mode 100644 --- a/example/SQLcopyinto.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 1997 - July 2008 CWI, August 2008 - 2018 MonetDB B.V. - */ - -import java.sql.*; -import java.io.*; -import java.util.*; - -import nl.cwi.monetdb.mcl.connection.mapi.MapiConnection; -import nl.cwi.monetdb.mcl.protocol.AbstractProtocol; - -/** - * This example demonstrates how the MonetDB JDBC driver can facilitate - * in performing COPY INTO sequences. This is mainly meant to show how - * a quick load can be performed from Java. - * - * @author Fabian Groffen - */ - -public class SQLcopyinto { - public static void main(String[] args) throws Exception { - // request a connection suitable for Monet from the driver manager - // note that the database specifier is currently not implemented, for - // Monet itself can't access multiple databases. - // turn on debugging - Connection con = DriverManager.getConnection("jdbc:monetdb://localhost/database", "monetdb", "monetdb"); - - // get a statement to execute on - Statement stmt = con.createStatement(); - - String query = "CREATE TABLE example (id int, val varchar(24))"; - try { - stmt.execute(query); - } catch (SQLException e) { - System.out.println(query + ": " + e.getMessage()); - System.exit(1); - } -
monetdb-java: embedded - Merge with default
Changeset: 0a118436067b for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=0a118436067b Modified Files: .hgtags build.properties pom.xml release.txt Branch: embedded Log Message: Merge with default diffs (8 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -2,3 +2,4 @@ 80de05f07508fec938845b4a6e05f600bf0b48c0 c43c293f3d5841517cbe0d858108c4da5fb1ec0c v2.26 a6a2f4ee2d42d7e192f9d8d37f79ea99178d7f2c v2.25 fe8170e2b549c22ceb2d96301022b9304f62424d v2.27 +6423fb0bf9ebba64167ca1b40b79aeacbb8e7c47 v2.28 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
monetdb-java: embedded - Merge with default
Changeset: 3c3345a298f2 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=3c3345a298f2 Modified Files: ChangeLog ChangeLog-Archive src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java Branch: embedded Log Message: Merge with default diffs (200 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog +* Wed May 23 2018 Sjoerd Mullender+- Compiled and released new jars: monetdb-jdbc-2.28.jar, monetdb-mcl-1.17.jar + and updated jdbcclient.jar + * Thu Apr 26 2018 Martin van Dinther - Corrected and extended output of DatabaseMetaData methods getTimeDateFunctions() and getSystemFunctions(). The Date/Time functions @@ -26,3 +30,10 @@ comment has been set for the table / view / column / procedure / function via the SQL command COMMENT ON IS 'comment-text'. +* Thu Dec 14 2017 Martin van Dinther +- Fixed a problem with retrieving Dates and Timestamps which contained a + year value less than 1000. It would throw an SQLDataException with message: + Could not convert value to a Date. Expected JDBC date escape format + -[m]m-[d]d. + See also: https://www.monetdb.org/bugzilla/show_bug.cgi?id=6468 + diff --git a/ChangeLog-Archive b/ChangeLog-Archive --- a/ChangeLog-Archive +++ b/ChangeLog-Archive @@ -1,6 +1,42 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past monetdb-java ChangeLog entries +* Wed May 23 2018 Sjoerd Mullender +- Compiled and released new jars: monetdb-jdbc-2.28.jar, monetdb-mcl-1.17.jar + and updated jdbcclient.jar + +* Thu Apr 26 2018 Martin van Dinther +- Corrected and extended output of DatabaseMetaData methods + getTimeDateFunctions() and getSystemFunctions(). The Date/Time functions + (curdate, current_date, current_time, current_timestamp, curtime, + local_timezone, localtime, localtimestamp) were returned by + getSystemFunctions() but are now returned by getTimeDateFunctions(). + getTimeDateFunctions() now also lists functions: date_to_str, extract, now, + str_to_date, str_to_time, str_to_timestamp, time_to_str and timestamp_to_str. +- Improved DatabaseMetaData methods getTablePrivileges() and + getColumnPrivileges() by returning also any combination of privileges + for the table or column in the PRIVILEGE result column. Previously only + single privileges (SELECT or UPDATE or INSERT or DELETE or EXECUTE or + GRANT) would be returned. + +* Thu Apr 19 2018 Martin van Dinther +- Corrected method DatabaseMetaData.getFunctions() for result column + FUNCTION_TYPE. It used to return DatabaseMetaData.functionResultUnknown + value for Analytic (functions.type 6) and Loader function (functions type 7). + It now returns DatabaseMetaData.functionNoTable for Analytic functions and + DatabaseMetaData.functionReturnsTable for Loader functions. +- DatabaseMetaData methods getTables(), getColumns(), getProcedures() and + getFunctions() now return the comment in the REMARKS result column when a + comment has been set for the table / view / column / procedure / function + via the SQL command COMMENT ON IS 'comment-text'. + +* Thu Dec 14 2017 Martin van Dinther +- Fixed a problem with retrieving Dates and Timestamps which contained a + year value less than 1000. It would throw an SQLDataException with message: + Could not convert value to a Date. Expected JDBC date escape format + -[m]m-[d]d. + See also: https://www.monetdb.org/bugzilla/show_bug.cgi?id=6468 + * Mon Oct 23 2017 Sjoerd Mullender - Compiled and released new jars: monetdb-jdbc-2.27.jar, monetdb-mcl-1.16.jar and updated jdbcclient.jar diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -300,7 +300,7 @@ public class MonetDatabaseMetaData exten /** * Does the database treat mixed case unquoted SQL identifiers * as case sensitive and as a result store them in mixed case? -* A JDBC Compliant TM driver always returns false. +* A JDBC Compliant TM driver always returns false. * * @return false */ @@ -345,7 +345,7 @@ public class MonetDatabaseMetaData exten /** * Does the database treat mixed case quoted SQL identifiers as * case sensitive and as a result store them in mixed case? -* A JDBC Compliant TM driver always returns true. +* A JDBC Compliant TM driver always returns true. * *
monetdb-java: embedded - Merge with default
Changeset: c23218fbc2e9 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=c23218fbc2e9 Modified Files: src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java Branch: embedded Log Message: Merge with default ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list