id
stringlengths 22
25
| commit_message
stringlengths 137
6.96k
| diffs
listlengths 0
63
|
|---|---|---|
derby-DERBY-949-e72bcdd3
|
DERBY-949: Clean up tests to use common method to get connection.
Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@386216 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java",
"hunks": [
{
"added": [
" public static Connection getConnection(String databaseName, String connAttrs)",
" \tthrows SQLException {",
" try {",
" Connection conn;",
" if(TestUtil.HAVE_DRIVER_CLASS) {",
" // following is like loadDriver(), but",
" // that method throws Exception, we want finer granularity",
" String driverName;",
" int framework = getFramework();",
" switch (framework)",
" {",
" case EMBEDDED_FRAMEWORK:",
" driverName = \"org.apache.derby.jdbc.EmbeddedDriver\";",
" break;",
" case DERBY_NET_FRAMEWORK:",
" case OLD_NET_FRAMEWORK:\t\t\t\t",
" case DB2JCC_FRAMEWORK:\t\t\t\t",
" driverName = \"com.ibm.db2.jcc.DB2Driver\";",
" break;",
" case DERBY_NET_CLIENT_FRAMEWORK:",
" driverName = \"org.apache.derby.jdbc.ClientDriver\";",
" break;",
" default:",
" driverName = \"org.apache.derby.jdbc.EmbeddedDriver\";",
" break;",
" } ",
" // q: do we need a privileged action here, like in loadDriver?",
" Class.forName(driverName).newInstance();",
"\t\t\t\t",
" String url = getJdbcUrlPrefix() + databaseName;",
" if (connAttrs != null) url += \";\" + connAttrs;",
" if (framework == DERBY_NET_FRAMEWORK)",
" {",
" if (( connAttrs == null) || ((connAttrs != null) && (connAttrs.indexOf(\"user\") < 0)))",
" url += \":\" + \"user=me;password=mine;retrieveMessagesFromServerOnGetMessage=true;\";",
" }",
" conn = DriverManager.getConnection(url);",
" \t }",
" \t else {",
" \t\t //Use DataSource for JSR169",
"\t \t Properties prop = new Properties();",
"\t prop.setProperty(\"databaseName\", databaseName);",
" \t\t if (connAttrs != null)",
"\t prop.setProperty(\"connectionAttributes\", connAttrs);",
"\t conn = getDataSourceConnection(prop);",
" \t }",
" return conn;",
" \t} catch (ClassNotFoundException cnfe) { ",
"\t\t System.out.println(\"FAILure: Class not found!\");",
"\t\t cnfe.printStackTrace();",
"\t\t return null;",
" \t} catch (InstantiationException inste) {",
" \t\tSystem.out.println(\"FAILure: Cannot instantiate class\");",
" \t\tinste.printStackTrace();",
" \t\treturn null;",
" \t} catch (IllegalAccessException ille) {",
" \t\tSystem.out.println(\"FAILure: Not allowed to use class\");",
" \t\tille.printStackTrace();",
" \t\treturn null;"
],
"header": "@@ -750,26 +750,66 @@ public class TestUtil {",
"removed": [
" public static Connection getConnection(String databaseName, ",
" \t\t\t\t\t\t\t\t\t String connAttrs) ",
" \tthrows SQLException, ClassNotFoundException, ",
"\t\t\t\tInstantiationException, IllegalAccessException {",
" \t",
" \tConnection conn;",
" \tif(TestUtil.HAVE_DRIVER_CLASS) {",
" \t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";",
" \t\tClass.forName(driver).newInstance();",
" \t\tconn = DriverManager.getConnection(\"jdbc:derby:\" + databaseName ",
"\t\t\t\t\t\t\t\t\t\t\t\t+ \";\" + connAttrs );",
" \t}",
" \telse {",
" \t\t//Use DataSource for JSR169",
"\t \tProperties prop = new Properties();",
"\t prop.setProperty(\"databaseName\", databaseName);",
"\t prop.setProperty(\"connectionAttributes\", connAttrs);",
"\t conn = getDataSourceConnection(prop);",
" return conn;"
]
}
]
}
] |
derby-DERBY-953-64e17680
|
DERBY-953: Add Statement.isClosed() JDBC4 method
DERBY-1097: Add tests for Statement.isClosed() JDBC4 method
Contributed by Kristian Waagan.
I modified his patch for DERBY-953 to match
Dan's suggested approach. I also added StatementTest.junit to the jdbc40
test suite, which passes. Since this is a JDBC40-specific feature, and
only new code has been added (no existing code has been modified) I did
not run derbyall
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@388234 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-953-a1a7f8ba
|
DERBY-953 (partial) Add/expand javadoc comments for EmbedStatement.checkStatus and checkExecStatus.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@388227 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java",
"hunks": [
{
"added": [
"\t/**",
" * Throw an exception if this Statement has been closed explictly",
" * or it has noticed it has been closed implicitly.",
" * JDBC specifications require nearly all methods throw a SQLException",
" * if the Statement has been closed, thus most methods call this",
" * method or checkExecStatus first.",
" * ",
" * @exception SQLException Thrown if the statement is marked as closed.",
" * ",
" * @see #checkExecStatus()",
"\t */"
],
"header": "@@ -1240,8 +1240,17 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\t//check the status of this statement, if it has already been closed,",
" //we throw an exception, need to be called by every public method"
]
},
{
"added": [
" <BR>",
" If this Statement's exception is actually closed an exception will",
" be thrown and the active field will be set to false,",
" completely marking the Statement as closed.",
" <BR>",
" If the Statement is not currently connected to an active",
" transaction, i.e. a suspended global transaction, then",
" this method will throw a SQLException but the Statement",
" will remain open. The Statement is open but unable to",
" process any new requests until its global transaction",
" is resumed.",
" <BR>",
" Upon return from the method, with or without a SQLException",
" the field active will correctly represent the open state of",
" the Statement.",
" ",
" @exception SQLException Thrown if the statement is marked as closed",
" or the Statement's transaction is suspended.",
" ",
" @see #checkStatus()",
"\tfinal void checkExecStatus() throws SQLException {"
],
"header": "@@ -1257,8 +1266,28 @@ public class EmbedStatement extends ConnectionChild",
"removed": [
"\tprotected final void checkExecStatus() throws SQLException {"
]
}
]
}
] |
derby-DERBY-96-37551192
|
committing tests for DERBY-96 for suresh.thalamati@gmail.com
Attached are some functional tests to test the transaction log checksum feature (Derby-96).
Log corruption is simulated using a proxy storage factory that allows corruption of
the log write request before being writing to the disk. CorruptDiskStorage factory by default forwards
all the request to the underlying disk storage factory except when corruption flags are enabled.
Recovery tests need to boot the same database many times and have to use the
different Subprotocol to enable the corruption instead of the default protocol. This seems to be
possible only by adding a new tests suite in the current test frame work. Added a new suite
called "storerecovery" , may be all future recovery tests can be added to this suite.
git-svn-id: https://svn.apache.org/repos/asf/incubator/derby/code/trunk@169737 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptibleIo.java",
"hunks": [
{
"added": [
"/*",
"",
" Derby - Derby - Class org.apache.derbyTesting.functionTests.util.corruptio.CorruptibleIo",
"",
" Copyright 2004 The Apache Software Foundation or its licensors, as applicable.",
"",
" Licensed under the Apache License, Version 2.0 (the \"License\");",
" you may not use this file except in compliance with the License.",
" You may obtain a copy of the License at",
"",
" http://www.apache.org/licenses/LICENSE-2.0",
"",
" Unless required by applicable law or agreed to in writing, software",
" distributed under the License is distributed on an \"AS IS\" BASIS,",
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
" See the License for the specific language governing permissions and",
" limitations under the License.",
"",
" */",
"",
"package org.apache.derbyTesting.functionTests.util.corruptio;",
"import java.io.File;",
"",
"/*",
" * This is a helper class to instrument the CorruptDiskStorageFactory ",
" * to modify the i/o opertions before the request are sent to ",
" * a real storage factory. ",
" * ",
" * Tests can specify what type of corruption is required like log/data files",
" * and the at what and offset and the length of the corruption to be ",
" * done in the write requests. ",
" * ",
" * Only one instance of this class will exist in the system, Tests should hold",
" * onto the instance of this class until they are done sending the i/o ",
" * requests by executing statement that will actuall will trigger i/o , ",
" * for example a commit will flush the log buffers. Otherwise class garbage ",
" * collector can reinitialize the values. ",
" * ",
" * @author <a href=\"mailto:suresh.thalamati@gmail.com\">Suresh Thalamati</a>",
" * @version 1.0",
" * @see WritableStorageFactory",
" * @see StorageFactory",
" */",
"",
"public class CorruptibleIo {",
"",
"\tprivate static CorruptibleIo instance = new CorruptibleIo();",
"\tprivate boolean corruptLog = false; //corrupt the log i/o to log*.dat files",
"\tprivate boolean corruptData = false; //corrupt the files under seg0(data) ",
"\tprivate int corruptLength; // no of bytes to corrupt",
"\tprivate int corruptOffset; // offset inside the write request ",
"",
"",
"\tprivate CorruptibleIo() {",
" }",
"",
"\tpublic static CorruptibleIo getInstance() {",
"\t\treturn instance;",
"\t}",
"",
"\t",
"\tpublic void setLogCorruption(boolean corrupt) {",
"\t\tcorruptLog = corrupt;",
"\t}",
"",
"\tpublic void setDataCorruption(boolean corrupt) {",
"\t\tcorruptData = corrupt;",
"\t}",
"\t",
"\tpublic void setOffset(int off) {",
"\t\tcorruptOffset = off ;",
"\t}",
"",
"\tpublic void setLength(int len) {",
"\t\tcorruptLength = len;",
"\t}",
"\t\t",
"\tpublic int getOffset() {",
"\t\treturn corruptOffset;",
"\t}",
"",
"\tpublic int getLength(){",
"\t\treturn corruptLength;",
"\t}",
"",
"\tpublic boolean isCorruptibleFile(File file)",
"\t{",
"\t\tString name = file.getName();",
"\t\tString parentName = file.getParent();",
"\t\tif (parentName.endsWith(\"log\") && name.endsWith(\"dat\")) {",
"\t\t\treturn corruptLog;",
"\t\t}",
"\t\telse if (parentName.endsWith(\"seg0\")) {",
"\t\t\treturn corruptData;",
"\t\t}",
"",
"\t\treturn false;",
"\t}",
"",
" /**",
"\t * corrupt the byte array at the specified bytes, currenly this",
"\t * metods just complemetns the bits at the specified offsets.",
" */",
" public byte[] corrupt(byte b[], int off, int len)",
"\t{",
"\t\tif (corruptOffset >= off && (corruptOffset + corruptLength) < (off + len))",
"\t\t{",
"\t\t\tfor(int i = corruptOffset ; i < corruptOffset + corruptLength ; i++)",
"\t\t\t{",
"\t\t\t\t//System.out.println(b[i]);",
"\t\t\t\tb[i] = (byte)~b[i];",
"\t\t\t\t//System.out.println(b[i]);",
"\t\t\t}",
"\t\t\t// System.out.println(\"Corrupted the write request : Off = \" + off + \" Length = \" + len);",
"\t\t}else{",
"\t\t\tSystem.out.println(\"Not valid corrupt request :\" + ",
"\t\t\t\t\t\t\t \"Write Request\" + \"Off=\" + off + \"size = \" + len + ",
"\t\t\t\t\t\t\t \"Corrupt Request\" + \"Off=\" + corruptOffset + ",
"\t\t\t\t\t\t\t \"size = \" + corruptLength);",
"\t\t}",
"\t\treturn b;",
"\t}",
"",
"}"
],
"header": "@@ -0,0 +1,124 @@",
"removed": []
}
]
}
] |
derby-DERBY-96-c2afcc17
|
committing upgrade change related to DERBY-96 for suresh.thalamati.suresh.thalamati@gmail.com
Attached is the new patch with the suggested changes to make
softupgrade correctly with the transaction log
checksum feature in 10.1 Added checkVersion() method to log factory it
self, becuase that is where
the version numbers are read from from the log control file , but did
not export the call it to the
rawstore factory as it is not needed now. (This can be done easlily
when there is a need for upgrade
checks in the other store modules..)
git-svn-id: https://svn.apache.org/repos/asf/incubator/derby/code/trunk@164994 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/store/raw/log/LogAccessFile.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.store.raw.RawStoreFactory;"
],
"header": "@@ -35,6 +35,7 @@ import java.util.LinkedList;",
"removed": []
},
{
"added": [
"\tprivate boolean writeChecksum; "
],
"header": "@@ -116,7 +117,7 @@ public class LogAccessFile",
"removed": [
"\tprivate boolean writeChecksum = true; //gets set to false incase of a soft upgrade."
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java",
"hunks": [
{
"added": [
"\t/**",
"\t Check to see if a database has been upgraded to the required",
"\t level in order to use a store feature.",
"\t @param requiredMajorVersion required database Engine major version",
"\t @param requiredMinorVersion required database Engine minor version",
"\t @return True if the database has been upgraded to the required level, false otherwise.",
"\t**/",
"\tboolean checkVersion(int requiredMajorVersion, int requiredMinorVersion) ",
"\t{",
"\t\tif(onDiskMajorVersion > requiredMajorVersion )",
"\t\t{",
"\t\t\treturn true;",
"\t\t}",
"\t\telse",
"\t\t{",
"\t\t\tif(onDiskMajorVersion == requiredMajorVersion && ",
"\t\t\t onDiskMinorVersion >= requiredMinorVersion)",
"\t\t\t\treturn true;",
"\t\t}",
"\t\t",
"\t\treturn false;",
"\t}",
""
],
"header": "@@ -3885,6 +3885,29 @@ public class LogToFile implements LogFactory, ModuleControl, ModuleSupportable,",
"removed": []
}
]
}
] |
derby-DERBY-961-c4229c97
|
DERBY-961: Error 22001 can include 'XX-RESOLVE-XX' which should be removed
In some cases, error 22001 can come up as follows:
A truncation error was encountered trying to shrink
CHAR () FOR BIT DATA 'XX-RESOLVE-XX' to length 40.
This message makes it appear as if there is a column called XX-RESOLVE-XX,
however, this string is hard-coded in SQLBinary.java, and should be removed.
The intent of the XX-RESOLVE-XX message parameter is to hold the actual
value which could not be shrunk to fit in the column. For a SQLBinary
data type, the actual value may not be human-readable, and so cannot
be displayed.
This patch changes the XX-RESOLVE-XX parameter to the message to
"(Binary data value not displayed)", which should give a better hint to
the person who received this error message about what was going on.
The patch also adds a new test case to BlobMemTest to force the code to
emit the 22001 message from SQLBinary, to ensure that this code path
is run in our tests.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@678769 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-962-88ccad72
|
DERBY-962 Upgrade default security mechanism in client to use encrypted userid password if client can support it.
Contributed by Sunitha Kambhampati
1. If securityMechanism is explicitly specified in the connection request then client will not override it.
2. Dynamically figure out if the jvm in which the client is loaded, supports encrypted userid and
password security (EUSRIDPWD) or not and use this information to upgrade to a more secure default
security mechanism.
3. Thus if user has not specified the security mechanism, in that case the client will try to see if
it can upgrade the security mechanism and use the new upgraded security mechanism for connection to the server.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@386501 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/net/NetConnection.java",
"hunks": [
{
"added": [
" securityMechanism_ = dataSource.getSecurityMechanism(password);"
],
"header": "@@ -234,7 +234,7 @@ public class NetConnection extends org.apache.derby.client.am.Connection {",
"removed": [
" securityMechanism_ = dataSource.getSecurityMechanism();"
]
},
{
"added": [
" securityMechanism_ = ds.getSecurityMechanism(password);"
],
"header": "@@ -267,7 +267,7 @@ public class NetConnection extends org.apache.derby.client.am.Connection {",
"removed": [
" securityMechanism_ = ds.getSecurityMechanism();"
]
}
]
},
{
"file": "java/client/org/apache/derby/jdbc/ClientBaseDataSource.java",
"hunks": [
{
"added": [
"",
" // Spec requires DH algorithm with 32bytes prime to be used ",
" // Not all JCE implementations have support for this. E.g.",
" // Sun JCE does not support DH(prime of 32bytes).",
" // store information if client JVM has JCE loaded that ",
" // can support the necessary algorithms required for EUSRIDPWD",
" // (encrypted userid and password) security mechanism",
" // this information is needed to decide if security mechanism ",
" // can be upgraded to EUSRIDPWD or not",
" // @see getUpgradedSecurityMechanism()",
" static boolean SUPPORTS_EUSRIDPWD = false;",
" ",
" static",
" {",
" try",
" {",
" // The EncryptionManager class will instantiate objects of the required ",
" // security algorithms that are needed for EUSRIDPWD",
" // An exception will be thrown if support is not available",
" // in the JCE implementation in the JVM in which the client",
" // is loaded.",
" new org.apache.derby.client.am.EncryptionManager(null);",
" SUPPORTS_EUSRIDPWD = true;",
" }catch(Exception e)",
" {",
" // if an exception is thrown, ignore exception.",
" // set SUPPORTS_EUSRIDPWD to false indicating that the client ",
" // does not support EUSRIDPWD security mechanism",
" SUPPORTS_EUSRIDPWD = false;",
" }",
" }"
],
"header": "@@ -47,6 +47,37 @@ import org.apache.derby.client.ClientDataSourceFactory;",
"removed": []
},
{
"added": [
" ",
" // constant to indicate that the security mechanism has not been ",
" // explicitly set, either on connection request when using DriverManager ",
" // or on the Client DataSource object",
" private final static short SECMEC_HAS_NOT_EXPLICITLY_SET = 0;",
" ",
" // Security Mechanism can be specified explicitly either when obtaining a ",
" // connection via a DriverManager or via Datasource. ",
" // Via DriverManager, securityMechanism can be set on the connection request using ",
" // the 'securityMechanism' attribute. ",
" // Via DataSource, securityMechanism can be set by calling setSecurityMechanism()",
" // on the ClientDataSource",
" // If the security mechanism is not explicitly set as mentioned above, in that case",
" // the Client will try to upgrade the security mechanism to a more secure one, if possible.",
" // @see #getUpgradedSecurityMechanism",
" // Therefore, need to keep track if the seurityMechanism has been explicitly set ",
" protected short securityMechanism = SECMEC_HAS_NOT_EXPLICITLY_SET;"
],
"header": "@@ -184,7 +215,23 @@ public abstract class ClientBaseDataSource implements Serializable, Referenceabl",
"removed": [
" protected short securityMechanism = propertyDefault_securityMechanism;"
]
},
{
"added": [
" ",
" /**",
" * Return security mechanism if it is set, else upgrade the security mechanism",
" * if possible and return the upgraded security mechanism",
" * @param properties Look in the properties if securityMechanism is set or not",
" * if set, return this security mechanism",
" * @return security mechanism ",
" */",
" short secmec;",
" if ( securityMechanismString != null )",
" {",
" // security mechanism has been set, do not override, but instead return",
" // the security mechanism that has been set (DERBY-962)",
" secmec = Short.parseShort(securityMechanismString);",
" }",
" else",
" {",
" // if securityMechanismString is null, this means that ",
" // security mechanism has not been set explicitly and not available in ",
" // properties. Hence, do an upgrade of security mechanism if possible",
" // The logic for upgrade of security mechanism uses information about ",
" // if password is available or not, so pass this information also.",
" String passwordString = properties.getProperty(propertyKey_password);",
" secmec = getUpgradedSecurityMechanism(passwordString);",
" }",
" return secmec;",
" * This method has logic to upgrade security mechanism to a better (more secure) one ",
" * if it is possible. Currently derby server only has support for USRIDPWD,USRIDONL,",
" * EUSRIDPWD and this method only considers these possibilities. ",
" * USRIDPWD, EUSRIDPWD require a password, USRIDONL is the only security mechanism",
" * which does not require password.",
" * 1. if password is not available, then security mechanism possible is USRIDONL",
" * 2. if password is available, if client supports EUSRIDPWD, then EUSRIDPWD is ",
" * returned",
" * 3. if password is available, if client does not support EUSRIDPWD, then USRIDPWD",
" * is returned.",
" * @param password password argument ",
" * @return upgraded security mechanism if possible",
" public static short getUpgradedSecurityMechanism(String password) {",
" // if password is null, in that case the only acceptable security ",
" // mechanism is USRIDONL, which is the default security mechanism. ",
" if ( password == null )",
" return propertyDefault_securityMechanism;",
"",
" // if password is available, then a security mechanism is picked in following",
" // order if support is available",
" // 1. EUSRIDPWD",
" // 2. USRIDPWD",
" // when we have support for more security mechanisms on server ",
" // and client, we should update this upgrade logic to pick ",
" // secure security mechanisms before trying out the USRIDPWD",
" ",
" if (SUPPORTS_EUSRIDPWD)",
" return (short)NetConfiguration.SECMEC_EUSRIDPWD;",
" else ",
" return (short)NetConfiguration.SECMEC_USRIDPWD;"
],
"header": "@@ -193,26 +240,69 @@ public abstract class ClientBaseDataSource implements Serializable, Referenceabl",
"removed": [
" String passwordString = properties.getProperty(propertyKey_password);",
" short setSecurityMechanism = parseShort(securityMechanismString, propertyDefault_securityMechanism);",
" return getUpgradedSecurityMechanism(setSecurityMechanism, passwordString);",
"",
" * Upgrade the security mechansim to USRIDPWD if it is set to USRIDONL but we have a password.",
" public static short getUpgradedSecurityMechanism(short securityMechanism, String password) {",
" // if securityMechanism is USER_ONLY (the default) we may need",
" // to change it to CLEAR_TEXT_PASSWORD in order to send the password.",
" if ((password != null) && (securityMechanism == NetConfiguration.SECMEC_USRIDONL)) {",
" return (short) NetConfiguration.SECMEC_USRIDPWD;",
" } else {",
" return securityMechanism;",
" }"
]
}
]
}
] |
derby-DERBY-965-98f5fd95
|
DERBY-965: DatabaseMetadata method supportsResultSetConcurrency
returns wrong result on network client
The DatabaseMetaData method supportsResultSetConcurrency erroneously
returns false on the network client for all arguments combination. The
embedded client returns correct results.
Patch contributed by Dag H. Wanvik <Dag.Wanvik@Sun.COM>.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@382319 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/DatabaseMetaData.java",
"hunks": [
{
"added": [
" // The stored procured will return a String containing a list",
" // of lists: For each result set type in the outer list, an",
" // inner list gives the allowed concurrencies for that type:",
"\t// The encoding syntax is reproduced here from the server file",
"\t// 'metadata_net.properties (please keep in synch!): ",
"\t//",
" // String syntax: ",
"\t// <type> { \",\" <concurrency>}* { \";\" <type> { \",\" <concurrency>}* }}*",
"\t//",
"\t// <type> ::= <the integer value for that type from interface java.sql.Resultset",
"\t// i.e. TYPE_FORWARD_ONLY is 1003>",
"\t// <concurrency> ::= <the integer value for that concurrency",
"\t// from interface java.sql.Resultset, i.e.",
"\t// CONCUR_UPDATABLE is 1008>"
],
"header": "@@ -2204,13 +2204,20 @@ public abstract class DatabaseMetaData implements java.sql.DatabaseMetaData {",
"removed": [
" // The stored procured will return a String containg a list of concurrency and list of resultSet types which support",
" // a perticular concurrency",
" // For eg. if the database supports concurrency CONCUR_READ_ONLY(1007) in ResultSet type TYPE_FORWARD_ONLY(1003),",
" // TYPE_SCROLL_INSENSITIVE(1004), TYPE_SCROLL_SENSITIVE(1005) and",
" // supports concurrency CONCUR_UPDATBLE(1008) in resultSet TYPE_SCROLL_SENSITIVE(1005)",
" // then stored procedure will return a string \"1007,1003,1004,1005;1008,1005\"",
" // see how concurrency and supported result set types are seperated by \";\""
]
}
]
}
] |
derby-DERBY-966-4a36dabe
|
DERBY-435 jdbapi/checkDataSource30.java test should be changed or extended to test client DataSources
patch 2 - checkDataSource30 holdability testing for client
- Enables the checkDataSource30 test for holdability tests that are currently passing.
There appear to be several holdability bugs associated with network XA in additon to DERBY-966.
- Makes some progress toward getting checkDataSource.java to run with client, but it is not enabled yet.
- Changed to only run connection toString tests for embedded.
- Changed to only test SimpleDataSource for embedded
- Changed to perform an explicit rollback of active transactions for client before performing a PooledConnection.getConnection()
I think this is an issue with embedded that it allows a PooledConnection.getConnection() with an active transaction, instead of throwing an error if the transaction is active.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@378532 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-966-fdfc981e
|
DERBY-966 DERBY-1005 1) Change DRDAStatement to use the EngineConnection.prepareStatement() method that has a holdability parameter. This ensures prepares on a connection that was obtained from a XADataSource (or a ConnectionPoolDataSource) do not lose the holdability requested by the application.
2) Change the client's state of holdability to match the embedded in that a Connection's holdability is set to close cursors on commit when it has an active global XA transaction.
Patch addresses this issue completely.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@380278 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/Connection.java",
"hunks": [
{
"added": [
"import org.apache.derby.shared.common.reference.JDBC30Translation;"
],
"header": "@@ -21,6 +21,7 @@",
"removed": []
},
{
"added": [
" /**",
" * Holdabilty for created statements.",
" * Only access through the holdability method",
" * to ensure the correct value is returned for an",
" * XA connection.",
" */",
" private int holdability = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;",
" "
],
"header": "@@ -53,7 +54,14 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" public int resultSetHoldability_;"
]
},
{
"added": [
" private int xaState_ = XA_T0_NOT_ASSOCIATED;"
],
"header": "@@ -108,7 +116,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" protected int xaState_ = XA_T0_NOT_ASSOCIATED;"
]
},
{
"added": [
" ",
" holdability = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;"
],
"header": "@@ -236,6 +244,8 @@ public abstract class Connection implements java.sql.Connection,",
"removed": []
},
{
"added": [
" Statement s = createStatementX(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, holdability());"
],
"header": "@@ -341,7 +351,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" Statement s = createStatementX(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, resultSetHoldability_);"
]
},
{
"added": [
" holdability(),"
],
"header": "@@ -362,7 +372,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_,"
]
},
{
"added": [
" CallableStatement cs = prepareCallX(sql, java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, holdability());"
],
"header": "@@ -400,7 +410,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" CallableStatement cs = prepareCallX(sql, java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, resultSetHoldability_);"
]
},
{
"added": [
" PreparedStatement ps = newPreparedStatement_(sql, java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, holdability(), java.sql.Statement.NO_GENERATED_KEYS, null);"
],
"header": "@@ -413,7 +423,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" PreparedStatement ps = newPreparedStatement_(sql, java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, resultSetHoldability_, java.sql.Statement.NO_GENERATED_KEYS, null);"
]
},
{
"added": [
" holdability());"
],
"header": "@@ -908,7 +918,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_);"
]
},
{
"added": [
" Statement s = createStatementX(resultSetType, resultSetConcurrency, holdability());"
],
"header": "@@ -1052,7 +1062,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" Statement s = createStatementX(resultSetType, resultSetConcurrency, resultSetHoldability_);"
]
},
{
"added": [
" holdability(),"
],
"header": "@@ -1075,7 +1085,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_,"
]
},
{
"added": [
" CallableStatement cs = prepareCallX(sql, resultSetType, resultSetConcurrency, holdability());"
],
"header": "@@ -1097,7 +1107,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" CallableStatement cs = prepareCallX(sql, resultSetType, resultSetConcurrency, resultSetHoldability_);"
]
},
{
"added": [
" CallableStatement cs = prepareCallX(sql, java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, holdability());"
],
"header": "@@ -1112,7 +1122,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" CallableStatement cs = prepareCallX(sql, java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY, resultSetHoldability_);"
]
},
{
"added": [
" this.holdability = holdability;",
" ",
" }"
],
"header": "@@ -1182,8 +1192,9 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_ = holdability;",
" }"
]
},
{
"added": [
" agent_.logWriter_.traceExit(this, \"getHoldability\", holdability());",
" return holdability();"
],
"header": "@@ -1195,9 +1206,9 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" agent_.logWriter_.traceExit(this, \"getHoldability\", resultSetHoldability_);",
" return resultSetHoldability_;"
]
},
{
"added": [
" holdability());"
],
"header": "@@ -1263,7 +1274,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_);"
]
},
{
"added": [
" holdability());"
],
"header": "@@ -1320,7 +1331,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_);"
]
},
{
"added": [
" holdability());"
],
"header": "@@ -1378,7 +1389,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_);"
]
},
{
"added": [
" holdability(),"
],
"header": "@@ -1551,7 +1562,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_,"
]
},
{
"added": [
" holdability(),"
],
"header": "@@ -1589,7 +1600,7 @@ public abstract class Connection implements java.sql.Connection,",
"removed": [
" resultSetHoldability_,"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/DatabaseMetaData.java",
"hunks": [
{
"added": [
" if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
],
"header": "@@ -1282,7 +1282,7 @@ public abstract class DatabaseMetaData implements java.sql.DatabaseMetaData {",
"removed": [
" if (connection_.resultSetHoldability_ == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
]
},
{
"added": [
" if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
],
"header": "@@ -1629,7 +1629,7 @@ public abstract class DatabaseMetaData implements java.sql.DatabaseMetaData {",
"removed": [
" if (connection_.resultSetHoldability_ == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
]
},
{
"added": [
" if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
],
"header": "@@ -1682,7 +1682,7 @@ public abstract class DatabaseMetaData implements java.sql.DatabaseMetaData {",
"removed": [
" if (connection_.resultSetHoldability_ == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
]
},
{
"added": [
" if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
],
"header": "@@ -1911,7 +1911,7 @@ public abstract class DatabaseMetaData implements java.sql.DatabaseMetaData {",
"removed": [
" if (connection_.resultSetHoldability_ == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/Statement.java",
"hunks": [
{
"added": [
" return (connection_.getXAState() == Connection.XA_T0_NOT_ASSOCIATED) ;"
],
"header": "@@ -1447,7 +1447,7 @@ public class Statement implements java.sql.Statement, StatementCallbackInterface",
"removed": [
" return (connection_.xaState_ == Connection.XA_T0_NOT_ASSOCIATED) ;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetConnection.java",
"hunks": [
{
"added": [
""
],
"header": "@@ -270,9 +270,7 @@ public class NetConnection extends org.apache.derby.client.am.Connection {",
"removed": [
" if (resultSetHoldability_ == 0) {",
" ((org.apache.derby.client.net.NetDatabaseMetaData) databaseMetaData_).setDefaultResultSetHoldability();",
" }"
]
},
{
"added": [],
"header": "@@ -322,10 +320,6 @@ public class NetConnection extends org.apache.derby.client.am.Connection {",
"removed": [
"",
" if (resultSetHoldability_ == 0) {",
" ((org.apache.derby.client.net.NetDatabaseMetaData) databaseMetaData_).setDefaultResultSetHoldability();",
" }"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetDatabaseMetaData.java",
"hunks": [
{
"added": [],
"header": "@@ -79,10 +79,6 @@ public class NetDatabaseMetaData extends org.apache.derby.client.am.DatabaseMeta",
"removed": [
" if (connection_.resultSetHoldability_ == 0) // property not set",
" {",
" setDefaultResultSetHoldability();",
" }"
]
}
]
},
{
"file": "java/drda/org/apache/derby/impl/drda/DRDAStatement.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.jdbc.EngineConnection;"
],
"header": "@@ -37,6 +37,7 @@ import java.util.Vector;",
"removed": []
},
{
"added": [
"\tint withHoldCursor = -1;\t // hold cursor after commit attribute."
],
"header": "@@ -65,7 +66,7 @@ class DRDAStatement",
"removed": [
"\tprotected int withHoldCursor = -1;\t // hold cursor after commit attribute."
]
},
{
"added": [
"\t\tps = prepareStatementJDBC3(sqlStmt, scrollType, concurType, "
],
"header": "@@ -510,11 +511,7 @@ class DRDAStatement",
"removed": [
"\t\tConnection conn = database.getConnection();",
"\t\tif (conn instanceof BrokeredConnection)",
"\t\t\tps = conn.prepareStatement(sqlStmt, scrollType, concurType);",
"\t\telse",
"\t\t\tps = prepareStatementJDBC3(sqlStmt, scrollType, concurType, "
]
},
{
"added": [
" ",
"\t\t{ ",
"\t\t{ "
],
"header": "@@ -1459,17 +1456,18 @@ class DRDAStatement",
"removed": [
"\t\t{",
"\t\t{"
]
},
{
"added": [
"\t * prepare a statement using EngineConnection.prepareStatement",
" * so that server can run on jdk131 and still pass holdability. "
],
"header": "@@ -1477,10 +1475,8 @@ class DRDAStatement",
"removed": [
"\t * prepare a statement using reflection so that server can run on jdk131",
"\t * and still pass holdability. ",
"\t * parameters are passed on to either the EmbedConnection or ",
"\t * BrokeredConnection prepareStatement() method."
]
},
{
"added": [
" EngineConnection conn = database.getConnection();",
" if (withHoldCursor == -1) {",
" // Holdability not explictly set, let the",
" // connection provide the default.",
" return conn.prepareStatement(sqlStmt,",
" scrollType, concurType);",
" }",
" ",
" // Holdability explictly set. ",
" return conn.prepareStatement(sqlStmt,",
" scrollType, concurType, withHoldCursor);"
],
"header": "@@ -1494,26 +1490,17 @@ class DRDAStatement",
"removed": [
"\t\tPreparedStatement lps = null;",
"",
"\t\t// If holdability is still uninitialized, default is HOLD_CURSORS_OVER_COMMIT",
"\t\tint resultSetHoldability = (withHoldCursor == -1) ? ",
"\t\t\tresultSetHoldability = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT :",
"\t\t\twithHoldCursor;",
"",
"\t\t//prepareStatement takes 4 parameters",
"\t\tClass[] PREP_STMT_PARAM = { String.class, Integer.TYPE, Integer.TYPE, Integer.TYPE };",
"\t\tObject[] PREP_STMT_ARG = { sqlStmt, new Integer(scrollType),",
"\t\t\t\t\t\t\t\t new Integer(concurType), new Integer(resultSetHoldability)};",
"\t\ttry {",
"\t\t\t//create a prepared statement with hold cursor over commit using reflection.",
"\t\t\tMethod sh = database.getConnection().getClass().getMethod(\"prepareStatement\", PREP_STMT_PARAM);",
"\t\t\tlps = (PreparedStatement) (sh.invoke(database.getConnection(), PREP_STMT_ARG));",
"\t\t} catch (Exception e) {",
"\t\t\thandleReflectionException(e);",
"\t\t} ",
"",
"\t\treturn lps;"
]
}
]
}
] |
derby-DERBY-97-19ea3276
|
DERBY-2264 (followup): Disable jdbcapi/DboPowersTest for JSR169 since
Derby does not support database encryption for that platform (per
the specification for JSR169 attached to DERBY-97).
Contributed by: Dag Wanvik (dag.wanvik@sun.com)
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@521401 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-974-efd17a12
|
DERBY-974: ClientDriver can lose some connection properties
Use Properties.propertyNames() instead of Properties.keys().
Contributed by Jørgen Løland.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@587056 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-975-e4b1c442
|
DERBY-975: Catch exception but don't call getMessage on it in 1.3 VMs. Fixes a canon diff in
updatableResultSet.java on ibm131.
Committed for Fernanda Pizzorno <Fernanda.Pizzorno@sun.com>
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@384061 13f79535-47bb-0310-9956-ffa450edef68
|
[] |
derby-DERBY-982-63fbf423
|
DERBY-982: Add genus names for network server and client to sysinfo api. Update
published api javadoc for sysinfo. Add a test of the sysinfo public api.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@422876 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/tools/org/apache/derby/tools/sysinfo.java",
"hunks": [
{
"added": [
"\t\tApache Derby embedded code in derby.jar.",
"\t\tcode in derbytools.jar",
"\t/**",
"\t *\tThe genus name for the network server code. Use this to determine the version of ",
"\t\tcode in derbynet.jar",
"\t */",
"\tpublic static final String NET=\"net\";",
"",
"\t/**",
"\t *\tThe genus name for the client code. Use this to determine the version of ",
"\t\tcode in derbyclient.jar",
"\t */",
"\tpublic static final String CLIENT=\"dnc\";",
""
],
"header": "@@ -57,16 +57,28 @@ public class sysinfo {",
"removed": [
"\t\tApache Derby embedded code in cs.jar.",
"\t\tcode in cstools.jar"
]
},
{
"added": [
"\t\t\tDBMS, TOOLS, NET, CLIENT"
],
"header": "@@ -81,7 +93,7 @@ public class sysinfo {",
"removed": [
"\t\t\tDBMS, TOOLS"
]
},
{
"added": [
"\t\t\tDBMS, TOOLS, NET, CLIENT."
],
"header": "@@ -108,7 +120,7 @@ public class sysinfo {",
"removed": [
"\t\t\tDBMS, TOOLS."
]
},
{
"added": [
"\t\t\tDBMS, TOOLS, NET, CLIENT."
],
"header": "@@ -134,7 +146,7 @@ public class sysinfo {",
"removed": [
"\t\t\tDBMS, TOOLS"
]
}
]
}
] |
derby-DERBY-983-f43b12c3
|
DERBY-983: Remove use of Util.notImplemented(), and instead have
a client-only utility class for shorthand exceptions
Contributed by Anurag Shekhar
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@378538 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/client/org/apache/derby/client/am/CallableStatement40.java",
"hunks": [
{
"added": [],
"header": "@@ -20,7 +20,6 @@",
"removed": [
"import org.apache.derby.impl.jdbc.Util;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/am/PreparedStatement40.java",
"hunks": [
{
"added": [],
"header": "@@ -20,7 +20,6 @@",
"removed": [
"import org.apache.derby.impl.jdbc.Util;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetConnection40.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.am.SQLExceptionFactory;"
],
"header": "@@ -20,8 +20,8 @@",
"removed": [
"import org.apache.derby.impl.jdbc.Util;"
]
},
{
"added": [
" throw SQLExceptionFactory.notImplemented (\"createClob ()\");",
" throw SQLExceptionFactory.notImplemented (\"createBlob ()\");",
" throw SQLExceptionFactory.notImplemented (\"createNClob ()\");",
" throw SQLExceptionFactory.notImplemented (\"createSQLXML ()\");",
" throw SQLExceptionFactory.notImplemented (\"isValid ()\");",
"\tthrow SQLExceptionFactory.notImplemented (\"setClientInfo (String, String)\");",
"\tSQLException temp= SQLExceptionFactory.notImplemented (\"setClientInfo ()\");"
],
"header": "@@ -79,33 +79,33 @@ public class NetConnection40 extends org.apache.derby.client.net.NetConnection",
"removed": [
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
"\tthrow Util.notImplemented();",
"\tSQLException temp= Util.notImplemented();"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetDatabaseMetaData40.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.am.SQLExceptionFactory;"
],
"header": "@@ -23,7 +23,7 @@ package org.apache.derby.client.net;",
"removed": [
"import org.apache.derby.impl.jdbc.Util;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetResultSet40.java",
"hunks": [
{
"added": [
"import org.apache.derby.client.am.SQLExceptionFactory;"
],
"header": "@@ -26,7 +26,7 @@ import java.sql.NClob;",
"removed": [
"import org.apache.derby.impl.jdbc.Util;"
]
},
{
"added": [
" throw SQLExceptionFactory.notImplemented (\"getRowId (int)\");",
" throw SQLExceptionFactory.notImplemented (\"getRowId (String)\");",
" throw SQLExceptionFactory.notImplemented (\"updateRowId (int, RowId)\");",
" throw SQLExceptionFactory.notImplemented (\"updateRowId (String, RowId)\");",
" throw SQLExceptionFactory.notImplemented (\"getHoldability ()\");",
" throw SQLExceptionFactory.notImplemented (\"isClosed ()\");",
" throw SQLExceptionFactory.notImplemented (\"updateNString (int, String)\");",
" throw SQLExceptionFactory.notImplemented (\"updateNString (String, String)\");",
" throw SQLExceptionFactory.notImplemented (\"updateNClob (int, NClob)\");",
" throw SQLExceptionFactory.notImplemented (\"updateNClob (String, NClob)\");",
" throw SQLExceptionFactory.notImplemented (\"getNClob (int)\");",
" throw SQLExceptionFactory.notImplemented (\"getNClob (String)\");",
" throw SQLExceptionFactory.notImplemented (\"getSQLXML (int)\");",
" throw SQLExceptionFactory.notImplemented (\"getSQLXML (String)\");",
" throw SQLExceptionFactory.notImplemented (\"updateSQLXML (int, SQLXML)\");",
" throw SQLExceptionFactory.notImplemented (\"updateSQLXML (String, SQLXML)\");"
],
"header": "@@ -49,68 +49,68 @@ public class NetResultSet40 extends NetResultSet{",
"removed": [
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();",
" throw Util.notImplemented();"
]
}
]
}
] |
derby-DERBY-989-591cc35a
|
DERBY-989: unit/daemonService.unit fails intermittently: 'ran out of time'
Updated the javadoc for DaemonService and BasicDaemon with information about
the case where unsubscribe() is called when the client is being serviced.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@420465 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/iapi/services/daemon/DaemonService.java",
"hunks": [
{
"added": [
" performWork from time to time. The performWork method is defined by the",
"",
" <P>It is up to each <code>DaemonService</code> implementation to define its",
" level of service, including",
" <UL>",
" <LI>how quickly and how often the clients should expect to be be serviced",
" <LI>how the clients are prioritized",
" <LI>whether the clients need to tolerate spurious services",
" </UL>"
],
"header": "@@ -28,10 +28,18 @@ import org.apache.derby.iapi.services.sanity.SanityManager;",
"removed": [
" performWork from time to time. These performWork method is defined by the"
]
}
]
},
{
"file": "java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java",
"hunks": [
{
"added": [
"\tincluding onDemandOnly, must tolerate spurious services. The BasicDaemon"
],
"header": "@@ -43,7 +43,7 @@ import java.util.List;",
"removed": [
"\tincluding onDemandOnly, must tolerate spurrious services. The BasicDaemon"
]
},
{
"added": [
"\t/**",
"\t * Removes a client from the list of subscribed clients. The call does not",
"\t * wait for the daemon to finish the work it is currently performing.",
"\t * Therefore, the client must tolerate that its <code>performWork()</code>",
"\t * method could be invoked even after the call to",
"\t * <code>unsubscribe()</code> has returned (but not more than once).",
"\t *",
"\t * @param clientNumber client identifier",
"\t */"
],
"header": "@@ -161,6 +161,15 @@ public class BasicDaemon implements DaemonService, Runnable",
"removed": []
}
]
}
] |
derby-DERBY-989-668b59a2
|
DERBY-989: unit/daemonService.unit fails intermittently: 'ran out of time'
Two test fixes (in T_DaemonService.java)
1) Clear the list of clients before each iteration of the test. This
makes the failure be exposed earlier (10 minutes instead of one
hour) because t_checkStatus() doesn't have to wait for
unsubscribed clients to be serviced.
2) Make the test accept that a client is serviced once after it has
unsubscribed. This could happen if the client is being serviced
when unsubscribe() is called.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@419479 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/unitTests/services/T_DaemonService.java",
"hunks": [
{
"added": [
"\t\t// we don't want t_checkStatus() to hang because of",
"\t\t// unsubscribed records from a previous, failed iteration",
"\t\t// (DERBY-989)",
"\t\tserviceRecord.clear();",
""
],
"header": "@@ -110,6 +110,11 @@ public class T_DaemonService extends T_MultiThreadedIterations",
"removed": []
},
{
"added": [
"\t\t\t// DERBY-989: The client should not be serviced after it",
"\t\t\t// unsubscribes. However, it might have been in the",
"\t\t\t// process of being serviced when unsubscribe() was",
"\t\t\t// called. Therefore, performWork() can run even after the",
"\t\t\t// save variable was initialized, but only once.",
"\t\t\tint diff = s1.timesServiced - save;",
"\t\t\t// Check that the client has not been serviced more than",
"\t\t\t// once after it unsubscribed.",
"\t\t\tT_Fail.T_ASSERT((diff == 0 || diff == 1),",
"\t\t\t\t\t\t\t\"unsubscribed continue to get serviced\");"
],
"header": "@@ -243,8 +248,16 @@ public class T_DaemonService extends T_MultiThreadedIterations",
"removed": [
"\t\t\tif (save != s1.timesServiced)",
"\t\t\t\tthrow T_Fail.testFailMsg(\"unsubscribed continue to get serviced\");"
]
}
]
}
] |
derby-DERBY-992-634980a3
|
DERBY-992: A corner case bug and missing optimization in
ScrollInsensitiveResultSet
a) For a scrollable, insensitive result set (read-only) which is
empty, ResultSet#afterLast should have no effect, but erroneously
sets the internal variable afterLast to true, so that a subsequent
call to ResultSet#isAfterLast will return 'true' in the embedded
client. It does not happen on the client driver, because it seems
to do some double book-keeping for this case.
b) In ScrollInsensitiveResultSet#getNextRowCore and #getAbsoluteRow,
there are missing checks will cause unnecessary read (attempts)
from underlying result set even if end has been seen already.
Patch submitted by Dag H. Wanvik.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@386068 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java",
"hunks": [
{
"added": [
"\t\tif (seenLast && row > lastPosition) {",
"\t\t return setAfterLastRow();",
"\t\t}\t\t",
""
],
"header": "@@ -239,6 +239,10 @@ public class ScrollInsensitiveResultSet extends NoPutResultSetImpl",
"removed": []
},
{
"added": [
"\t\tif (seenLast && currentPosition == lastPosition) {",
"\t\t return setAfterLastRow();",
"\t\t}",
""
],
"header": "@@ -423,6 +427,10 @@ public class ScrollInsensitiveResultSet extends NoPutResultSetImpl",
"removed": []
}
]
}
] |
derby-DERBY-993-37952cfd
|
DERBY-993: Enable running junitTests in J2ME environments.
Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com> and
Andreas Korneliussen <Andreas.Korneliussen@sun.com>
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@387605 13f79535-47bb-0310-9956-ffa450edef68
|
[
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java",
"hunks": [
{
"added": [
" url += \":\" + \"user=APP;password=APP;retrieveMessagesFromServerOnGetMessage=true;\";"
],
"header": "@@ -790,7 +790,7 @@ public class TestUtil {",
"removed": [
" url += \":\" + \"user=me;password=mine;retrieveMessagesFromServerOnGetMessage=true;\";"
]
}
]
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.