id
stringlengths
22
25
commit_message
stringlengths
137
6.96k
diffs
listlengths
0
63
derby-DERBY-1149-e4ba4e13
DERBY-1149 : Fix failures in StatementTest.java. I also added a new constants file for testing that contains all the standard SQL State strings. Derby-specific SQL States can be added as needed. Passes derbyall, except for the sysinfo tests, which is a known regression when running against the classes directory. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@390176 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/util/SQLStateConstants.java", "hunks": [ { "added": [ "/*", " Derby - Class org.apache.derbyTesting.functionTests.util.SQLState", "", " Copyright 2006 The Apache Software Foundation or i...
derby-DERBY-1156-8a62d60d
DERBY-1156 (partial): re-encryting an encrypted database This patch adds some code required to support reconfigure(rencryption) of an already existing encrypted database with a new password(secret key) or an external user specified encryption key. Two new attributes "newBootPassword" and "newEncryptionkey" are introduced to support this functionality. - modified the code to support two have instance of two cipher factories to exist. So that the existing data can decrypted with the old encryption key using one cipher factory and rewrite the data with new encryption keys using another cipher factory. - re-enryption of the database with new keys is similar to encrypting an already existing database. All the container data is read through the page cache and rewritten using the new encryption keys. - Added test case to test the re-encryption of an encrypted database. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@416536 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/reference/Attribute.java", "hunks": [ { "added": [ " /**", "\t The attribute that is used to chage the secret key of an encrypted", " database. The secret key must be at least 8 characters long.", ...
derby-DERBY-1156-ae71c745
DERBY-1156: Committing this for Suresh, reviewed by Mike Matrigali. Here is Mike's review comments: I have reviewed this patch and run a full set of tests on windows XP / sun jdk1.4.2 which passed. I think this patch should be committed as is. It is a good incremental checkin for this feature. It provides a set of tools for the rest of the project, and gets the code to the point that it can encrypt an existing unencrypted db. Future checkins should address a couple of things: 1) obviously more testing. Some quick notes, the current tests may want to show that accessing the newly encrypted db with a bad password does not work - just to insure all the url;s are not just being totally ignored. Also want to test abort - probably need a testing codepoint to cause the failure at the right time. 2) fix up the comments, there are some typo's . 3) usual nit - some greater than 80 char lines. I would have committed this change now, but svn still is not back. Patch submitted by Suresh Thalamati (suresh.thalamati@gmail.com) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@407366 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java", "hunks": [ { "added": [ " \t\t/* org.apache.derby.impl.store.raw.data.EncryptContainerOperation */", " public static final int LOGOP_ENCRYPT_CONTAINER =", " (MI...
derby-DERBY-1157-28162f65
DERBY-1157: Helper methods in BaseJDBCTestCase for creating data sources Adding getDataSource(), getConnectionPoolDataSource() and getXADataSource() to BaseJDBCTestCase. The new methods call various methods in TestUtil for creating the data sources. A minor adjustment had to be made to TestUtil.getDataSource() in order to make it return JDBC 4.0 DataSources. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@389780 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.info.JVMInfo;" ], "header": "@@ -37,6 +37,7 @@ import java.security.PrivilegedActionException;", "removed": [] ...
derby-DERBY-1158-1128268f
DERBY-1158 (partial) Implement downgrading a request to create any holdable statement in a global transaction to return a non-holdable statement. Such a downgrade adds a SQLWarning to the Connection object. This follows section 16.1.3.1 from JDBC 4.0 proposed final draft. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@391383 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java", "hunks": [ { "added": [ "import org.apache.derby.impl.jdbc.EmbedSQLWarning;" ], "header": "@@ -28,6 +28,7 @@ import java.sql.DatabaseMetaData;", "removed": [] }, { ...
derby-DERBY-1158-175a7402
DERBY-1158 (partial) Embedded Statements that are holdable automatically downgrade to close cursors on commit during a global transaction. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392073 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java", "hunks": [ { "added": [], "header": "@@ -55,7 +55,6 @@ public class BrokeredPreparedStatement extends BrokeredStatement", "removed": [ " checkHoldability();" ] } ...
derby-DERBY-1158-23b4f8b6
DERBY-1158 (partial) Some method protection cleanup on EmbedStatement and EmbedPreparedStatement git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@389822 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java", "hunks": [ { "added": [ "\tboolean executeBatchElement(Object batchElement) throws SQLException, StandardException {" ], "header": "@@ -815,7 +815,7 @@ public abstract class EmbedPreparedS...
derby-DERBY-1158-4e3b1b6b
DERBY-1015 (partial) Add an interface for Statement objects from the engine, EngineStatement. Removes some use of reflection in brokered objects and the network server. Is also a step towards solving DERBY-1158, downgrading holdabilty in global transactions. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@391691 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DRDAStatement.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.jdbc.EngineStatement;" ], "header": "@@ -38,6 +38,7 @@ import java.util.Vector;", "removed": [] }, { "added": [ ...
derby-DERBY-1158-4f2355d7
DERBY-1158 DERBY-1159 Remove special casing of network client for holdability tests using executeUpdate methods. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392084 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1158-562671ec
DERBY-1158 (partial) Re-factor some code to enable BrokeredStatement.getResultSetHoldability() to return CLOSE_CURSORS_ON_COMMIT when in a global transaction. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@391842 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java", "hunks": [ { "added": [ " checkHoldability();" ], "header": "@@ -55,7 +55,7 @@ public class BrokeredPreparedStatement extends BrokeredStatement", "removed": [ "...
derby-DERBY-1158-72cc5532
DERBY-1158 (partial) Some cleanup of field & method permissions in the embedded JDBC driver and rename getWarnings to addWarning to correctly reflect its use. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@389630 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java", "hunks": [ { "added": [ "\tprivate ResultSet theResults;" ], "header": "@@ -116,7 +116,7 @@ public abstract class EmbedResultSet extends ConnectionChild", "removed": [ "\tprotect...
derby-DERBY-1158-b01ccf59
DERBY-1196 Network server closes prepared statements prematurely if exception occurs during OPNQRY - Takes out close of prepared statement on exception in OPNQRY in DRDAConnThread processCommands - Updates the JCC master for derbnet/setTransactionIsolation. This test was getting Statement already closed errors for valid statements with JCC that are no longer in the master. - Enables test for DERBY-1047 in checkDataSource ( Note this case actually passes withtout the fix because of the fix for DERBY-1158) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392781 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1158-ce9d2145
DERBY-1158 (partial) Re-factor check holdability methods in the brokered stament and connection control to support downgrading the holdability when needed. This commit still implements at the user level throwing an exception for requesting holdable ResultSets in a global transaction. A subsequent commit will change to creting a warning on the Connection when creating a Statement with holdable ResultSets. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@389825 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java", "hunks": [ { "added": [ "import org.apache.derby.shared.common.reference.SQLState;" ], "header": "@@ -38,6 +38,7 @@ import java.lang.reflect.*;", "removed": [] }, { ...
derby-DERBY-1159-0bf3bf88
DERBY-1159 Add some test cases that show the bug. Execution of a statement that does not return a ResultSet with various JDBC Statement objects using executeUpdate in a global transaction. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@389648 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1159-4f2355d7
DERBY-1158 DERBY-1159 Remove special casing of network client for holdability tests using executeUpdate methods. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392084 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-117-4551a6e8
DERBY-117 Improvements to the Servlet - improved use of tracingDirectory: * init-parameter is now used (it was documented but not used before) * current value is shown when the user try to change it - improved function that handles the request locale (for instance, mozilla uses a - instead of _ to separate the country from language) - shows on the screen which port the server is running on * added a new SRV_POrtNumber message key for such info Note: I did not commit the translated messages as I could not get them to patch. Contributed by Filipe Leme git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@332444 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetServlet.java", "hunks": [ { "added": [], "header": "@@ -23,12 +23,10 @@ package org.apache.derby.drda;", "removed": [ "import java.sql.*;", "import java.security.PrivilegedActionException;" ] }, ...
derby-DERBY-1172-f342d5bc
DERBY-1172 incorrect error message in updateRow() after a commit on a held scroll insensitive resultset. Submitted by Andreas Korneliussen git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@391153 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1174-cbd7b157
DERBY-1174 NullPointerException in network server with LDAP authentication Submitted by Anders Morken git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@395525 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/authentication/JNDIAuthenticationSchemeBase.java", "hunks": [ { "added": [ "\t\t// if any. If dbProps == null, there are obviously no database", "\t\t// properties to retrieve.", " ", "\t\t...
derby-DERBY-1176-ec2bfafe
DERBY-1176: Stored prepared statements in the SYSIBM schema are not updated on upgrade 1. DD_Version.doFullUpgrade() now drops and recreates SPSs in all system schemas, not SYSIBM only. 2. EmbedDatabaseMetaData already has the necessary machinery to load queries from system tables or metadata.properties depending on whether the engine is in soft upgrade mode or not. I extended it so that it could read queries from metadata_net.properties as well. 3. New method EmbedDatabaseMetaData.getClientCachedMetaData() which executes SYSIBM.METADATA (either from system table or metadata_net.properties) to fetch the metadata that will be cached on the client. 4. SystemProcedures.METADATA() now invokes EmbedDatabaseMetaData.getClientCachedMetaData() instead of executing the METADATA SPS directly. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@395799 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.sanity.SanityManager;", "" ], "header": "@@ -24,6 +24,8 @@ import org.apache.derby.iapi.services.info.ProductVersion...
derby-DERBY-1180-a4846de8
DERBY-1180: Committed Kristian's patches providing tests and vacuous implementations for missing signatures: derby-1180-2a-client.diff and derby-1180-3a-testing.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@396669 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/Blob.java", "hunks": [ { "added": [ "import java.io.InputStream;", "", "" ], "header": "@@ -20,8 +20,11 @@", "removed": [] } ] }, { "file": "java/client/org/apache/derby/cl...
derby-DERBY-1180-b64ccfc4
DERBY-1180: Commit Kristian's derby-1180-4c-logicalconnection_and_tests.diff patch, adding vacuous implementations for missing signatures. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@398594 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/LogicalConnection.java", "hunks": [ { "added": [ " protected Connection physicalConnection_ = null; // reset to null when the logical connection is closed." ], "header": "@@ -33,7 +33,7 @@ import java.sql.SQLExcepti...
derby-DERBY-1180-fcf7ef38
DERBY-1180 (partial): Add vacuous implementations of missing JDBC4 methods Stubs for missing JDBC 4.0 methods in the embedded driver. Patch contributed by Kristian Waagan <Kristian.Waagan@Sun.COM>. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@395872 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java", "hunks": [ { "added": [ "import java.sql.BaseQuery;", "import java.sql.Blob;" ], "header": "@@ -20,6 +20,8 @@", "removed": [] }, { "added": [ ...
derby-DERBY-1183-c63d941b
DERBY-435 jdbcapi/checkDataSource.java and jdbapi/checkDataSource30.java to tests should be changed or extended to test client DataSources - Brings checkDataSource and checkDataSourc30 into derbynetclientmats - Reenables tests for DERBY-1044 now that it is fixed. Tests are excluded for some bugs uncovered by this test that have yet to be resolved: DERBY-1035, DERBY-1047, DERBY-1025, DERBY-1148, DERBY-1183 git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@391902 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1183-d51b773e
DERBY-1036: Embedded and client differ with regard to Statement.setCursor Name. client will disallow duplicate cursor names. Embedded will allow it. and DERBY-1183: Client java.sql.ResultSet.getCursorName() does not return the correct cursor name for Statements after the first execution Patch description: The problem underlying DERBY-1183 is the following: A Statement (and by inheritance, PreparedStatement and CallableStatement) will have a cursor name associated with result set generated by the statement. Such names are either set by the user (Statement#setCursorName) or assigned by the system (aka "canned" cursor names in the client driver). In either case, the user can get at the cursor name attached to a statement by calling Resultset#getCursorName. This string can be used to construct the SQL text of positioned update or delete statement. Currently, when a cursor name is set on a statement, the following actions are taken (Statement#setCursorName): 1. The statement's string variable cursorName_ is set to the new string. This keeps track of the user cursor name set for this statement. 2. A cache (clientCursorNameCache) of cursor names set by the user for this connection is maintained to avoid having any two identical cursor name for the same statement/result set. When the cursor name is set, the check is performed (2a) and the cache is updated with the new cursor name if all is well (2b). If the statement (only applies for PreparedStatement and CallableStatement) already has a DRDA section (ch 7.14) allocated, the following is also performed: 3. A map (cursor name -> section) is updated. 4. The section associated with this statement gets its variable clientCursorName set to the supplied cursor name. For Statement, this association (steps 3 and 4) is performed at statement execution time (inside flowExecute, just after the new section is allocated for a query). 5. Also in flowExecute (of Statement, PreparedStatement) the cursor (user set or canned) is associated with the result set (call to mapCursorNameToResultSet). The symptom of this bug is that the cursor name set for a statement seems to be lost after one execution of that statement, reverting to a canned cursor name for executions 2..n. This happens because the cursor name is actually reset as part of the next execute on a statement object: 6. Open result sets for a statement are closed when flowExecute calls readCloseResultSets. During the closing of a result set, ResultSet#markClosed calls statement_.removeClientCursorNameFromCache, which in addition to removing the user cursor name from the cache also sets the statements cursorName_ to null, causing it effectively to be forgotten. Since #5 happens *after* #6 in flowExecute, the execution still works, but with a canned cursor instead of the user named cursor (see mapCursorNameToResultSet). This "race condition" suggests deferring the setup of mappings and insertion into the name cache till execution time (*after* the closing of open result sets on this statement). When studying this I found there was already a bug filed (DERBY-1036) which advises that we defer the check of duplicates till execution time, so this patch fixes both DERBY-1183 and DERBY-1036. In the patch, Statement#setCursorName now only sets the string variable cursorName_. The patch also removes the resetting of cursorName_ in removeClientCursorNameFromCache, so it won't be forgotten. It is still removed from the cache when the result set is closed (and current maps deleted). Furthermore, it moves #2, #3 and #4 till execution time (flowExecute). Item #2a is performed at the start of flowExecute, so we can avoid starting any protocol action if it turns out that we should not start execution (duplicate name). The actions needed in Statement#flowExecute and PreparedStatement#flowExecute are similar, so I factored these out into the methods Statement# checkForDuplicateCursorName and Statement#setupCursorNameCacheAndMappings. Next, I removed code from getCursorName which redundantly performs #3 (now always handled at execute time). CAVEAT: When working on understanding what goes on here, I found that the Statement finalizer can lead to cursors being released; this is part of the client side clean-up for statements that are not explicitly closed (DERBY-210). This can sometimes lead to time variability in canned cursor names in client driver tests which do not close statements explicitly. If the canned cursor name occurs in the canon file, we can see spurious diff due to this. I think we have seen this in the past. Avoid it by closing statements or by naming the cursors explicitly. Finally, I removed work-around code in jdbcapi/checkDataSource.java for derby-1036 and derby-1183 and updated masters to reflect that the cursor names are no longer forgotten. Patch submitted by Dag H. Wanvik. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@416661 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/PreparedStatement.java", "hunks": [ { "added": [ " // DERBY-1036: Moved check till execute time to comply with embedded", " // behavior. Since we check here and not in setCursorName, several", " ...
derby-DERBY-1184-b94443fd
DERBY-1184: registerOutParameter(int,int,String) should throw exception Patch contributed by Kristian Waagan (Kristian.Waagan@Sun.com) The method 'CallableStatement.registerOutParameter(int,int,String)' does nothing in the client driver. As stated in DERBY-447, the method throws a not-implemented exception in the embedded driver. The method should be changed to do this on the client side as well. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392304 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1187-b8ddf447
DERBY-1187 Defragment pass was not being committed properly, so when rows at front of table were being deleted and freeing pages the defragment pass did not move the rows to the free pages. Longer term the defragment pass should commit more often, see DERBY-1188. Added extra test to OnlineCompressTest.java for this case. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392439 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1188-b8ddf447
DERBY-1187 Defragment pass was not being committed properly, so when rows at front of table were being deleted and freeing pages the defragment pass did not move the rows to the free pages. Longer term the defragment pass should commit more often, see DERBY-1188. Added extra test to OnlineCompressTest.java for this case. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392439 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1191-60d10e68
DERBY-1191 (partial) Some SQLExceptions, for example those generated from BrokeredStatements, do not print to derby.log even when derby.stream.error.logSeverityLevel=0 Here is a patch that takes the approach of adding a public static void logAndThrowSQLException(SQLException se) method and then calling that instead of just throwing the exception. The initial patch only uses the method for EmbedConnection.checkForTransactionInProgress() which is the most important exception to log after the fix for DERBY-3319. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@803948 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/Util.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.error.ErrorStringBuilder;", "import org.apache.derby.iapi.services.property.PropertyUtil;", "import org.apache.derby.iapi.services.stream.HeaderPrin...
derby-DERBY-1196-b01ccf59
DERBY-1196 Network server closes prepared statements prematurely if exception occurs during OPNQRY - Takes out close of prepared statement on exception in OPNQRY in DRDAConnThread processCommands - Updates the JCC master for derbnet/setTransactionIsolation. This test was getting Statement already closed errors for valid statements with JCC that are no longer in the master. - Enables test for DERBY-1047 in checkDataSource ( Note this case actually passes withtout the fix because of the fix for DERBY-1158) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@392781 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1198-5d2e2bd2
DERBY-843: Internationalize SectionManager to XaException in client/am package. Also cleaned up any remaining hardcoded text in this package. Also fixed DERBY-1198, where jdbc4/StatementTest.java was using SQLState directly. Passes derbynetclientmats on jdk14 and jdbc40 on jdk16, and fixed output files for jdk13 and jdk16 for those tests whose output files were affected in the derbynetclientmats run. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@395484 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyBuild/splitmessages.java", "hunks": [ { "added": [], "header": "@@ -67,7 +67,6 @@ public class splitmessages {", "removed": [ " clientMessageIds.add(\"J104\");" ] }, { "added": [ " ...
derby-DERBY-1205-e540aee4
DERBY-1007: Follow up patch to earlier submitted patch. In a word, the fix for this issue ensures that, in the case of subqueries, the optimizer will correctly propagate the estimated costs for subqueries up to the parent subquery(-ies), thus allowing the parent query to make a better decision about which join order is ultimately the best. As seen in the example scenario included above, the correct estimates are higher--sometimes much higher--than what the optimizer was returning prior to this change: in the example, the optimizer was returning an incorrect cost estimate of 10783 before the patch, and a correct estimate of 1 million after the patch (where "correct" means that it's the value calculated by the optimizer and thus the value that should be returned; I'm not saying anything about the accuracy of the estimate here). One side effect of this is that, for very deeply nested queries and/or queries with a high number of FROM tables/expressions, the higher cost estimates can be multiplied--sometimes many times over--throughout the optimization process, which means that the overall query estimate can climb to a much larger number much more quickly. If the query is big enough, this can actually cause the optimizer to reach an estimated cost of INFINITY. That said, the current optimizer logic for choosing a plan does not expect to see an estimate of infinity for its plans. As a result the optimizer does comparisons of, and arithmetic with, cost estimates and row counts that, when applied to Infinity, give unexpected results. I have filed DERBY-1259 and DERBY-1260 to address the "infinity problem" in more detail, but am attaching here a follow-up patch that takes some basic steps toward making the optimizer more robust in the face of infinite cost estimates, which are now more likely to occur given the DERBY-1007 changes. In particular, the d1007_followup_v1.patch does the following: 1) Fixes a couple of small problems with the handling of estimates for FromBaseTables, to ensure that a FromBaseTable's estimate is correctly propagated to (and handled by) the ProjectRestrictNode that sits above it. This parallels the original DERBY-1007 work but is a much simpler "follow-up" task as it deals only with base tables instead of subqueries, and thus the changes are fairly minor. 2) There are several places in OptimizerImpl where the optimizer will only choose to accept a plan's cost if the cost is less than the current "bestCost". If no best cost has been found yet, bestCost is set to an uninitialized value of Double.MAX_VALUE with the assumption that the first valid plan will have a cost less than Double.MAX_VALUE and thus will be chosen as the best so far. However, since a plan's cost estimate can actually end up being Double.POSITIVE_INFINITY, which is greater than Double.MAX_VALUE, it's possible that the optimizer will reject a valid join order because its cost is infinity, and then end up completing without ever finding a valid plan--which is wrong. What we want is for the optimizer to accept the first valid plan that it finds, regardless of what the cost is. Then if it later finds a better plan, it can use that. So in several places the d1007_followup_v1.patch adds a check to see if bestCost is uninitialized and, if so, we'll always accept the first valid join order we find, regardless of what its cost is--even if it's infinity--because that's better than no plan at all. 3) Modifies the "compare" method in CostEstimateImpl.java to try to account for comparisons between two plans that both have infinite costs. If this happens, we don't have much choice but to guess as to which plan is actually better. So the changes for followup_v1 make that guess based on a comparison of row counts for the two plans. And if the row counts themselves are infinity, then we'll guess based on the single scan row counts. And finally, if those values are both infinity, as well, then we're out of luck and we just say that the two costs are "equal" for lack of better alternative. 4) And finally, due to unexpected behavior that results from arithmetic using infinity (see DERBY-1259), it is currently possible (though rather rare) for the optimizer to decide to do a hash join that has a cost estimate of Infinity. An example of a query for which this could happen can be found in DERBY-1205, query #1. That said, the BackingStoreHashtable that is used for carrying out a hash join currently creates a Java Hashtable instance with a capacity that matches the optimizer's estimated row count. So if the row count is infinity we'll try to create a Hashtable with some impossibly large capacity and, as a result, we'll end up with an OutOfMemory error. So the d1007_followup_v1.patch adds some code to handle this kind of situation in a more graceful manner. I ran derbyall with these changes on Linux Red Hat using ibm142 and saw no new failures. Submitted by Army Brown (qozinx@gmail.com) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@397675 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java", "hunks": [ { "added": [ " /* We want to create the hash table based on the estimated row", " * count if a) we have an estimated row count (i.e. it's greater", ...
derby-DERBY-1214-bb7eb4d3
DERBY-1214: Anurag's derby-1214_2.diff patch. This forwards new JDBC4 calls on Pooled and XA objects to the appropriate worker objects. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@408733 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java", "hunks": [ { "added": [ " throws SQLException { ", " try {", " return getRealConnection().createArray (typeName, elements);", " } catch ...
derby-DERBY-1214-e570c314
DERBY-1214: Commit Anurag's derby-1214_3.diff, changing the name of a test harness property. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@409420 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java", "hunks": [ { "added": [ " static String derbyTestingXaSingle;// Run junit test cases with under " ], "header": "@@ -119,7 +119,7 @@ public class RunList", "removed": [ ...
derby-DERBY-1219-25d6720b
DERBY-1219: jdbcapi/checkDataSource test hangs intermittently with client This patch contributed by Deepa Remesh (dremesh@gmail.com). This patch enables the checkDataSource and checkDataSource30 tests to run with the client framework by removing the code which shuts down the system in the middle of the test. This is the code which causes the intermediate hang. The hanging problem has been logged as a separate issue, DERBY-1326. The shutdown is a valuable part of the test because it verifies that the global transaction state is valid even after the database has been shut down, so once the hang problem has been resolved, this test should be modified again to re-enable the shutdown processing with the client framework. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@406776 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1224-765e2c45
DERBY-1224: Remove unused variables in DatabaseMetaData Removing the following variables from org.apache.derby.client.am.DatabaseMetaData lastGetColumnPrivilegesResultSet_ lastGetColumnsResultSet_ lastGetForeignKeysResultSet_ lastGetPrimaryKeysResultSet_ lastGetProcedureColumnsResultSet_ lastGetProceduresResultSet_ lastGetSpecialColumnsResultSet_ lastGetStatisticsResultSet_ lastGetTablePrivilegesResultSet_ lastGetTablesResultSet_ lastGetUDTsResultSet_ lastGetTypeInfoResultSet_ lastGetAttrResultSet_ lastGetSuperTypesResultSet_ lastGetSuperTablesResultSet_ since they seem to have no purpose. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@394861 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/DatabaseMetaData.java", "hunks": [ { "added": [], "header": "@@ -68,22 +68,6 @@ public abstract class DatabaseMetaData implements java.sql.DatabaseMetaData {", "removed": [ " private ResultSet lastGetColumnPrivilege...
derby-DERBY-1229-f64222cd
DERBY-1229: sysinfo and sysinfo_withProperties tests fail with SecurityException This change modifies the handling of security exceptions in the Sysinfo tool. If a security exception occurs while processing an element in the classpath, sysinfo will now format that security exception's message into the output, and then will continue on to process the other elements in the classpath. This ensures that sysinfo provides more detailed and more complete information about the classpath information in the environment. Also, the sed properties for the sysinfo tests are now updated to mask out the getProtectionDomain security exception, since that is an expected exception in these tests (in fact, there are many expected security exceptions in these tests). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@400366 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/impl/tools/sysinfo/Main.java", "hunks": [ { "added": [ "\t\t\t\t\tZipInfoProperties zip = null;", "\t\t\t\t\ttry {", "\t\t\t\t\t\tzip = checkForInfo(cp[i]);", "\t\t\t\t\t}", "\t\t\t\t\tcatch (SecurityExcep...
derby-DERBY-1231-dd611b80
DERBY-1231 LIKE does not match empty strings when used with a prepared statement. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@482983 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/Like.java", "hunks": [ { "added": [ "\t * clauses. It can if the pattern is non-null and if the length == 0 or" ], "header": "@@ -668,7 +668,7 @@ public class Like {", "removed": [ "\t * clauses. I...
derby-DERBY-1234-050b6163
DERBY-1234 (partial): Verify that we raise SQLException when calling methods on closed java.sql objects Added checkStatus() to the EmbedXXXStatement methods that don't check whether the statement is closed. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@397186 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java", "hunks": [ { "added": [ "\t\tcheckStatus();" ], "header": "@@ -132,6 +132,7 @@ public class EmbedCallableStatement20", "removed": [] }, { "added": [ ...
derby-DERBY-1234-1861dba6
DERBY-1234 (partial) Make the methods in EmbedConnection raise an exception when the connection is closed. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@399604 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "hunks": [ { "added": [ "\t\tcheckIfClosed();" ], "header": "@@ -517,8 +517,7 @@ public class EmbedConnection implements EngineConnection", "removed": [ "\t\tif (isClosed())", ...
derby-DERBY-1234-26583066
DERBY-1234 (partial) Verify that we raise SQLException when calling methods on closed java.sql objects New patch (part5) which makes all the BrokeredXXX classes check whether the object is closed. What the patch does, is: 1) Implement checkIfClosed() and call it where needed. 2) Implement BrokeredStatement.isClosed() which was needed by checkIfClosed(). 3) Remove isWrapperFor() from BrokeredStatement40, BrokeredPreparedStatement40 and BrokeredCallableStatement40 and replace it by one shared method (which does the right thing when the object is closed) in BrokeredStatement With this patch, jdbc4/ClosedObjectTest.junit runs cleanly on embedded. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@400287 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java", "hunks": [ { "added": [ " * Checks if the statement is closed.", " *", " * @return <code>true</code> if the statement is closed,", " * <code>false</code>...
derby-DERBY-1234-320777fd
DERBY-1234: Verify that we raise SQLException when calling methods on closed java.sql objects Final patch for DERBY-1234. The patch makes the methods in the client driver check whether the object is closed. With this patch, jdbcapi/StmtCloseFunTest.java has the same behaviour with the client driver as with the embedded driver so the DerbyNetClient canon could be removed. Also, jdbc4/ClosedObjectTest.junit runs cleanly both on embedded and on the client, and it has been added to the jdbc40 suite. In addition to adding checkForClosedXXX() calls, this patch a) implements Connection.getTypeMap() with the correct generic signature in NetConnection40 and LogicalConnection40 to avoid compiler warnings b) implements isWrapperFor() (with check for closed object) in Statement, so that it could be removed from Statement40, PreparedStatement40 and CallableStatement40 git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@406280 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/CallableStatement.java", "hunks": [ { "added": [ " java.sql.Date result = getDate(parameterIndex);" ], "header": "@@ -653,11 +653,11 @@ public class CallableStatement extends PreparedStatement", "rem...
derby-DERBY-1234-3631eb02
DERBY-1234: Make all methods in EmbedResultSet, EmbedResultSet20 and EmbedResultSet40 invoke checkIfClosed(). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@398837 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java", "hunks": [ { "added": [ " checkIfClosed(\"getString\");" ], "header": "@@ -636,6 +636,7 @@ public abstract class EmbedResultSet extends ConnectionChild", "removed": [] }, ...
derby-DERBY-1235-7eed9148
DERBY-1235: Move isPoolable() and setPoolable() from PreparedStatement to Statement Moved setPoolable() and isPoolable() from PreparedStatement to Statement and implemented the methods in BrokeredStatement. Contributed by Dyre Tjeldvoll. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@398940 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/PreparedStatement.java", "hunks": [ { "added": [], "header": "@@ -53,10 +53,6 @@ public class PreparedStatement extends Statement", "removed": [ " // By default a PreparedStatement is poolable when it is created", ...
derby-DERBY-1236-6b858b2c
DERBY-1236: Commit Dyre's new tests for setSavepoint(), derby-1236.v1.diff. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@396889 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1238-97cf6942
DERBY-1238: Kristian's derby-1238-1a.diff patch, adding createStruct() and createArray(). I also wired Knut Anders' VerifySignatures test into the jdbc40 suite because now it passes cleanly. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@399063 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/LogicalConnection40.java", "hunks": [ { "added": [ "import java.sql.Array;" ], "header": "@@ -20,6 +20,7 @@", "removed": [] }, { "added": [ "import java.sql.Struct;" ], ...
derby-DERBY-1240-bdf6536c
DERBY-1240 ( creating /restoring a db from backup using createFrom with log at different location copies the log from backup to the db dir also). Problem was restore code in the RawStore was copying all the files that does not exist in the database directory after the restore was completed by the data factory and log factory boot methods. Because the log is placed at different location when an external log location is specified, the log directory does not exist in the database directory. In this case code in the RawStore was incorrectly copying log files also because the log directory does not exist in the database directory. This patch fixes the problem by restoring only the files that are not restored by the other factories. Currently, they are jar files in the database and backup history file. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@466221 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/RawStore.java", "hunks": [ { "added": [ "\t\t// if this is a restore from backup, restore the jar files." ], "header": "@@ -220,13 +220,10 @@ public final class RawStore implements RawStoreFactory, ModuleControl, ...
derby-DERBY-1247-e2f6e00a
DERBY-1247 - Make DerbyNetAutostart encoding safe git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@397300 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1248-e48d46e7
Improved the comments in some of the routines while debugging a DERBY-1248. Separating the formatting/comment changes from the real fix. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@420892 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/RawStore.java", "hunks": [ { "added": [ "\t * duration of the backup. Stable copy is made of each page using " ], "header": "@@ -677,7 +677,7 @@ public final class RawStore implements RawStoreFactory, ModuleContro...
derby-DERBY-125-1adb9d7f
DERBY-125 Network Server can send DSS greater than 32K to client, which breaks DRDA protocol. Fixes off by one error during segment shifting. Fixes continuation flag handling to not overwrite the length. See changes.html attached to DERBY-125 for more info Contributed by Bryan Pendleton git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@371603 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DDMWriter.java", "hunks": [ { "added": [ "\t\t\t// Notes on the behavior of the Layer B segmenting loop below:", "\t\t\t//", "\t\t\t// We start with the right most chunk. For a 3-segment object we'd", "\t\t...
derby-DERBY-1251-a1c5d5f0
DERBY-1251: cancelRowUpdates() affects rows updated with updateRow() in scrollable updatable resultsets Fix contributed by Andreas Korneliussen. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@406279 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/ResultSet.java", "hunks": [ { "added": [], "header": "@@ -160,8 +160,6 @@ public abstract class ResultSet implements java.sql.ResultSet,", "removed": [ " // This variable helps keep track of whether cancelRowUpdates...
derby-DERBY-1253-32f71fea
DERBY-1253: Dyre's derby-1253.v1.diff patch, which filters out optional methods from the output of the UnsupportedVetter test. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@399072 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1253-3d901b8a
DERBY-1253: Make UnsupportedVetter test smart enough to handle methods which change shape. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@412220 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1253-6da3fc6a
DERBY-1253: Commit bug1253_forwarding.diff. This forwards some miscellaneous JDBC4 calls to competent objects. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@408772 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/jdbc/EmbeddedConnectionPoolDataSource40.java", "hunks": [ { "added": [ "import org.apache.derby.impl.jdbc.Util;", "import org.apache.derby.iapi.reference.SQLState;", "" ], "header": "@@ -26,6 +26,9 @@ import ...
derby-DERBY-1253-7a1db7b6
DERBY-1253: Check in bug1253_wireIn.diff. This wires the UnsupportedVetter test into the jdbc4 suite. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@410694 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1253-88a21095
DERBY-1253: Commit bug1253_verifier4_networkResultSet. This changes the NotSupported exception raised by network ResultSets to be one of the UnimplementedFeature exceptions which are mapped to SQLFeatureNotSupportedException under JDBC4. Also added more excludable methods to the UnsupportedVetter test. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@400172 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/harness/Sed.java", "hunks": [ { "added": [ "", "\t\t\t// Timestamp diagnostic looks a little different under jdk16", "\t\t\tsearchStrings.addElement(\"\\\\[\\\\.fffffffff\\\\]\");\t\t\t" ], ...
derby-DERBY-1253-b0551db0
DERBY-1253: Changes to the unsupported-method-verifier based on my review of the revised, draft JDBC4 Compliance chapter. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@399482 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1255-8846963e
DERBY-1255: Narayanan's ClobBlob_create_v1.diff patch. This adds the first increment of support for Connection.createClob() and createBlob(), new methods added in JDBC4. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@407549 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java", "hunks": [ { "added": [ " /**", " *", " * Constructs an object that implements the <code>Blob</code> interface. The object", " * returned initially contains no d...
derby-DERBY-1258-79525626
DERBY-1258 Change the generated code for a new/old column in a row trigger to access columns by position and not name to avoid the case-insensitive name lookup specified by JDBC. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@397959 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java", "hunks": [ { "added": [ "\t\t**\t\t\t\tgetObject(<colPosition>) AS DECIMAL(6,2))", " **", " ** Column position is used to avoid the wrong column being", " ...
derby-DERBY-1259-e540aee4
DERBY-1007: Follow up patch to earlier submitted patch. In a word, the fix for this issue ensures that, in the case of subqueries, the optimizer will correctly propagate the estimated costs for subqueries up to the parent subquery(-ies), thus allowing the parent query to make a better decision about which join order is ultimately the best. As seen in the example scenario included above, the correct estimates are higher--sometimes much higher--than what the optimizer was returning prior to this change: in the example, the optimizer was returning an incorrect cost estimate of 10783 before the patch, and a correct estimate of 1 million after the patch (where "correct" means that it's the value calculated by the optimizer and thus the value that should be returned; I'm not saying anything about the accuracy of the estimate here). One side effect of this is that, for very deeply nested queries and/or queries with a high number of FROM tables/expressions, the higher cost estimates can be multiplied--sometimes many times over--throughout the optimization process, which means that the overall query estimate can climb to a much larger number much more quickly. If the query is big enough, this can actually cause the optimizer to reach an estimated cost of INFINITY. That said, the current optimizer logic for choosing a plan does not expect to see an estimate of infinity for its plans. As a result the optimizer does comparisons of, and arithmetic with, cost estimates and row counts that, when applied to Infinity, give unexpected results. I have filed DERBY-1259 and DERBY-1260 to address the "infinity problem" in more detail, but am attaching here a follow-up patch that takes some basic steps toward making the optimizer more robust in the face of infinite cost estimates, which are now more likely to occur given the DERBY-1007 changes. In particular, the d1007_followup_v1.patch does the following: 1) Fixes a couple of small problems with the handling of estimates for FromBaseTables, to ensure that a FromBaseTable's estimate is correctly propagated to (and handled by) the ProjectRestrictNode that sits above it. This parallels the original DERBY-1007 work but is a much simpler "follow-up" task as it deals only with base tables instead of subqueries, and thus the changes are fairly minor. 2) There are several places in OptimizerImpl where the optimizer will only choose to accept a plan's cost if the cost is less than the current "bestCost". If no best cost has been found yet, bestCost is set to an uninitialized value of Double.MAX_VALUE with the assumption that the first valid plan will have a cost less than Double.MAX_VALUE and thus will be chosen as the best so far. However, since a plan's cost estimate can actually end up being Double.POSITIVE_INFINITY, which is greater than Double.MAX_VALUE, it's possible that the optimizer will reject a valid join order because its cost is infinity, and then end up completing without ever finding a valid plan--which is wrong. What we want is for the optimizer to accept the first valid plan that it finds, regardless of what the cost is. Then if it later finds a better plan, it can use that. So in several places the d1007_followup_v1.patch adds a check to see if bestCost is uninitialized and, if so, we'll always accept the first valid join order we find, regardless of what its cost is--even if it's infinity--because that's better than no plan at all. 3) Modifies the "compare" method in CostEstimateImpl.java to try to account for comparisons between two plans that both have infinite costs. If this happens, we don't have much choice but to guess as to which plan is actually better. So the changes for followup_v1 make that guess based on a comparison of row counts for the two plans. And if the row counts themselves are infinity, then we'll guess based on the single scan row counts. And finally, if those values are both infinity, as well, then we're out of luck and we just say that the two costs are "equal" for lack of better alternative. 4) And finally, due to unexpected behavior that results from arithmetic using infinity (see DERBY-1259), it is currently possible (though rather rare) for the optimizer to decide to do a hash join that has a cost estimate of Infinity. An example of a query for which this could happen can be found in DERBY-1205, query #1. That said, the BackingStoreHashtable that is used for carrying out a hash join currently creates a Java Hashtable instance with a capacity that matches the optimizer's estimated row count. So if the row count is infinity we'll try to create a Hashtable with some impossibly large capacity and, as a result, we'll end up with an OutOfMemory error. So the d1007_followup_v1.patch adds some code to handle this kind of situation in a more graceful manner. I ran derbyall with these changes on Linux Red Hat using ibm142 and saw no new failures. Submitted by Army Brown (qozinx@gmail.com) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@397675 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java", "hunks": [ { "added": [ " /* We want to create the hash table based on the estimated row", " * count if a) we have an estimated row count (i.e. it's greater", ...
derby-DERBY-1260-e540aee4
DERBY-1007: Follow up patch to earlier submitted patch. In a word, the fix for this issue ensures that, in the case of subqueries, the optimizer will correctly propagate the estimated costs for subqueries up to the parent subquery(-ies), thus allowing the parent query to make a better decision about which join order is ultimately the best. As seen in the example scenario included above, the correct estimates are higher--sometimes much higher--than what the optimizer was returning prior to this change: in the example, the optimizer was returning an incorrect cost estimate of 10783 before the patch, and a correct estimate of 1 million after the patch (where "correct" means that it's the value calculated by the optimizer and thus the value that should be returned; I'm not saying anything about the accuracy of the estimate here). One side effect of this is that, for very deeply nested queries and/or queries with a high number of FROM tables/expressions, the higher cost estimates can be multiplied--sometimes many times over--throughout the optimization process, which means that the overall query estimate can climb to a much larger number much more quickly. If the query is big enough, this can actually cause the optimizer to reach an estimated cost of INFINITY. That said, the current optimizer logic for choosing a plan does not expect to see an estimate of infinity for its plans. As a result the optimizer does comparisons of, and arithmetic with, cost estimates and row counts that, when applied to Infinity, give unexpected results. I have filed DERBY-1259 and DERBY-1260 to address the "infinity problem" in more detail, but am attaching here a follow-up patch that takes some basic steps toward making the optimizer more robust in the face of infinite cost estimates, which are now more likely to occur given the DERBY-1007 changes. In particular, the d1007_followup_v1.patch does the following: 1) Fixes a couple of small problems with the handling of estimates for FromBaseTables, to ensure that a FromBaseTable's estimate is correctly propagated to (and handled by) the ProjectRestrictNode that sits above it. This parallels the original DERBY-1007 work but is a much simpler "follow-up" task as it deals only with base tables instead of subqueries, and thus the changes are fairly minor. 2) There are several places in OptimizerImpl where the optimizer will only choose to accept a plan's cost if the cost is less than the current "bestCost". If no best cost has been found yet, bestCost is set to an uninitialized value of Double.MAX_VALUE with the assumption that the first valid plan will have a cost less than Double.MAX_VALUE and thus will be chosen as the best so far. However, since a plan's cost estimate can actually end up being Double.POSITIVE_INFINITY, which is greater than Double.MAX_VALUE, it's possible that the optimizer will reject a valid join order because its cost is infinity, and then end up completing without ever finding a valid plan--which is wrong. What we want is for the optimizer to accept the first valid plan that it finds, regardless of what the cost is. Then if it later finds a better plan, it can use that. So in several places the d1007_followup_v1.patch adds a check to see if bestCost is uninitialized and, if so, we'll always accept the first valid join order we find, regardless of what its cost is--even if it's infinity--because that's better than no plan at all. 3) Modifies the "compare" method in CostEstimateImpl.java to try to account for comparisons between two plans that both have infinite costs. If this happens, we don't have much choice but to guess as to which plan is actually better. So the changes for followup_v1 make that guess based on a comparison of row counts for the two plans. And if the row counts themselves are infinity, then we'll guess based on the single scan row counts. And finally, if those values are both infinity, as well, then we're out of luck and we just say that the two costs are "equal" for lack of better alternative. 4) And finally, due to unexpected behavior that results from arithmetic using infinity (see DERBY-1259), it is currently possible (though rather rare) for the optimizer to decide to do a hash join that has a cost estimate of Infinity. An example of a query for which this could happen can be found in DERBY-1205, query #1. That said, the BackingStoreHashtable that is used for carrying out a hash join currently creates a Java Hashtable instance with a capacity that matches the optimizer's estimated row count. So if the row count is infinity we'll try to create a Hashtable with some impossibly large capacity and, as a result, we'll end up with an OutOfMemory error. So the d1007_followup_v1.patch adds some code to handle this kind of situation in a more graceful manner. I ran derbyall with these changes on Linux Red Hat using ibm142 and saw no new failures. Submitted by Army Brown (qozinx@gmail.com) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@397675 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java", "hunks": [ { "added": [ " /* We want to create the hash table based on the estimated row", " * count if a) we have an estimated row count (i.e. it's greater", ...
derby-DERBY-1262-baef65af
DERBY-1262: Like-predicates: % does not match tab character Patch contributed by Håvard Mork <havard.mork@gmail.com>. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@411174 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/Like.java", "hunks": [ { "added": [ "\tpublic static String greaterEqualStringFromParameter(String pattern, int maxWidth)", "\t\treturn greaterEqualString(pattern, (String) null, maxWidth);", "\tpublic static Stri...
derby-DERBY-1265-d04e05e1
DERBY-1265: Commit bug1265_01_sortMethods.diff. Sorts the result of Class.getMethods() to remove an indeterminacy in the test. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@398630 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1272-66a8763a
DERBY-1272 (partial) Log sysinfo to derby.log with derby.stream.error.logSeverityLevel=0 Does not include test at this time because of test ordering problem. Contributed by Andrew McIntyre, Ramin Moazeni. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@592590 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java", "hunks": [ { "added": [ " // DERBY-1272: Print sysinfo to log if derby.stream.error.logSeverityLevel=0", " int logSeverityLevel = PropertyUtil.getSystemInt(Propert...
derby-DERBY-1272-7ca0b34c
DERBY-1272 Backout change 592590 which was causing Exception initializer error with classes. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@593654 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java", "hunks": [ { "added": [], "header": "@@ -1936,18 +1936,6 @@ nextModule:", "removed": [ " // DERBY-1272: Print sysinfo to log if derby.stream.error.logSeverityLevel=0", ...
derby-DERBY-1274-177992f5
DERBY-1274: Network Server does not shutdown the databases it has booted when started and shutdown from the command line Fix submitted by Fernanda Pizzorno. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@421856 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java", "hunks": [ { "added": [ "\t// if the server is started from the command line, it should shutdown the", "\t// databases it has booted.", "\tprivate boolean shutdownDatabasesOnShutdown =...
derby-DERBY-1275-1812ea86
Commiting patch DERBY1275EnableClientTracingDiffV5.txt attached to DERBY-1275. This patch adds 2 JVM properties to enable client side tracing. The properties are derby.client.traceLevel and derby.client.traceDirectory More info can be found at http://wiki.apache.org/db-derby/UndocumentedDerbyBehavior git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@504317 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/LogWriter.java", "hunks": [ { "added": [ "import java.security.AccessController;", "" ], "header": "@@ -24,10 +24,12 @@ package org.apache.derby.client.am;", "removed": [] } ] }, { "...
derby-DERBY-1276-7855f496
DERBY-1276 Calling ResultSet.isLast() on a scrollable insensitive resultset, causes the entire ResultSet to be populated. Submitted by Andreas Korneliussen git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@409009 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java", "hunks": [ { "added": [ "\t\t\tif (beforeFirst || afterLast || currentPosition==0 ||", "\t\t\t\tcurrentPosition<positionInSource)", "\t\t\t}\t\t\t", "\t\t\t", ...
derby-DERBY-1277-a03c87fa
DERBY-1277: Call to rs.isLast() may cause rs.getXXX() return values from the last row instead of the current row in scrollable resultsets In scrollable updatable resultset, a call to rs.isLast() may cause rs.getXXX() return values from the last row, instead of for the current row. It is caused by TableScanResultSet and EmbedResultSet sharing DataValueColumn descriptors, and that the call to isLast() will make TableScanResultSet modify the data. Attaching a fix, where ScrollInsensitiveResultSet does not return ExecRow from the source resultset, only from the hashtable. This ensures that navigation in source resultsets do not affect the current row of the scrollinsensitive resultset. Also extended the test testRelative to test with concurrency mode CONCUR_UPDATABLE, and fixed it so that it can run in derbynetclient framework. Patch contributed by Andreas Korneliussen. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@400212 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java", "hunks": [ { "added": [ "\t\t\tif (result != null) {", "\t\t\t\tresult = getRowFromHashTable(row);", "\t\t\t}" ], "header": "@@ -345,6 +345,9 @@ public class...
derby-DERBY-1282-7bac3b36
DERBY-1282: Dyre's derby-1282.v1.diff patch. Fills in new client info methods added by JDBC4. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@407617 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/LogicalConnection40.java", "hunks": [ { "added": [ " /**", " * <code>getClientInfo</code> forwards to", " * <code>physicalConnection_</code>.", " * <code>getClientInfo</code> always returns...
derby-DERBY-129-75ec275f
DERBY-129: CAST should warn about truncation Made subclasses of SQLChar and SQLBinary generate a DataTruncation warning when they are truncated to a shorter value. Pass warnings up to the statement from NoRowsResultSetImpl. Make the network server transfer DataTruncation in a way the client accepts. Update test canons to expect warnings on truncation. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1341046 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DRDAConnThread.java", "hunks": [ { "added": [ "\t\twriteSQLCAGRP(e, 0, 0);" ], "header": "@@ -2374,7 +2374,7 @@ class DRDAConnThread extends Thread {", "removed": [ "\t\twriteSQLCAGRP(e, getSqlCode(getE...
derby-DERBY-1292-63d4142e
DERBY-1292 1) The addition of a copy method to org.apache.derby.client.am.ColumnMetaData. 2) Modifications to org.apache.derby.client.am.PreparedStatement to hold on to a copy of the column meta data for each entry used in batch updates. 3) A test was added to org.apache.derbyTestingfunctionTests.tests.derbynet.prepStmt. Patch contributed by James F. Adams derby@xemaps.com git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@437822 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/PreparedStatement.java", "hunks": [ { "added": [ "import java.util.ArrayList;" ], "header": "@@ -27,6 +27,7 @@ import org.apache.derby.shared.common.reference.SQLState;", "removed": [] }, { ...
derby-DERBY-1295-9148a9ac
DERBY-1295 contributed by Fernanda Pizzorno. Scroll insensitive resultset should not implicitly close due to positioning in autocommit mode git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@412831 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java", "hunks": [ { "added": [ "\t\t // The ResultSet may implicitly close when when the ResultSet type ", "\t\t // is TYPE_FORWARD_ONLY and the next method of ResultSet returns ", "\t\t // ...
derby-DERBY-1296-1c31b3a1
DERBY-1296 Setting property derby.system.bootAll causes NullPointerException in BaseMonitor.bootProviderServices. Fix and test contributed by Fernanda Pizzorno git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@425388 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/harness/Sed.java", "hunks": [ { "added": [ " searchStrings.addElement(\"Directory.*.extinout/crwombatlog/log.*.exists\");" ], "header": "@@ -164,6 +164,7 @@ public class Sed", "removed": [] ...
derby-DERBY-1296-36498c01
updated source file header for recently added file to comply with new policy. Initial source file also had incorrect copyright dates. It was added as part of DERBY-1296. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@425391 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1303-cccb382b
- DERBY-1303 The test of derbynet/SuicideOfStreaming.java is failed when programs are build as Insane - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@406921 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1308-57efc3c3
DERBY-1308: Tests jdbcapi/HoldabilityTest.junit, jdbcapi/UpdateXXXTest.junit,jdbcapi/SURTest.junit fail on wctme5.7_foundation Attaching patch DERBY-1308_3_20060527.*. In this patch, I moved the get*DataSource* methods from functionTests/util/BaseJDBCTestCase.java to a new file, functionTests/util/TestDataSourceFactory.java, and the method getDefaultSourceProperties into functionTests/util/TestConfiguration.java. I adjusted affected tests that I could find, and verified the affected tests where applicable with wctme5.7, wsdd5.6, wctme5.7_foundation, jdk142 and jdk16. Patch contributed by Myrna van Lunteren. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@410267 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/util/TestDataSourceFactory.java", "hunks": [ { "added": [ "/*", "", " Derby - Class org.apache.derbyTesting.functionTests.util.TestUtil", "", " Copyright 2006 The Apache Software...
derby-DERBY-1313-4e091b63
DERBY-1313: SUR: Use DRDA's extended diagnostic to send ROW_UPDATED and ROW_DELETED warnings. Submitted by Fernanda Pizzorno git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@411167 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/net/CodePoint.java", "hunks": [ { "added": [ " // SQL Error Diagnostic Level", " // DIAGLVL0 A null SQLDIAGGRP is returned. This is the default.", " // DIAGLVL1 A non-null SQLDIAGGRP should be returned.", ...
derby-DERBY-1314-73d678d3
DERBY-1314: Differences between client and embedded when invoking stored procedures using Statement.executeUpdate() Make executeUpdate() return 0 on the client when executing a stored procedure. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@416696 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/PreparedStatement.java", "hunks": [ { "added": [ " private int executeUpdateX() throws SqlException {", " checkExecuteUpdatePostConditions(\"java.sql.PreparedStatement\");" ], "header": "@@ -386,13 ...
derby-DERBY-1314-fade7e97
DERBY-501: Client and embedded drivers differ on invoking a procedure that returns a single Dynamic resultSet using CallableStatement.executeQuery() This patch modifies EmbedStatement.processDynamicResults() so that it returns the number of dynamic results instead of a boolean. EmbedStatement.executeStatement() uses this number to decide whether an exception is to be raised. With this change, the executeQuery and executeUpdate parameters are no longer needed in GenericPreparedStatement.execute(). ProcedureTest.junit is now enabled in derbyall (all frameworks). Seven of the test cases run in the embedded framework only, but I expect all of them to succeed with the client driver after DERBY-1314 and DERBY-1364 have been fixed. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@414795 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/PreparedStatement.java", "hunks": [ { "added": [], "header": "@@ -101,8 +101,6 @@ public interface PreparedStatement", "removed": [ "\t * @param executeQuery\t\tWhether or not called from a Statement.executeQuery()", ...
derby-DERBY-1315-03eae1d7
DERBY-1315 (minor cleanup) Remove a couple of unused fields and associated methods to save runtime space. Reduce the scope of some fields and methods to better understand their use. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@430173 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/FromTable.java", "hunks": [ { "added": [ "abstract class FromTable extends ResultSetNode implements Optimizable" ], "header": "@@ -65,7 +65,7 @@ import java.util.HashMap;", "removed": [ "public...
derby-DERBY-1315-8aff1cda
DERBY-766 DERBY-1714 Working method in CodeChunk that splits expressions out of generated methods that are too large. Bumps the number of unions supported in largeCodeGen to over 6,000 from around 800. Also increases the number of rows supported in a VALUES clause. A large number of UNION clauses still requires a large amount of memory for optimization (see DERBY-1315). A large number of rows in a VALUES clause fails at some point due to a StackOverflow. Subsequent commit will modify largeCodeGen to be a JUnit test and adapt to these changes but running into issues finding a useful workign limits that can produce repeatable results without hitting memory issues. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@432856 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java", "hunks": [ { "added": [ " " ], "header": "@@ -74,7 +74,7 @@ class BCMethod implements MethodBuilder {", "removed": [ "" ] } ] }, { "file": "ja...
derby-DERBY-1315-acdff3cd
DERBY-1315 This patch adds a small amount of logic to remove entries from an Optimizable's "best plan" HashMap when they are no longer needed. For more on when this is possible, see the discussion here: http://article.gmane.org/gmane.comp.apache.db.derby.devel/26051 Patch contributed by "A B" qozinx@gmail.com git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@439083 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/FromTable.java", "hunks": [ { "added": [ "\t Set of object->trulyTheBestAccessPath mappings used to keep track", "\t with respect to a specific outer query or ancestor node. In the case", "\t of an outer qu...
derby-DERBY-1315-b1397ecd
DERBY-766 DERBY-1714 Convert largeCodeGen to a JUnit test, add it to the lang._Suite and add that to the derbylang.runall old harness suite. Added tests for insert a large number of rows with a VALUES clause. Test needs further improvements due to errors from DERBY-1315 and stack overflow with a large INSERT VALUES clause. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@433085 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/JDBC.java", "hunks": [ { "added": [ "\t * Provides simple testing of the ResultSet when the contents" ], "header": "@@ -299,7 +299,7 @@ public class JDBC {", "removed": [ "\t * Provides simple tes...
derby-DERBY-1315-df5ffc85
DERBY-1315 (minor cleanup) Make optimizerToBestPlanMap private scope and change its description into a javadoc comment. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@429893 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/FromTable.java", "hunks": [ { "added": [ "\t/**", "\t Set of optimizer->trulyTheBestAccessPath mappings used to keep track", "\t of which of this Optimizable's \"trulyTheBestAccessPath\" was the best", ...
derby-DERBY-1322-10b9cb1b
DERBY-1322: Missing resets of isOnInsertRow state in net client when navigating away via other than ResultSet#next. Submitted by Fernanda Pizzorno git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@409170 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/ResultSet.java", "hunks": [ { "added": [ " moveToCurrentRowX();" ], "header": "@@ -281,10 +281,7 @@ public abstract class ResultSet implements java.sql.ResultSet,", "removed": [ " if (is...
derby-DERBY-1323-6b0118a9
DERBY-1323 Detectability methods rowUpdated, rowInserted, rowDeleted can be called from illegal states in both clients. Submitted by Dag H. Wanvik git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@408875 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/ResultSet.java", "hunks": [ { "added": [ " checkPositionedOnPlainRow();" ], "header": "@@ -2725,6 +2725,7 @@ public abstract class ResultSet implements java.sql.ResultSet,", "removed": [] }, ...
derby-DERBY-1325-fe8bb68e
DERBY-1325 Isolation level of local connection does not get reset after exiting a global transaction if the isolation level was changed using SQL Attaching a patch 'derby-1325-v1.diff' which ensures correct isolation level gets used once we switch back to local mode when SQL is used to set the isolation level. Patch does the following: * Adds call to get the isolation level up to date when joining/resuming a global transaction. This will make sure the BrokeredConnection object has the correct isolation level to be used when we switch back to local mode. * Adds a test to jdbcapi/checkDataSource.java and modifies the master files. With this patch, I ran derbyall with Sun jdk 1.4.2 on Windows XP. No failures. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@409002 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1326-25d6720b
DERBY-1219: jdbcapi/checkDataSource test hangs intermittently with client This patch contributed by Deepa Remesh (dremesh@gmail.com). This patch enables the checkDataSource and checkDataSource30 tests to run with the client framework by removing the code which shuts down the system in the middle of the test. This is the code which causes the intermediate hang. The hanging problem has been logged as a separate issue, DERBY-1326. The shutdown is a valuable part of the test because it verifies that the global transaction state is valid even after the database has been shut down, so once the hang problem has been resolved, this test should be modified again to re-enable the shutdown processing with the client framework. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@406776 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1326-37c3287b
DERBY-1326 (partial) Network server may abandon sessions when Derby system is shutdown and this causes intermittent hangs in the client Two small cleanups: Make NetworkServerControlImpl.startNetworkServer() remove the sessions it closes from sessionTable. Also, synchronize on runQueue to prevent modifications while the queue is traversed. Invoke closeSession() and close() in a finally clause in DRDAConnThread.handleException() to ensure proper closing of the session when an unexpected error happens. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@446538 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java", "hunks": [ { "added": [ "\t\t\t\t\t\tsynchronized (runQueue) {", "\t\t\t\t\t\t\tfor (int i = 0; i < runQueue.size(); i++) {", "\t\t\t\t\t\t\t\tSession s = (Session) runQueue.get(i);", ...
derby-DERBY-1326-4b086587
DERBY-1326: Network server may abandon sessions when Derby system is shutdown and this causes intermittent hangs in the client Re-enable shutdown in checkDataSource test. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@447462 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1326-57fd882d
DERBY-1326: Network server may abandon sessions when Derby system is shutdown and this causes intermittent hangs in the client Added JUnit test case which reliably reproduces the hang. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@449616 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1326-d702ebab
DERBY-1326 (partial) Network server may abandon sessions when Derby system is shutdown and this causes intermittent hangs in the client Don't poison the network server's worker threads when an engine shutdown is detected. Poisoning the threads could lead to abandoning of sessions and hangs in the client. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@447375 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java", "hunks": [ { "added": [ "\t\t\t\t\t\t// DERBY-1326: There could be active threads that", "\t\t\t\t\t\t// contain old/invalid sessions. These sessions won't", "\t\t\t\t\t\t// be cleaned...
derby-DERBY-1327-318307e7
DERBY-1327 Identity column can be created with wrong and very large start with v alue with "J2RE 1.5.0 IBM Windows 32 build pwi32dev-20060412 (SR2)" with JIT on The fix for this issue would be to reduce the number of parameters required by the constructor to <=10 in org.apache.derby.iapi.sql.dictionary.ColumnDescriptor class. While researching into this, I found that all the 3 constructors in the class have a parameter named autoinc and it is defined as a boolean. This parameter is always equal to (parameter named autoincInc != 0). In my patch (Derby1327WrongStartKeyPatch1CodelineTrunk.txt) which is attached to this JIRA, I have removed the autoinc parameter and inside the constructors, I use (parameter named autoincInc != 0) instead of relying on autoinc. This cleans up the constructor parameter passing for all the 3 constructors and also brings down the number of parameters to <=10. The test program from the JIRA entry runs fine with this change and I have created a new test JitTest.java based on that test program. Hopefully this test can be a place holder for any future JIT issues. I also ran the test suites and there were no new failures. I also removed the import of org.apache.derby.iapi.sql.dictionary.ColumnDescriptor from some classes which didn't really use ColumnDescriptor. Contributed by Mamta Satoor git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@413129 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/ColumnDescriptor.java", "hunks": [ { "added": [], "header": "@@ -95,7 +95,6 @@ public class ColumnDescriptor extends TupleDescriptor", "removed": [ "\t * @param autoinc\t\tboolean value for sanity checking." ...
derby-DERBY-1329-fdd31675
DERBY-1329: Set ColumnReference in CurrentOfNode when a match is found. Attaching a patch to address this issue. In a word, the problem is that the ColumnReference in a CurrentOfNode can, in certain situations, end up with a tableNumber that is never set, and hence it defaults to -1. The fix I've made ensures that the ColumnReference's tableNumber will always be set when necessary--i.e. when we've found the ResultColumn that matches the received ColumnReference. I think this is the correct fix for two reasons: 1) In FromList.bindColumnReferences(), there is the following comment: /* TableNumbers are set in the CR in the underlying * FromTable. This ensures that they get the table * number from the underlying table, not the join node. * This is important for beging able to push predicates * down through join nodes. */ The place where "TableNumbers are set" is in the getMatchingColumn() call, which means that the underlying FromTable (which includes CurrentOfNode) is responsible for setting the table number. 2) Inspection of all other FromTables that implement getMatchingColumn() shows that they all set the ColumnReference's table number if the corresponding ResultColumn is found. The one exception is JoinNode, but the getMatchingColumn() method in JoinNode in turn calls the method of the same name on the join's left and right nodes, so we know that, eventually, the ColumnReference's tableNumber will get set by one of the other FromTable's getMatchingColumn() calls. So the only FromTable that does not set the tableNumber is CurrentOfNode, and that's the reason for the failure described in this issue. The change seems fairly minor but if anyone has a chance to double-check it, that'd be great. I also added a test case (using the repro posted in the above comments) to lang/update.sql. I ran derbyall on Linux Red Hat (RHEL4) using ibm142 and saw no new failures. Submitted by Army Brown (gozinx@gmail.com) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@411393 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CurrentOfNode.java", "hunks": [ { "added": [ "\t\t\t\t// If we found the ResultColumn, set the ColumnReference's", "\t\t\t\t// table number accordingly. Note: we used to only set", "\t\t\t\t// the tableNumb...
derby-DERBY-1338-5ad71053
DERBY-1338: Client tests fail with NoClassDefFound: DRDAProtocolExceptionInfo Patch contributed by Dag Wanvik (dag.wanvik@sun.com) Work around a classloader bug involving interrupt handling during class loading. If the first request to load the DRDAProtocolExceptionInfo class occurs during shutdown, the loading of the class may be aborted when the Network Server calls Thread.interrupt() on the DRDAConnThread. By including a static reference to the DRDAProtocolExceptionInfo class here, we ensure that it is loaded as soon as the DRDAConnThread class is loaded, and therefore we know we won't be trying to load the class during shutdown. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@416012 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DRDAConnThread.java", "hunks": [ { "added": [ " // Work around a classloader bug involving interrupt handling during", " // class loading. If the first request to load the", " // DRDAProtocolExceptionInfo cl...
derby-DERBY-1340-ceb72100
DERBY-1340: Anurag's derby-1340.diff, which reverts the refactoring of the client api committed as part of DERBY-1246. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@409007 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java", "hunks": [ { "added": [ "import java.sql.QueryObjectFactory;", "import org.apache.derby.client.am.ClientMessageId;", "import org.apache.derby.client.am.SqlException;", "...
derby-DERBY-1343-14299573
DERBY-2397 (refactor) Move drop code for ConglomerateDescriptor into ConglomerateDescriptor.drop(). Add various comments from information gained while refactoring code and minor cleanup. One more dropping of a ConglomerateDescriptor needs to be modified to use the drop() method but requires some cleanup for DERBY-1343 git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@518343 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/ConglomerateDescriptor.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;", "import org.apache.derby.iapi.sql.depend.DependencyManager;", "import org.apache.d...
derby-DERBY-1348-945a0cca
DERBY-1348: hack to propagate derbyTesting.jar.path from system->suite->test. Harness' use of properties really needs cleaning up. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@409534 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java", "hunks": [ { "added": [ "\tstatic String upgradejarpath;\t// Encoding used for child jvm and to read the test output ", " static String derbyTestingXaSingle;// Run junit test cases w...
derby-DERBY-1354-5d11c1f4
DERBY-1245 Add o.a.derby.client.am.ClobWriter test coverage DERBY-1354 Writer.write(int c) to writer from Clob.setCharacterStream(long pos) appends integer value, not character Contributed by Anders Morken git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@409688 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-1356-16f19988
DERBY-1356: Positioned update/delete when positioned after last or before first causes NullPointerException Patch contributed by Fernanda Pizzorno <Fernanda.Pizzorno@Sun.COM>. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@411428 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java", "hunks": [ { "added": [ "\t\tif (currentPosition <= positionInSource && currentPosition > 0) {", "\t\t\tpositionInHashTable.setValue(currentPosition);", "\t\t\tDataValueDesc...