id
stringlengths
22
25
commit_message
stringlengths
137
6.96k
diffs
listlengths
0
63
derby-DERBY-3812-2301e09b
DERBY-3812 - fix test regression in NetworkServerMBeanTest.testAttributeDrdaStreamOutBufferSize caused by checkin of converted test OutBufferStreamTest (DERBY-3796). Patch contributed by Erlend Birkenes git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@682531 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3818-f6967015
DERBY-3818 (partial): Whitespace and formatting changes only. Patch file: n/a git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@707103 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3819-05ef8bdc
DERBY-3819 ; 'Expected Table Scan ResultSet for T3' in test_predicatePushdown(....PredicatePushdownTest) Causing a number of asserts to be skipped when using a 64 bit platform. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@807733 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3823-7b429a31
DERBY-3823 NullPointerException in stress.multi test Adding a test case showing that in case of a network server, an open resulset's metadata can get changed underneath it but it is not reflected in the metadata. The test creates a table with one of column as varchar(5). It inserts 1000 rows and then opens a reulset on that table with varchar column as one of the columns. The test verifies that the reulset's metadata at this point shows the length of the column as 5. Next, while the resulset is still open, the tests does an ALTER TABLE to increase the varchar column's length to 8. In case of embedded mode, this fails because of the open resulset. In case of network server, because of prefetching of rows, the ALTER TABLE is allowed but when the test gets the resulset's metadata again and checks the length of varchar column, it still shows the length to be 5 rather than 8. There are couple other jiras related to network server prefetching, namely, DERBY-3839 and DERBY-4373. Once DERBY-3823 is fixed, we should see the change in metadata reflected in resultset's metadata. A fix for DERBY-3823 will cause the following the test added here to fail. Right now, the new test accepts the incorrect metadata length obtained through the resultset's metadata after ALTER TABLE has been performed in network server mode. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1182570 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3823-e8fb6d60
DERBY-3823 NullPointerException in stress.multi test This patch fixes a race condition in EmbedPreparedStatement#getMetaData: if we are trying to retrieve the metadata for a prepared statement while it is being recompiled there is a time window during which the activation class is null. The existing code could therefore cause an NPE. The new code plugs the race condition. This NPE led to intermittent errors in stressTestMulti. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1183192 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.loader.GeneratedClass;" ], "header": "@@ -64,6 +64,7 @@ import java.sql.Types;", "removed": [] }, { ...
derby-DERBY-3825-925b07bc
DERBY-3825: StoreStreamClob.getReader(charPos) performs poorly. Made the repositioning logic easier to read. Patch file: derby-3825-3a-simplification.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@710033 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java", "hunks": [ { "added": [ " if (requestedCharPos <= readerCharCount - charactersInBuffer) {", " // The stream must be reset, because the requested position is", " // bef...
derby-DERBY-3825-ab2037f8
DERBY-3825: StoreStreamClob.getReader(charPos) performs poorly. Added repositioning functionality to UTF8Reader - ordered after increasing cost: a) Reposition within current character buffer (small hops forwards and potentially backwards - in range 1 char to 8K chars) b) Forward stream from current position (hops forwards) c) Reset stream and skip data (hops backwards) In addition the new method getInternalReader was added to InternalClob. It takes advantage of the repositioning capability of UTF8Reader. Clob.getSubString uses the new functionality when the Clob is represented by a StoreStreamClob. Previously only mechanism c) was used. Patch file: derby-3825-2b-internalReader_repositioning.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@704547 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedClob.java", "hunks": [ { "added": [ " Reader reader;", " try {", " reader = this.clob.getInternalReader(pos);", " } catch (EOFException eofe) {", ...
derby-DERBY-3831-a90874a5
DERBY-3831; junit.RuntimeStatisticsParser doesn't fully distinguish names of table or index. patch contributed by Junjie Peng git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@685733 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java", "hunks": [ { "added": [ " tableName + \" \")!= -1);" ], "header": "@@ -168,7 +168,7 @@ public class RuntimeStatisticsParser {", "removed": [ " ...
derby-DERBY-3840-f23a20f8
DERBY-3840 The test code executes java processes by just executing java instead of using a full path. This may cause the wrong java to be picked up git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@693522 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java", "hunks": [ { "added": [ " al.add( BaseTestCase.getJavaExecutableName() );" ], "header": "@@ -249,7 +249,7 @@ final public class NetworkServerTestSetup extends BaseTestSetup {", ...
derby-DERBY-3844-b61d6349
DERBY-3844: ASSERT failure in BasePage.unlatch() when running LobStreamsTest Disallows calling getBlob or getClob more than once on a given LOB column (on the same result set row). See release note for details, this change may break existing applications. Patch file: derby-3844-1c-disallow_multiple_accesses.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@911793 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/ResultSet.java", "hunks": [ { "added": [ "import java.util.Arrays;" ], "header": "@@ -25,9 +25,9 @@ import java.io.IOException;", "removed": [ "import org.apache.derby.shared.common.i18n.MessageUtil;"...
derby-DERBY-3844-c1832a32
DERBY-3844: ASSERT failure in BasePage.unlatch() when running LobStreamsTest Rewrote test to only call getX once per column per row, as calling for instance getBlob twice on a given column on the same row will be disallowed. Also removed some unused code. Patch file: derby-3844-2a-jdbcdriver_test_rewrite.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@910481 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3845-d8644b2a
DERBY-3845: Problems running org.apache.derbyTesting.system.optimizer.RunOptimizerTest Make sure the database is initialized also when -mode is specified on the command line. Patch contributed by Ole Solberg <Ole.Solberg@Sun.COM>. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@691583 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3850-8106edc9
DERBY-3850: Remove unneeded workarounds for DERBY-177 and DERBY-3693 Removed the wait parameter from methods called from SPSDescriptor.updateSYSSTATEMENTS() since waiting is prevented by another mechanism now. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@692495 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java", "hunks": [ { "added": [ "\t\tTransactionController\ttc" ], "header": "@@ -1072,15 +1072,13 @@ public interface DataDictionary", "removed": [ "\t * @param wait\t\t\tTo w...
derby-DERBY-3850-a9215529
DERBY-3850: Remove unneeded workarounds for DERBY-177 and DERBY-3693 Removed the wait parameter from TabInfoImpl.updateRow(). The method only had two callers, both of which called it with wait=true. updateRow() passed the parameter on to openForUpdate() in RowChanger, but that method is sometimes called with wait=false, so the parameter couldn't be removed from that method. Also removed an unused variable and some unused imports. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@695244 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java", "hunks": [ { "added": [], "header": "@@ -22,18 +22,14 @@", "removed": [ "import org.apache.derby.iapi.services.context.ContextService;", "import org.apache.derby.iapi.sql.conn.Langua...
derby-DERBY-3853-d1661b20
DERBY-3853: Behaviour of setTypeMap() differs between embedded and client Changed the client driver to match the embedded driver. Patch contributed by Yun Lee <yun.lee.bj@gmail.com>. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@764217 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3856-79fec783
DERBY-3856: difference between Embedded vs DerbyNetClient in format of return from timestamp(cast(? as varchar(32))) Stop caching the original input string in the parse methods of SQLDate and SQLTimestamp, and instead generate (and cache) a normalized datetime string on the first call to getString(). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@952581 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SQLDate.java", "hunks": [ { "added": [], "header": "@@ -471,7 +471,6 @@ public final class SQLDate extends DataType", "removed": [ " valueString = parser.getTrimmedString();" ] }, { ...
derby-DERBY-3863-40a45842
DERBY-3863; improve test for import export using ij git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@691506 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-387-5bd651f5
DERBY-387: Fix Simple Network Client sample to work correctly by fixing database name. Contributed by Rajesh Kartha git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@375715 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/demo/nserverdemo/SimpleNetworkClientSample.java", "hunks": [ { "added": [ "import java.lang.reflect.InvocationTargetException;", "import java.lang.reflect.Method;", "import java.sql.Connection;", "import java.sql.DriverManager;", ...
derby-DERBY-3870-044afae1
DERBY-3870: Concurrent Inserts of rows with XML data results in an exception Store XML utility instance in the activation instead of in the compiled plan, so that it's never accessed concurrently by multiple threads. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1125305 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java", "hunks": [ { "added": [], "header": "@@ -23,8 +23,6 @@ package org.apache.derby.iapi.types;", "removed": [ "import org.apache.derby.iapi.services.io.Formatable;", "import org.apache.derby.i...
derby-DERBY-3870-0f64b702
DERBY-5289 Unable to boot 10.5.1.1 database - fails during soft/hard upgrade process for a new version number while trying to drop jdbc metadata Checking testcase for DERBY-5289. In trunk theDERBY-3870 fix contributed by Knut Anders Hatlen fixed the issue so no code change is needed. Just the portion of DERBY-3870 that is relevant to DERBY-5289 will be backported to the other branches. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1139449 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3870-118ac264
DERBY-3870: Concurrent Inserts of rows with XML data results in an exception Added a test case for the bug (disabled for now). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1101839 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3870-2a09eb57
DERBY-3870: Concurrent Inserts of rows with XML data results in an exception Remove lazy initialization of the field that holds the cached SqlXmlUtil instance. This simplifies the generated byte code. It also removes the need for an explicit syntax check of the XML query during the bind phase, as the earlier initialization ensures that syntax errors will be detected at compile time. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1126358 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java", "hunks": [ { "added": [], "header": "@@ -31,7 +31,6 @@ import org.apache.derby.iapi.services.compiler.LocalField;", "removed": [ "import org.apache.derby.iapi.types.SqlXmlUtil;" ...
derby-DERBY-3870-5fc727ca
DERBY-3870: Concurrent Inserts of rows with XML data results in an exception Allow databases that contain triggers with XML operators to be upgraded from a version without the fix for this issue to a fixed version. It used to fail because it couldn't deserialize the old plan for the trigger. Fix it by not trying to deserialize the plan before invalidating it. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1132546 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java", "hunks": [ { "added": [ " * The returned descriptors don't contain the compiled statement, so it", " * it safe to call this method during upgrade when it isn't known if the", ...
derby-DERBY-3870-d09782a3
DERBY-3870: Concurrent Inserts of rows with XML data results in an exception Remove the unneeded indirection via SqlXmlExecutor. This reduces the amount of code and removes one object allocation per row when using an XML operator. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1127883 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/XML.java", "hunks": [ { "added": [ " * @param stringValue The string value to check." ], "header": "@@ -598,7 +598,7 @@ public class XML", "removed": [ " * @param text The string value to che...
derby-DERBY-3870-ed7f8b90
DERBY-6634: Improve test coverage of SqlXmlUtil.java Remove dead code from the time when SqlXmlUtil implemented the Formatable interface (before DERBY-3870). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1605285 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java", "hunks": [ { "added": [], "header": "@@ -128,12 +128,6 @@ public class SqlXmlUtil", "removed": [ " // Used to recompile the XPath expression when this formatable", " // object is reco...
derby-DERBY-3871-0c5c5aa1
DERBY-3871: EmbedBlob.setBytes returns incorrect insertion count. Made EmbedBlob.setBytes return the number of bytes inserted, instead of returning the Blob position after the insert. Improved some JavaDoc comments. Added regression tests. Patch file: derby-3871-1a_insertion_count.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@701372 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java", "hunks": [ { "added": [ " * Writes the given array of bytes to the BLOB value that this Blob object", " * represents, starting at position pos, and returns the number of bytes", " * wri...
derby-DERBY-3872-f36770cc
DERBY-3872 The NPE in this jira entry was caused by the missing overwrite of accept() method in IndexToBaseRowNode. Because of the missing code, the additional layer of VirtualColumn node over ResultColumn was not happening for the where clause in HAVING. Once the accept method was added to IndexToBaseRowNode, the VirtualColumn on top of the ResultColumn got the correct resultset number associated with it and at the code generation time, we start referencing the correct resultset rather than the one associated with the JOIN clause. Thanks a ton to Army and Bryan on this jira entry for their help. I have added a test case for this in lang/GroupByTest.java git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@705037 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.compile.Visitable;", "import org.apache.derby.iapi.sql.compile.Visitor;" ], "header": "@@ -27,6 +27,8 @@ import org.a...
derby-DERBY-3875-c33b0cfc
DERBY-3875; closing containers after a problem has been found allows restoreFrom to work correctly. Patch contributions by Jason McLaurin, Kristian Waagan and Myrna van Lunteren. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@703246 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/Utilities.java", "hunks": [ { "added": [ "import java.util.StringTokenizer;" ], "header": "@@ -33,6 +33,7 @@ import java.security.PrivilegedExceptionAction;", "removed": [] }, { "added":...
derby-DERBY-3878-42526fd1
DERBY-3878: Replication: stopSlave does not close serversocket when master has crashed Use try/finally to ensure that the sockets are closed when closing the socket streams fails. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@707591 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/replication/net/SocketConnection.java", "hunks": [ { "added": [ " // If the other party has crashed, closing the streams may fail (at", " // least the output stream since its close() method calls flush()).", ...
derby-DERBY-388-851bcbb2
Port fix for DERBY-388 into 10.1 branch. Address intermittent failures when executing trigger statements caused by references to internal SQL formats. Fix originally submitted to 10.0 branch by Army Brown (qozinx@sbcglobal.net) git-svn-id: https://svn.apache.org/repos/asf/incubator/derby/code/trunk@219115 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java", "hunks": [ { "added": [ "\t\t\tif (!spsAction) {", "\t\t\t// only re-prepare if this isn't an SPS for a trigger-action;", "\t\t\t// if it _is_ an SPS for a trigger action, then we can...
derby-DERBY-388-8f235488
DERBY-388: Add a test case to cover this patch submitted earlier. Submitted by Army Brown (qozinx@sbcglobal.net) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@226896 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3880-2e7e8f6d
DERBY-4698 Simple query with HAVING clause crashes with NullPointerException Patch derby-4698-2. The case of column references in HAVING clauses being wrong after JOIN flattening was initially solved by DERBY-3880. That solution was partial in that it can sometimes happen too late. This patch changes the fix-up of column references in a having clause after join flattening to the same point in time as that of other column references that need fix-up after the flattening (rcl, column references in join predicates and group by clauses). Thus the fixup is moved from the modifyaccesspath phase to the preprocess phase. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@956234 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/FromList.java", "hunks": [ { "added": [ " * @param havingClause The HAVING clause, if any", " GroupByList gbl,", " ValueNode havingC...
derby-DERBY-3880-8d13a1f3
DERBY-3880 NPE on a query with having clause involving a join remap expression for AggregateNode operand if the JoinNode has been flattened. Fix contributed by Army Brown git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@711321 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3882-4880a417
DERBY-3882: Expensive cursor name lookup in network server Statements executed via the network client are always given cursor names on the server, even if the user has not set a cursor name. When a statement has a cursor name, the embedded driver will check on each execution that there is no other statement in the same connection with the same cursor name and an open result set. To perform this check, the list of activations in the connection is traversed and each cursor name is compared with the cursor name of the statement to be executed. If the number of open statements in the connection is high, which is very likely if ClientConnectionPoolDataSource with the JDBC statement cache is used, traversing the list of activations and performing string comparisons may become expensive. This patch attempts to make this operation cheaper without performing a full rewrite and use a new data structure. It exploits that the most common implementations of java.lang.String cache the hash code, so calling hashCode() on the cursor names in the list will simply read the value from an int field after warm-up. By checking if the hash codes of the cursor names match first, we can avoid many of the string comparisons because we know that strings with different hash codes cannot be equal. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@818807 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java", "hunks": [ { "added": [ " int cursorHash = cursorName.hashCode();", "" ], "header": "@@ -876,6 +876,8 @@ public class GenericLanguageConnectionContext", ...
derby-DERBY-3884-ebad814e
DERBY-3877 SQL roles: build support for dblook Patch derby-3877-2, which adds basic support for roles in dblook (but see DERBY-3884), adds test cases, and also enables the old test harness to shutdown the server using credentials when required due to authentication being enabled (needed by modified test for dblook). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@700295 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/functionTests/harness/NetServer.java", "hunks": [ { "added": [ "\tString appsRequiredPassword;" ], "header": "@@ -43,6 +43,7 @@ public class NetServer", "removed": [] }, { "added": [ ...
derby-DERBY-3886-7cbf0216
DERBY-3886 SQL roles: ij show enabled and settable roles Adds a VTI table function SYSCS_DIAG.ENABLED_ROLES and two new ij commands; "show settable_roles" and "show enabled_roles", plus new tests. Also tweaks ScriptTestCase to be able to run scripts that need SQL authorization. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@702266 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3887-7f4445db
DERBY-3887 Embedded Derby fails under JBoss because of JMX-related conflicts Backed out JMX related changes for DERBY-3745. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@784831 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java", "hunks": [ { "added": [], "header": "@@ -163,43 +163,7 @@ public final class JMXManagementService implements ManagementService, ModuleCont", "removed": [ " //DERBY-3745 We wan...
derby-DERBY-3888-b5392dbe
DERBY-3888: ALTER TABLE ... ADD COLUMN cannot add identity columns Enable support for adding identity columns with ALTER TABLE. It is only enabled if identity columns are backed by sequences. That is, the database format has to be 10.11 or higher. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1626141 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java", "hunks": [ { "added": [], "header": "@@ -24,7 +24,6 @@ package org.apache.derby.impl.sql.execute;", "removed": [ "import org.apache.derby.catalog.DefaultInfo;" ] }, ...
derby-DERBY-3889-2fb5c8dd
DERBY-3889: LOBStreamControl.truncate() doesn't delete temporary files Created helper method for closing and deleting temporary files to make it less likely that some of the required operations are forgotten. Also moved the lobFile field into the LOBFile class to reduce the risk of getting inconsistencies between the fields tmpFile and lobFile. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@704010 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/LOBFile.java", "hunks": [ { "added": [ " /** The temporary file where the contents of the LOB should be stored. */", " private final StorageFile storageFile;", "", " /** An object giving random a...
derby-DERBY-389-c62aaa25
DERBY-389 Fix a hang accessing the statement cache in network server stress test. The change was to remove the synchronization on the statement cache from the removeStatement method of GenericLanguageConnectionContext. It is not needed because the statement cache handles its own synchronization. Also changes the javadoc to remove some incorrect info about temp tables. git-svn-id: https://svn.apache.org/repos/asf/incubator/derby/code/trunk@201792 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java", "hunks": [ { "added": [ "\t* This method will remove a statement from the statement cache.", "\t* It will be called, for example, if there is an exception preparing", ...
derby-DERBY-389-df5e1dd0
DERBY-389 Fix nullSQLText.java for J2ME Attaching a patch for the test jdbcapi/nullSQLText.java. This test fails in J2ME because it uses a stored procedure with server-side JDBC. As I understand, the purpose of the test is only to test any stored procedure call. So I replaced the stored procedure in this test with a procedure in org.apache.derbyTesting.functionTests.util.ProcedureTest. Also changed the master files. With this patch, I have run jdbcapi/nullSQLText.java in embedded, client and jcc frameworks. Also run this test in CDC/FP. This patch changes only tests. Please review/commit this patch. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@330705 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3890-9cc8ad0a
DERBY-3890: Replication: NPE for startSlave of encrypted database Removes NPE for replication of encrypted databases by setting RawStoreFactory in LogFactory before calling SlaveFactory#startSlave. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@708510 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/RawStore.java", "hunks": [ { "added": [ " // RawStoreFactory is used by LogFactory.recover() and by", " // SlaveFactory.startSlave (for the SlaveFactory case, it is", " // only used if the...
derby-DERBY-3897-e3883f5f
DERBY-3897 SQLSessionContext not correctly initialized in some non-method call nested contexts Patch derby-3897-3, which sets up the SQL session context correctly also for substatements. See javadoc for LanguageConnectionContext#setupSubStatementSessionContext for an enumeration of these cases. Also adds test cases for this. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@703295 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/PreparedStatement.java", "hunks": [ { "added": [ "\t * Execute the PreparedStatement and return results, used for top level", "\t * statements (not substatements) in a connection." ], "header": "@@ -93,7 +93,8...
derby-DERBY-3898-24400cd2
DERBY-3898: Blob.setBytes differs between embedded and client driver when the specified length is invalid Added fix and test case for a remaining corner case: When the sum of offset and length is greater than Integer.MAX_VALUE, the client driver silently ignores the error whereas the embedded driver fails with an IndexOutOfBoundsException. The unexpected results are caused by a check for offset + len > bytes.length where offset+len overflows and evaluates to a negative value. The fix changes this condition to the equivalent len > bytes.length - offset which won't overflow (because both bytes.length and offset are known to be non-negative at this point in the code, and subtracting one non-negative int from another is guaranteed to result in a value in the range [-Integer.MAX_VALUE, Integer.MAX_VALUE]). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@986345 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-390-c47d471f
DERBY-390: Patch to handle case-sensitive SQL identifiers correctly. Import/export procedure parameters for table names, schema names, columns names should be passed in the case-sensitive form if they are quoted identfiers and in upper case if they are not quoted SQL identifiers. Import/export will generate insert/select statements with quoted table names, schema name and column names to be execute on the database after this patch. committed on behalf of: Suresh Thalamati git-svn-id: https://svn.apache.org/repos/asf/incubator/derby/code/trunk@208770 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/load/ColumnInfo.java", "hunks": [ { "added": [ "", "\t\tthis.schemaName = sName;", "\t\tthis.tableName = tName;", "\t\t\t//eg: C2 , C1 , C3" ], "header": "@@ -80,13 +80,14 @@ class ColumnInfo ...
derby-DERBY-3902-47509e86
DERBY-3902; adjust orphaned message strings; - move J107, J108, J109 to common MessageId.java - remove references to 08000.S.1 and XJ102 from message.xml & mes*.properties git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@704290 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/SqlException.java", "hunks": [ { "added": [ "import org.apache.derby.shared.common.reference.MessageId;" ], "header": "@@ -26,6 +26,7 @@ import java.util.TreeMap;", "removed": [] }, { "added...
derby-DERBY-3902-648e3486
DERBY-3902; correct messages.xml and translated files for SQLState 2003.S.4 (was accidentally listed as 2004.S.4 - see also comment in DERBY-1567). Also fix up MessageBundleTest to ignore two sqlstates that are not exposed to the user so don't need text. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@703259 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3904-57191b46
DERBY-3904: NPE on left join with aggregate The issue involves a very special optimization that is performed for MIN and MAX queries in which we may be able to use an index to go directly to the lowest/highest value of the desired column. For example, in the query SELECT MAX(d1) FROM t1 if there is an index on d1, we can use that index to retrieve the max value very rapidly. In order to incorporate this optimization, the following conditions must be met: - No group by - One of: - min/max(ColumnReference) is only aggregate && source is ordered on the ColumnReference - min/max(ConstantNode) The optimization of the other way around (min with desc index or max with asc index) has the same restrictions with the additional temporary restriction of no qualifications at all (because we don't have true backward scans). The source of the data must also be "simple" (not a result of a join), and the NullPointerException occurred during the code that tried to establish the above conditions because it wasn't thoroughly enough excluding the join case. In the query: SELECT MAX( T1.D1 ) AS D FROM T1 LEFT JOIN T2 ON T1.D1 = T2.D2 WHERE T2.D2 IS NULL the code in GroupByNode.considerPostOptimizeOptimizations was trying to traverse the AccessPathImpl to find the index scan information, but for this LEFT JOIN case there is an AccessPathImpl but no index scan information, because there is a join being performed, not an index scan. The solution is to examine the AccessPathImpl more carefully, and only search the index scan information if an index scan is actually present. Also added a few tests, including an enhancement to the test library's RuntimeStatisticsParser so that it can determine if a Last Key Index Scan is being performed by the query. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@708002 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java", "hunks": [ { "added": [ "\tprivate final boolean lastKeyIndexScan;" ], "header": "@@ -31,6 +31,7 @@ public class RuntimeStatisticsParser {", "removed": [] }, { ...
derby-DERBY-3905-d7731394
DERBY-3905 Failed tests should save the database off to the fail directory git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@704964 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3907-51c45b8b
DERBY-3907: Save useful length information for Clobs in store. Cleanup of ReaderToUTF8Stream, which has to deal with the header in the streams being passed in to Derby. Changes: o Simplified constructors. o Added JavaDoc and comments. o Removed unused imports. o Removed instance variable maximumLength. o Added more information to the error messages for truncation. o Added CHAR as a truncatable string data type. o Removed "throws IOException" from close. Updated the test to pass inn a valid type name to the constructor. Patch file: derby-3907-3b-readertoutf8stream_cleanup.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@732676 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/ReaderToUTF8Stream.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.services.sanity.SanityManager;", " * Converts the characters served by a {@code java.io.Reader} to a stream", " * returning the data ...
derby-DERBY-3907-52625a50
DERBY-3907: Save useful length information for Clobs in store. Enabled the new header format for Clobs. Description: o ClobStreamHeaderGenerator Enabled the callback mechanism to inform the DVD about whether the database is accessed in soft upgrade mode or not. o SQLChar Added method writeClobUTF, which writes a Clob to the on-disk format. Added method readExternalClobFromArray. o SQLClob Added a variable to tell if the database is accessed in soft upgrade mode or not. It is used to reduce object creation (header generators) and to avoid consulting the data dictionary as much. It requires that the DVDs are reused, and I'm sure this can be further optimized. Implemented getLength, which returns the length of the Clob in one of three ways: 1) Delegate to SQLChar if the Clob has been materialized. 2) Read length from stream header if present. 3) Decode the whole stream. Updated getStreamWithDescriptor to deal with both header formats. Made restoreToNull nullify the character stream descriptor. Implemented writeExternal. Implemented getStreamHeaderGenerator, which will return one of two shared generator instances it is known if the database is accessed in soft upgrade mode or not. If unknown, a new generator instance is created, which will determine the mode when the header is asked for. Implemented investigateHeader, which decodes a stream header. Implemented readExternal. Implemented readExternalFromArray. Implemented utility method rewindStream, which resets the stream and skips the number of characters specified. Added a utility class for holding header information (currently only length). o StreamHeaderHolder Deleted the class, it is no longer used. NOTE: Databases created with this revision (or later) containing Clobs, cannot be accessed by earlier trunk revisions. Patch file: derby-3907-7a3-use_new_header_format.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@738408 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SQLChar.java", "hunks": [ { "added": [ " /**", " * Writes the header and the user data for a CLOB to the destination stream.", " *", " * @param out destination stream", " * @...
derby-DERBY-3907-6f4c92af
DERBY-3907 (partial): Save useful length information for Clobs in store. Started using the new framework for handling stream headers for string data values. The behavior regarding stream headers is kept unchanged, but the code is now ready to deal with multiple stream header formats. Short description: * EmbedResultSet & EmbedPreparesStatement Adjusted code to use the new interface method and pass in the correct class to the ReaderToUTF8Stream constructor. Note the special case of telling the DVD/generator if the database being accessed is in soft upgrade mode in EmbedResultSet. * ArrayInputStream The stream header is no longer read inside readDerbyUTF. * ReaderToUTF8Stream Adjusted code to use the new StreamHeaderGenerator interface, and made the stream count the number of characters encountered. If possible, the header is updated when the stream has been drained. * StringDataValue Added methods getStreamHeaderGenerator and setSoftUpgradeMode. * SQLChar Refactoring in preparation for handling multiple stream header formats. Pulled common code out into writeUTF. The header generator is now repsonsible for writing both the header bytes and an EOF marker if required. Made a second readExternal method, which is not reading the stream header format. This must now be done outside of this method and any length information is passed in as arguments. Implemented the new methods in StringDataValue. * SQLClob Adjusted a single call to ReaderToUTF8Stream. * UTF8UtilTest Adjusted code invoking the new ReaderToUTF8Stream constructor. Patch file: derby-3907-7a2-use_new_framework.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@736636 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/io/ArrayInputStream.java", "hunks": [ { "added": [], "header": "@@ -23,7 +23,6 @@ package org.apache.derby.iapi.services.io;", "removed": [ "import java.io.ObjectInput;" ] }, { "added": ...
derby-DERBY-3907-7672693c
DERBY-3907: Save useful length information for Clobs in store. These changes make Derby start using the stream descriptor object to correctly handle streams from store. This is done to be able to use several header formats, where a varying number of bytes are used. Description of changes: o EmbedClob Changed constructor to take a StringDataValue instead of a DataValueDescriptor. Updated call to the StoreStreamClob constructor. o EmbedResultSet Started using the getStreamWithDescriptor method and updated invocations of the UTF8Reader constructor. o StoreStreamClob Added a CharacterStreamDescriptor (CSD), and made the constructor take one as an argument. Adapted the class to use a CSD. o UTF8Reader Updated some comments. Fixed bug where the header length wasn't added to the byte length of the stream, and updated the class appropriately (adjusted utfCount, fixed the reset routine). Made sure the header bytes are skipped (either by skipping them in the constructor or by adjusting the position to on the next reposition). o ResultSetStreamTest Added a test for maxFieldSize, where truncation have to happen. o Various tests Adjusted tests to run with the new implementation. Patch file: derby-3907-5a-use_getStreamWithDescriptor.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@734630 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedClob.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.jdbc.CharacterStreamDescriptor;", "import org.apache.derby.iapi.types.StringDataValue;" ], "header": "@@ -25,15 +25,11 @@ package org.apa...
derby-DERBY-3907-7af67265
DERBY-3907 (partial): Save useful length information for Clobs in store. Added the framework required to handle multiple stream header formats for stream sources. Note that handling of the new header format is not yet added, so the code should behave as before, using only the old header format. A description of the changes: o EmbedResultSet and EmbedPreparedStatement Started using the new ReaderToUTF8Stream constructor, where the stream header is passed in. Also started to treat the DataValueDescriptor as a StringDataValue, which should always be the case at this point in the code. o ReaderToUTF8Stream Added field 'header', which holds a StreamHeaderHolder coming from a StringDataValue object. Updated the constructors with a new argument. The first execution of fillBuffer now uses the header holder to obtain the header length, and the header holder object is consulted when checking if the header can be updated with the length after the application stream has been drained. Note that updating the header with a character count is not yet supported. o StringDataValue Added new method generateStreamHeader. o SQLChar Implemented generateStreamHeader, which always return a header for a stream with unknown length (see the constant). o SQLClob Added a constant for a 10.5 stream header holder representing a stream with unknown character length. Also updated the use of the ReaderToUTF8Stream constructor. o StreamHeaderHolder (new file) Holder object for a stream header, containing the header itself and the following additional information; "instructions" on how to update the header with a new length, if the length is expected to be in number of bytes or characters, and if an EOF marker is expected to be appended to the stream. o UTF8UTilTest Updated usage of the ReaderToUTF8Stream constructor, and replaced the hardcoded byte count to skip with a call to the header holder object. o jdbc4.ClobTest Added some simple tests inserting and fetching Clobs to test the basics of stream header handling. o StreamTruncationTest (new file) New test testing truncation of string data values when they are inserted as streams. Patch file: derby-3907-2c-header_write_preparation.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@734065 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/ReaderToUTF8Stream.java", "hunks": [ { "added": [ " /**", " * The stream header to use for this stream.", " * <p>", " * The holder object is immutable, and the header should not have to be...
derby-DERBY-3907-cf0fdc4f
DERBY-3907 (partial): Save useful length information for Clobs in store. Added StringDataValue.getStreamWithDescriptor(). It it intended to be used when getting a stream from a StringDataValue to be used with a Clob object, or with streaming of string data values in general. The DVD is responsible for returning a correct descriptor for the raw stream. The descriptor is in turn used by other classes to correctly configure themselves with respect to data offsets, buffering, repositioning and so on. Changes: o CharacterStreamDescriptor Added a toString method and more verbose assert-messages. o StringDataValue Added method 'CharacterStreamDescriptor getStreamWithDescriptor()'. o SQLChar Made setStream non-final so it can be overridden in SQLClob. Added default implementation of getStreamWithDescriptor that always returns null. This means that all non-Clob string data types will be handled as strings instead of streams in situations where a stream is requested through getStreamWithDescriptor. This might be changed. Made throwStreamingIOException protected to access it from SQLClob. o SQLClob Implemented getStreamWithDescriptor, handling the old 2-byte format only. Overrid setStream to discard the stream descriptor when a new stream is set for the DVD. Patch file: derby-3907-4a-add_getStreamWithDescriptor.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@734148 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/jdbc/CharacterStreamDescriptor.java", "hunks": [ { "added": [ " SanityManager.ASSERT(curBytePos >= 0, \"Negative curBytePos\");", " curCharPos == BEFORE_FIRST, \"Invalid curCharPos \" +", ...
derby-DERBY-3907-dfdebd5e
DERBY-3907 (partial): Save useful length information for Clobs in store. Added an interface for a stream header generator object, and two implementations; one for Clob and one for the non-Clob string types (CHAR, VARCHAR and LONG VARCHAR). To support pre 10.5 databases in soft upgrade mode, the Clob stream header generator can generate both the new header format and the old one. Note that the Clob header generator depends on either knowing up front if it is being used in soft upgrade mode, or to be able to determine this through a database context. Patch file: derby-3907-7a1-write_new_header_format.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@736612 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/StreamHeaderGenerator.java", "hunks": [ { "added": [ "/*", "", " Derby - Class org.apache.derby.iapi.types.StreamHeaderGenerator", "", " Licensed to the Apache Software Foundation (ASF) und...
derby-DERBY-3909-db8b20bd
DERBY-3909: Race condition in NetXAResource.removeXaresFromSameRMchain() Removed the code that had race conditions since the data structures it touched weren't actually used for anything. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@704904 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/net/NetConnection.java", "hunks": [ { "added": [], "header": "@@ -1753,9 +1753,6 @@ public class NetConnection extends org.apache.derby.client.am.Connection {", "removed": [ " if (xares_ != null) {", " ...
derby-DERBY-3917-52d76403
DERBY-3917; skip fixture testCurrentRoleInWeirdContexts and 1 test case in fixture testDefaultCurrentRole in lang.RolesConferredPrivilegesTest with JSR169. Patch contributed by Dag H. Wanvik. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@713533 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3922-d4f93087
DERBY-3922: Support for adding generated columns via ALTER TABLE. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@709152 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java", "hunks": [ { "added": [ "import java.util.HashSet;" ], "header": "@@ -81,6 +81,7 @@ import java.lang.reflect.Modifier;", "removed": [] }, { "added": [ " ...
derby-DERBY-3925-fc061da9
DERBY-3925 - testMetaDataQueryRunInSYScompilationSchema(.....upgradeTests.Changes10_4) fails on CVM/phoneME Use 'territory=en' instead of 'territory=no' if the 'no' locale is not available. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@823555 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3926-200a5ea7
DERBY-3926 Following is the patch description for DERBY-3926. The problem with the trunk codeline is that when optimizer goes through optimizables in a join order, it only looks at those optimizables individually to decide whether sorting can be avoided on them or not. That approach leaves out few queries which require sorting but do not get sorted. The decision for avoiding sorting should also include relationship between the optimizables in a given join order. Following query demonstrates the trunk problem SELECT table1.id, table2.value, table3.value FROM --DERBY-PROPERTIES joinOrder=FIXED table3 -- DERBY-PROPERTIES index=nonUniqueOnValue_Table3 , table2 -- DERBY-PROPERTIES index=nonUniqueOnValue_Table2 , table1 WHERE table1.id=table2.id AND table2.name='PageSequenceId' AND table1.id=table3.id AND table3.name='PostComponentId' AND table3.value='21857' ORDER BY table2.value; In the query above, when optimizer is considering [table3, table2, -1] join order, it determines that sorting can be avoided on this join order because the order by column table2.value is already covered by the index nonUniqueOnValue_Table2. It does not see that the outermost optimizable table3 will qualify more than one row and hence it will be a multi-row resulset and for each one of those rows, we will be doing a scan into table2. In other words, there will be multiple scans into table2(and the rows returned by each one of those scans will be ordered on table2.value) but the collective rows from those multiple scans are not necessarily going to be ordered on table2.value. This patch is attempting to fix that problem. Currently, in trunk, a column is marked always ordered during a query processing when the optimizer finds that there is constant comparison predicate on the order by column. If the column does not have a constant predicate (as in our example above), we next see if we are using an index which will provide the required ordering on column (which is true in our case. The required ordering on table2.value is provided by the index nonUniqueOnValue_Table2). But as we can see in the query above, this index coverage is not enough to say that sorting is not needed. We need to add 2 more conditions before we can decide to avoid the sorting. One of those cases is 1)if the order by column does not belong to the outermost optimizable, then check if the order by column's optimizable is a one-row resultset. If yes, then it will be safe for the optimizer to avoid the sorting. The second case to consider is 2)if the order by column does not belong to the outermost optimizable, then check if the order by column's optimizable is multi-row resultset BUT all the outer optimizables are one-row resulsets. If either of these 2 additional conditions are satisfied then optimizer can choose to avoid the sorting. Otherwise sorting should be added to the query plan. The example query above does not satisfy the 2 additional checks and hence sorting should be done as part of the query plan. The changes for the 1)check above has gone into OrderbyByList.sortRequired(RowOrdering, JBitSet, OptimizableList). The implementation of this change just required us to check the outer optimizables to be one row since the order by column's optimizable is not one row. If outer optimizables are all one-row, then we say that sorting can be avoided. Otherwise sorting is required. The changes for the 2)check above has gone into FromBaseTable.nextAccessPath(Optimizer optimizer, OptimizablePredicateList predList, RowOrdering rowOrdering) The implementation of this change requires us to see if the order by column is involved in equijoin with outer optimizable's indexed column. If yes, then we know that since outer optimizable is ordered, the rows qualified via the equijoin will also be ordered and hence sorting can be avoided. But if this is not true, then we can't rely on outer optimizables' rows to be ordered on the order by column. To avoid sorting, we need to identify this case 2) as another case when the column can be marked as always ordered and that is when there is an equijoin predicate on the order by column with some other column which is already known to be always ordered. Taking the query from wisconsin as an example will explain this behavior select * from --DERBY-PROPERTIES joinOrder=FIXED TENKTUP1 -- DERBY-PROPERTIES index=TK1UNIQUE1 , TENKTUP2 -- DERBY-PROPERTIES index=TK2UNIQUE1 where TENKTUP1.unique1 = TENKTUP2.unique1 order by TENKTUP1.unique1, TENKTUP2.unique1; For the above query, as per the current trunk codeline, none of the order by columns are marked as always ordered because there is no constant comparison predicate on them. But, for the given join order, with TENKTUP1 as the outermost resultset and with the index TK1UNIQUE1, we know that the current row ordering at this point is going to ensure that rows from TENKTUP1 are ordered on UNIQUE1. Next, when we process TEKTUP2 in the 2nd join order position, we find that there is no constant predicate on TENKTUP2.unique1 and hence we conculde that the rows from TENKTUP2 are not going to be ordered and we decide to force a sort node on the top of the query. But in reality, even though the outer optimizable is not a single row resultset, it is ordered on TENKTUP1.unique1 and hence all those rows from outer optimizable are going to be ordered on TENKTUP1.unique1 and the inner optimizable has an equality join on TENKTUP1.unique1 using the order by column TENKTUP2.unique1 What that translates to is that even if there will be multiple scans into TENKTUP2, the rows qualified are going to be all ordered because of the equijoin between the outer and inner optimizables on the order by columns. So, with my latest patch, I have expanded the notion of always ordered columns to include both constant comparison predicates AND ordered column that has equijoin with an outer optimizable's ordered column. I think this patch is also improving the existing queries to include a better path than what it was picking up before. Following is an example of one such query from wisconsin. select * from TENKTUP1, TENKTUP2 where TENKTUP1.unique1 = TENKTUP2.unique1 and TENKTUP2.unique1 < 100 order by TENKTUP1.unique1; For this query, the trunk currently decides to use TENKTUP1 as the outermost optimizable using the TK1UNIQUE1 index and then those rows are filtered using TENKTUP2.unique1 < 100. Each of the 2 tables involved in the query have 10000 rows each. So we are going through 10000 qualified indexed rows from TENKTUP1 and then applying TENKTUP2.unique1 < 100 on them. With the attached patch, we use TENKTUP2 as the outermost optimizable with the index TK2UNIQUE1 and only gets the indexed rows which satisfy TENKTUP2.unique1 < 100 and then on them, we use the equlity join to fetch qualified rows from TENKTUP1. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@783168 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/compile/RequiredRowOrdering.java", "hunks": [ { "added": [ "import org.apache.derby.impl.sql.compile.PredicateList;" ], "header": "@@ -24,6 +24,7 @@ package org.apache.derby.iapi.sql.compile;", "removed": [] ...
derby-DERBY-3926-397f968f
DERBY-4331 Fixes a number of sort avoidance bugs that were introduced by the fix for DERBY-3926. This check in backs out the equi-join part of the DERBY-3926. The changes for this were isolated and were the only changes to FromBaseTable.java. Backing out only this part of the 3926 checkin fixes new problems identified in DERBY-4331, and continues to fix the problem queries in DERBY-3926. Knowledge of equijoin is no longer used as a factor for sort avoidance. Also included is an update to the wisconsin tests. A number of diffs resulted from different join order to maintain a sort avoidance plan. 2 queries identified in DERBY-4339 no longer use sort avoidance. The new test cases were reported as part of 4331 were added to the OrderByAndSortAvoidance test. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@801481 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java", "hunks": [ { "added": [], "header": "@@ -462,13 +462,6 @@ public class FromBaseTable extends FromTable", "removed": [ "\t\t\t\t\t//Check if the order by column has equijoin on another ", ...
derby-DERBY-3926-8f4810aa
DERBY-3926 Tars Joris contributed a new reproducible script(test-script.zip) which has been granted to ASF for inclusion. I changed the junit test which I added last week to be based on this new script. The changes involved were data change only. The actual test cases in the junit test did not require any changes. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@769147 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3931-31887565
DERBY-3931: Make generated columns tests independent so that they will run smoothly on platforms which run the test cases in reverse alphabetical order. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@709161 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3932-9a9b9326
DERBY-3932: Add basic tests of permissions on generated columns. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@713158 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3934-4987173e
DERBY-3934: Removed unused method 'readUnsignedShort' from UTF8Reader. Patch file: derby-3934-6a-UTF8Reader_remove_method.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@742380 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java", "hunks": [ { "added": [], "header": "@@ -592,25 +592,6 @@ readChars:", "removed": [ " /**", " * Decode the length encoded in the stream.", " * ", " * This ...
derby-DERBY-3934-71dca8c7
DERBY-3934: Improve performance of reading modified Clobs. There are two major changes with this patch: a) The implementation of getInternalReader improves the performance of getSubString significantly. This benefits the embedded driver too, but it is crucial for the performance of all read operations on Clob from the client driver. Again, the mechanism used to get better performance is to keep an internal reader around to avoid repositioning on every request. b) Added caching and updating of the Clob character length. Also added some tests for verifying that the Clob length is handled correctly. Patch file: derby-3934-4a-getinternalreader_cachedlength.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@726683 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/TemporaryClob.java", "hunks": [ { "added": [ "import java.io.FilterReader;" ], "header": "@@ -24,6 +24,7 @@ package org.apache.derby.impl.jdbc;", "removed": [] }, { "added": [ "imp...
derby-DERBY-3934-910b77f0
DERBY-3934 (partial): Improve performance of reading modified Clobs. The following files are touched (all in derby.impl.jdbc): *** EmbedClob. Updated call to ClobUpdatableReader. The change of the position argument is intentional. *** TemporaryClob Replaced the ClobUpdatableReader returned by getReader with a UTF8Reader. Internal handling of TemporaryClob should deal with changing contents specifically, or create a ClobUpdatableReader where required. Note also the use of the new CharacterStreamDescriptor class. This piece of code will probably be changed later on, when there is more information about the stream available. For instance, caching byte/char positions allows to skip directly to the byte position through the underlying file API. This way, we don't have to decode all the raw bytes to skip the correct number of chars. *** ClobUpdatableReader More or less rewritten. It now uses the new methods exposed by InternalClob to detect changes in the underlying Clob content. Note that this class doesn't handle repositioning, only detection of changes and forwarding of read/skip calls. Note the lazy initialization of the underlying reader. WARNING: There is one thing missing, which is proper synchronization. Access to store will be synchronized in other locations, but this class is not thread safe. I haven't decided yet whether to synchronize on the reader object or the root connection. I think the latter is the best choice. Does anyone know anything about the cost of taking locks on the same object multiple times? *** StoreStreamClob Replaced old UTF8Reader constructor with the new one. Again, this code needs to be updated when more information about the stream is available. This is to allow UTF8Reader to perform better. *** UTF8Reader Added a new constructor, using the new CharacterStreamDescriptor class. Removed one constructor. Retrofitted the second old constructor to use CharacterStreamDescriptor. This will be removed when the calling code has been updated. The old method calculating the buffer size will also be removed. Stopped referencing PositionedStoreStream, using PositionedStream interface instead. This allows the positioning logic to be used for both store streams and LOBInputStream streams. The reader has been prepared to be able to deal with multiple data offsets, i.e. handling several store stream formats. For instance, the current implementations has an offset of two bytes, where as the planned new one will have an offset of at least five bytes. LOBInputStream has an offset of zero bytes (no header information). From now on, position aware streams are not closed as early as before, because we might have go backwards in the stream. Streams that can only move forwards are closed as soon as possible (as before). Note that this patch doesn't fix the most serious performance issue. This will be done in a follow-up patch by implementing getInternalReader in TemporaryClob. Patch file: derby-3934-3a-clobupdreader_utf8reader.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@724294 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/StoreStreamClob.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.jdbc.CharacterStreamDescriptor;" ], "header": "@@ -32,6 +32,7 @@ import java.io.Writer;", "removed": [] }, { "add...
derby-DERBY-3934-9b9c25ad
DERBY-3934: Added two tests for Clob modifications (character replacement). Patch file: derby-3934-1a-clob_replace_test.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@720767 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3934-a694c19f
DERBY-3934: Improve performance of reading modified Clobs. Removed deprecated constructor and adjusted calling code. Patch file: derby-3934-5a-UTF8Reader_cleanup.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@736000 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java", "hunks": [ { "added": [], "header": "@@ -35,7 +35,6 @@ import java.sql.Blob;", "removed": [ "import java.net.URL;" ] }, { "added": [ "import org.apa...
derby-DERBY-3934-d9319b8e
DERBY-3934: Improve performance of reading modified Clobs. Added two new methods to InternalClob; - getUpdateCount - isReleased These methods can be used to detect if the contents have been changed, for instance by streams reading from the internal Clob representation. Patch file: derby-3934-2a-intclob_new_methods.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@721162 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/InternalClob.java", "hunks": [ { "added": [ " /**", " * Returns the update count of the Clob.", " * <p>", " * The update count is increased each time a modification of the Clob", ...
derby-DERBY-3941-081a08c2
DERBY-3941: Clean up import statements in StoredPage Contributed by Yun Lee. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@765943 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java", "hunks": [ { "added": [ "import java.io.ByteArrayInputStream;", "import java.io.ByteArrayOutputStream;", "import java.io.EOFException;", "import java.io.IOException;", ...
derby-DERBY-3941-a5d378d2
DERBY-3941: Unsafe use of DataInput.skipBytes() Replaced calls to DataInput.skipBytes() with new utility method DataInputUtil.skipFully(). Patch contributed by Yun Lee. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@766163 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/classfile/ClassInvestigator.java", "hunks": [ { "added": [ "import java.io.IOException;", "import java.util.Collections;", "", "import org.apache.derby.iapi.services.io.DataInputUtil;" ], ...
derby-DERBY-3944-06ac9fb4
DERBY-3944: Always compile CHECK constraints in the schema of the target table. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@964402 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java", "hunks": [ { "added": [ " CompilerContext compilerContext = getCompilerContext();", " ", "\t\tcompilerContext.pushCurrentPrivType( Authorizer.NULL_PRIV);" ], ...
derby-DERBY-3945-01aa1762
DERBY-3945: Resolve unqualified function names in generation clauses against the current schema from DDL rather than DML time. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@719123 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/catalog/types/DefaultInfoImpl.java", "hunks": [ { "added": [ " private String originalCurrentSchema;" ], "header": "@@ -56,6 +56,7 @@ public class DefaultInfoImpl implements DefaultInfo, Formatable", ...
derby-DERBY-3947-e594ab0b
DERBY-3947: Cannot insert 994 char string into indexed column A table created with "CREATE TABLE t (x varchar(1000) primary key)" could encounter problems when a particularly long value of "x" was inserted, because the index that was automatically created to support the PRIMARY KEY constraint was created with a small page size. Such an insert statement would get an error like: "Limitation: Record of a btree secondary index cannot be updated or inserted due to lack of space on the page." This change enhances TableElementList so that, when creating an index for a constraint, it now checks the approximate length of the columns in the index, and, if they are sufficiently long, automatically chooses a larger default page size for the index conglomerate. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@886162 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/TableElementList.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.reference.Property;", "import org.apache.derby.iapi.services.property.PropertyUtil;" ], "header": "@@ -25,6 +25,8 @@ import...
derby-DERBY-3948-6a17f800
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements Reject references to generated columns in the NEW transition variables of BEFORE triggers, as required by the SQL standard. See also DERBY-3948. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1527489 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3948-e7354480
DERBY-3948: Forbid references to generated columns in the NEW variable of BEFORE triggers. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@718707 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList;" ], "header": "@@ -34,6 +34,7 @@ import org.apache.derby.iapi.sql.compile.CompilerContext;", ...
derby-DERBY-395-22ccbb42
DERBY-395 Server-side "trace on" and "trace off" commands do not appear to be working correctly. Contributed by Bryan Pendleton Attached is a proposed fix. derbyall passed. I put a small comment in the code. I didn't add any new tests, which is unfortunate, but I didn't have any brilliant inside about an easy way to add such tests. Testing with the server tracing is already somewhat of a PITA because the server tracing interacts poorly with things like the security manager. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@373291 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/ClientThread.java", "hunks": [ { "added": [], "header": "@@ -30,8 +30,6 @@ final class ClientThread extends Thread {", "removed": [ "\tprivate String traceDir;", "\tprivate boolean traceAll;" ] },...
derby-DERBY-3950-97a8b1c7
DERBY-3950: Prevent driving SELECTs from overriding the values of generated columns. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@718381 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java", "hunks": [ { "added": [ " private boolean wasDefault;" ], "header": "@@ -88,6 +88,7 @@ public class ResultColumn extends ValueNode", "removed": [] }, { "added":...
derby-DERBY-3955-1b72b60b
DERBY-3955; test lang/selectivity.sql can be revived committing patch 3 - which adds the remaining test cases from selectivity.sql to SelectivityTest.java git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1560247 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3956-f9cb8886
DERBY-3956: Remove method TemplateRow.checkPartialColumnTypes Deleted the method, which always returned true and was only called from withing debug blocks (sane builds). Patch file: derby-3956-1a.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@719008 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java", "hunks": [ { "added": [], "header": "@@ -1541,10 +1541,6 @@ public abstract class BTreeScan extends OpenBTree implements ScanManager", "removed": [ " ", " ...
derby-DERBY-3964-03972928
DERBY-3964: Fix NPE in evaluation of generated columns while processing an ON DELETE SET NULL referential action. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@722623 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java", "hunks": [ { "added": [], "header": "@@ -575,7 +575,6 @@ abstract class DMLModStatementNode extends DMLStatementNode", "removed": [ " " ] }, ...
derby-DERBY-3966-99494f14
DERBY-3966: Make 1.4 JDK optional when building Derby. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@726092 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyPreBuild/PropertySetter.java", "hunks": [ { "added": [ " if ( j14lib != null ) { setClasspathFromLib(J14CLASSPATH, j14lib, true ); }", " if ( j15lib != null ) { setClasspathFromLib(J15CLASSPATH, j15lib, true ); }" ...
derby-DERBY-3969-b8b524c0
DERBY-3969: Fix NPEs when declaring constraints on generated columns without explicit datatypes. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@723184 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java", "hunks": [ { "added": [ "\t{", " return getResultColumn( columnName, true );", "\t}", "", "\t/**", "\t * Get a ResultColumn that matches the speci...
derby-DERBY-3970-dd2650ff
DERBY-3970: PositionedStoreStream doesn't initialize itself properly. Makes PositionedStoreStream initialize itself properly by calling initStream and resetStream on the underlying Resetable. Patch file: derby-3970-1a-PositionedStoreStream_init.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@722812 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java", "hunks": [ { "added": [ " myStream = new PositionedStoreStream(dvdStream);" ], "header": "@@ -195,18 +195,8 @@ final class EmbedBlob extends ConnectionChild implements Blob, EngineLOB", ...
derby-DERBY-3972-7b9c4ca8
DERBY-3972; patch 3 modifies 2 tests to optionally take a property for a different initial context factory than sun's git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@741227 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3975-92941262
DERBY-3975: SELECT DISTINCT may return duplicates with territory-based collation Made the implementation of hashCode() in the collation-sensitive subclasses of SQLChar consistent with the collation-sensitive implementations of equals(), compareTo() and stringCompare(). Also extended CollationTest with tests for SELECT DISTINCT on strings that contain different characters but are considered equal in French locale. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@728822 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SQLChar.java", "hunks": [ { "added": [ " if (SanityManager.DEBUG) {", " SanityManager.ASSERT(!(this instanceof CollationElementsInterface),", " \"SQLChar.hashCode() does not wo...
derby-DERBY-3977-4d20e641
DERBY-3977: Clob.truncate with a value greater than the Clob length raises different exceptions in embedded and client driver. Changed the exception thrown in the embedded driver when calling Clob.truncate with a length greater than the Clob length from XJ076 to XJ079 (see also release note). The client and the embedded driver behavior is now consistent. Updated tests. Patch file: derby-3977-1a-change_emb_exception.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@726695 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3978-a63282c4
DERBY-3978: Clob.truncate(long) in the client driver doesn't update the cached Clob length. Make the client driver update the length of the Clob when it has been truncated.Added a few tests. Patch file: derby-3978-1a-regression_tests.diff, derby-3978-2a-update_length.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@724657 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3980-11850ac0
DERBY-3980 Conflicting select then update with REPEATABLE_READ gives lock timeout instead of deadlock Just javadoc changes and adding a new test for the issue that can't be enabled until we have a fix. This check-in does not fix the issue in any way. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@726121 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/locks/Deadlock.java", "hunks": [ { "added": [ "\t * Walk through the graph of all locks and search for cycles among", "\t * the waiting lock requests which would indicate a deadlock. A simple", "\t * deadlock c...
derby-DERBY-3980-e0699eac
DERBY-3980: Conflicting select then update with REPEATABLE_READ gives lock timeout instead of deadlock DERBY-5073: Derby deadlocks without recourse on simultaneous correlated subqueries Added more comments describing the deadlock detection algorithm. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1084561 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/locks/Deadlock.java", "hunks": [ { "added": [ " * <p>", " * Code to support deadlock detection.", " * </p>", " *", " * <p>", " * This class implements deadlock detection by searchi...
derby-DERBY-3981-1aa5b64d
DERBY-3981: Improve distribution of hash codes in SQLBinary and SQLChar git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@731929 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/SQLChar.java", "hunks": [ { "added": [ " /**", " * The pad character (space).", " */", " private static final char PAD = '\\u0020';", "" ], "header": "@@ -112,6 +1...
derby-DERBY-3981-dd584838
DERBY-3981: Improve distribution of hash codes in SQLBinary and SQLChar Added a performance test which shows the worst-case behaviour of the current hash function. The test performs SELECT DISTINCT on a CHAR(5) column and on a CHAR(5) FOR BIT DATA column. The current hash function maps all the rows in the test to the same bucket and the hash table used for elimination of duplicates becomes a linked list. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@730689 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3982-daa4827a
DERBY-3982: Commit Ole's DERBY-3982_p2_diff.txt patch, which makes it easy to specify patch releases as starting points for the upgrade tests. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@728024 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3988-636e8e5f
DERBY-3988: Second attempt to always build the JDBC4 support when compiling Derby. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@728693 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyPreBuild/PropertySetter.java", "hunks": [ { "added": [ " private static final String J16LIB = \"j16lib\";", " private static final String J16CLASSPATH = \"java16compile.classpath\";" ], "header": "@@ -96,6 ...
derby-DERBY-3989-a8132ce4
DERBY-3989 / DERBY-4699 Made PropertySetter ignore Java 6 libraries if a Java 5 compiler is used. If j16lib is specified explicitly in such an environment, the build will be aborted (an error message will be displayed to the user). Patch file: derby-3989-02-aa-dontUseJava6LibsWithJava5Compiler.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@954421 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyPreBuild/PropertySetter.java", "hunks": [ { "added": [ " if ( j14lib != null ) {", " debug(\"'j14lib' explicitly set to '\" + j14lib + \"'\");", " setClasspathFromLib(J14CLASSPATH, j14l...
derby-DERBY-3989-d6b04208
DERBY-3989: Allow the build to succeed on machines which have a Java 6 environment but not a Java 5 environment. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@734242 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/build/org/apache/derbyPreBuild/PropertySetter.java", "hunks": [ { "added": [ " * <li>java16compile.classpath</li>" ], "header": "@@ -46,6 +46,7 @@ import org.apache.tools.ant.taskdefs.Property;", "removed": [] }, { "added": ...
derby-DERBY-3991-979d9e84
DERBY-3991: Clob.truncate(0) throws exception. Allows a Clob to be truncated to a length of zero characters (empty string). Patch contributed by Yun Lee <yun.lee.bj@gmail.com>. Patch file: derby-3991-3.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@764800 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-3993-8d23f446
DERBY-3993 With IBM 1.6 T_RawStoreFactory fails with There should be 0 observers, but we still have 1 observers on Win 2K The problem will only show up in SANE builds as that is the only time we do the sanity check. Xact.doComplete() is called near the end of the transaction to take care of any cleanup prior to committing or aborting the transaction. It calls notifyObservers(commitOrAbort) and it expects on return that each observer has been notified, and all the observers are coded to delete themselves from the observer list as part of this process. It then asserts that the list should be empty on return. The problem is that one of the DropOnCommit observer as part of it's processing manages to add another observer to the list. I am guessing that the problem becomes intermittent because either different JVM's/memory layouts/hash algorithms result in the order processing of the observer list to be different, or different implementations handle the adding of an observer to the list while scanning the list differently. There is nothing in the Observable javadoc that guarantees and order or says anything about expected behavior of notifyObservers() execution if another observer is added during the execution so I don't think it is a jvm bug. In my case in order to process a drop of a container marked drop on commit the raw store interface requires it to first be opened. The code adds a TruncateOnCommit as part of this open as that layer of the code does not know why it is being opened. I believe it is this "new" TruncateOnCommit observer which is left on the observer queue. Adding an extra notify to the drop on commit processing seems to fix the unit test, I'll see if that causes any problems in the full set of tests. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1082197 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/data/DropOnCommit.java", "hunks": [ { "added": [ "", "\t\t\t\tSanityManager.THROWASSERT(\"still on observer list \" + this);", "\t\tif (arg.equals(RawTransaction.COMMIT) || ", " arg.equals...