Changeset: 42e006ee81a4 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=42e006ee81a4 Branch: default Log Message:
Merge branch 'master' into ci diffs (truncated from 5275 to 300 lines): diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -4,7 +4,7 @@ syntax: glob *.class *.jar build/META-INF/services/java.sql.Driver -src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java +src/main/java/org/monetdb/jdbc/MonetDriver.java # files generated by various editors *.swp diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog +* Wed Jan 6 2021 Martin van Dinther <[email protected]> +- Corrected output of resultset columns UPDATE_RULE and DELETE_RULE + when calling DatabaseMetaData API methods getImportedKeys() or + getExportedKeys() or getCrossReference(). These columns used to + always return DatabaseMetaData.importedKeyNoAction but now they + can also report the other values when set: + DatabaseMetaData.importedKeyCascade + or DatabaseMetaData.importedKeyRestrict + or DatabaseMetaData.importedKeySetNull + or DatabaseMetaData.importedKeySetDefault. + * Thu Nov 12 2020 Martin van Dinther <[email protected]> - Moved Java classes from packages starting with nl.cwi.monetdb.* to package org.monetdb.* This naming complies to the Java Package @@ -41,7 +52,7 @@ * Thu Oct 8 2020 Martin van Dinther <[email protected]> - Improved performance of ResultSetMetaData methods isAutoIncrement(), - getPrecision() and getScale() significant for columns of specific data + getPrecision() and getScale() significantly for columns of specific data types as in some cases no costly meta data query is executed anymore. - The connection properties treat_clob_as_varchar and treat_blob_as_binary are now set to true by default within the JDBC driver. This is done diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -11,3 +11,11 @@ doc: clean: rm -f src/main/java/org/monetdb/jdbc/MonetDriver.java rm -rf build tests/build jars doc + +cleandoc: + rm -rf doc + +cleantests: + rm -rf tests/build + rm -f jars/jdbctests.jar + diff --git a/SQLSTATEs b/SQLSTATEs --- a/SQLSTATEs +++ b/SQLSTATEs @@ -53,7 +53,7 @@ M1M20 object closed M1M25 failed reading from/writing to object stream SQLState codes are used in SQLExceptions. -JDBC 4.1 defines the following SQLException subclass mappings: +JDBC 4.2 defines the following SQLException subclass mappings: NonTransientSQLExceptions (fails when same operation executed again) 0A SQLFeatureNotSupportedException 08 SQLNonTransientConnectionException @@ -66,6 +66,6 @@ JDBC 4.1 defines the following SQLExcept 40 SQLTransactionRollbackException null SQLTimeoutException -See also: http://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html +See also: http://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html See also: https://en.wikipedia.org/wiki/SQLSTATE diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -5,7 +5,7 @@ This Source Code Form is subject to the 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 - 2020 MonetDB B.V. +Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. --> <!-- diff --git a/example/MJDBCTest.java b/example/MJDBCTest.java --- a/example/MJDBCTest.java +++ b/example/MJDBCTest.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ import java.sql.*; diff --git a/example/PreparedExample.java b/example/PreparedExample.java --- a/example/PreparedExample.java +++ b/example/PreparedExample.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ import java.sql.*; diff --git a/example/SQLImport.java b/example/SQLImport.java --- a/example/SQLImport.java +++ b/example/SQLImport.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ import java.sql.*; diff --git a/src/main/java/nl/cwi/monetdb/client/JdbcClient.java b/src/main/java/nl/cwi/monetdb/client/JdbcClient.java --- a/src/main/java/nl/cwi/monetdb/client/JdbcClient.java +++ b/src/main/java/nl/cwi/monetdb/client/JdbcClient.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package nl.cwi.monetdb.client; diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package nl.cwi.monetdb.jdbc; diff --git a/src/main/java/nl/cwi/monetdb/jdbc/types/INET.java b/src/main/java/nl/cwi/monetdb/jdbc/types/INET.java --- a/src/main/java/nl/cwi/monetdb/jdbc/types/INET.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/types/INET.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package nl.cwi.monetdb.jdbc.types; diff --git a/src/main/java/nl/cwi/monetdb/jdbc/types/URL.java b/src/main/java/nl/cwi/monetdb/jdbc/types/URL.java --- a/src/main/java/nl/cwi/monetdb/jdbc/types/URL.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/types/URL.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package nl.cwi.monetdb.jdbc.types; diff --git a/src/main/java/nl/cwi/monetdb/mcl/net/MapiSocket.java b/src/main/java/nl/cwi/monetdb/mcl/net/MapiSocket.java --- a/src/main/java/nl/cwi/monetdb/mcl/net/MapiSocket.java +++ b/src/main/java/nl/cwi/monetdb/mcl/net/MapiSocket.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package nl.cwi.monetdb.mcl.net; diff --git a/src/main/java/org/monetdb/client/JMonetDB.java b/src/main/java/org/monetdb/client/JMonetDB.java --- a/src/main/java/org/monetdb/client/JMonetDB.java +++ b/src/main/java/org/monetdb/client/JMonetDB.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package org.monetdb.client; diff --git a/src/main/java/org/monetdb/client/JdbcClient.java b/src/main/java/org/monetdb/client/JdbcClient.java --- a/src/main/java/org/monetdb/client/JdbcClient.java +++ b/src/main/java/org/monetdb/client/JdbcClient.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package org.monetdb.client; diff --git a/src/main/java/org/monetdb/jdbc/MonetBlob.java b/src/main/java/org/monetdb/jdbc/MonetBlob.java --- a/src/main/java/org/monetdb/jdbc/MonetBlob.java +++ b/src/main/java/org/monetdb/jdbc/MonetBlob.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package org.monetdb.jdbc; diff --git a/src/main/java/org/monetdb/jdbc/MonetCallableStatement.java b/src/main/java/org/monetdb/jdbc/MonetCallableStatement.java --- a/src/main/java/org/monetdb/jdbc/MonetCallableStatement.java +++ b/src/main/java/org/monetdb/jdbc/MonetCallableStatement.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package org.monetdb.jdbc; diff --git a/src/main/java/org/monetdb/jdbc/MonetClob.java b/src/main/java/org/monetdb/jdbc/MonetClob.java --- a/src/main/java/org/monetdb/jdbc/MonetClob.java +++ b/src/main/java/org/monetdb/jdbc/MonetClob.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package org.monetdb.jdbc; diff --git a/src/main/java/org/monetdb/jdbc/MonetConnection.java b/src/main/java/org/monetdb/jdbc/MonetConnection.java --- a/src/main/java/org/monetdb/jdbc/MonetConnection.java +++ b/src/main/java/org/monetdb/jdbc/MonetConnection.java @@ -3,7 +3,7 @@ * 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 - 2020 MonetDB B.V. + * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V. */ package org.monetdb.jdbc; @@ -76,7 +76,7 @@ public class MonetConnection /** The hostname to connect to */ private final String hostname; /** The port to connect on the host to */ - private int port = 0; + private int port; /** The database to use (currently not used) */ private final String database; /** The username to use when authenticating */ @@ -101,7 +101,7 @@ public class MonetConnection private boolean autoCommit = true; /** The stack of warnings for this Connection object */ - private SQLWarning warnings = null; + private SQLWarning warnings; /** The Connection specific mapping of user defined types to Java types */ private Map<String,Class<?>> typeMap = new HashMap<String,Class<?>>() { @@ -142,7 +142,7 @@ public class MonetConnection private boolean treatClobAsVarChar = true; /** The last set query timeout on the server as used by Statement, PreparedStatement and CallableStatement */ - protected int lastSetQueryTimeout = 0; // 0 means no timeout, which is the default on the server + protected int lastSetQueryTimeout; // 0 means no timeout, which is the default on the server /** @@ -1014,7 +1014,7 @@ public class MonetConnection public void setAutoCommit(final boolean autoCommit) throws SQLException { checkNotClosed(); if (this.autoCommit != autoCommit) { - sendControlCommand("auto_commit " + (autoCommit ? "1" : "0")); + sendControlCommand(autoCommit ? "auto_commit 1" : "auto_commit 0"); this.autoCommit = autoCommit; } } @@ -1074,14 +1074,7 @@ public class MonetConnection */ @Override public Savepoint setSavepoint() throws SQLException { - checkNotClosed(); - // create a new Savepoint object - final MonetSavepoint sp = new MonetSavepoint(); _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
