id
stringlengths
22
25
commit_message
stringlengths
137
6.96k
diffs
listlengths
0
63
derby-DERBY-2799-0ce4bbb6
DERBY-2799: Intermittent failure in lang/deadlockMode.java Fixed problem with ordering of the output. Also added main method to LangHarnessJavaTest to allow easier testing of a single harness test. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@545873 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2805-cf530d5c
DERBY-2805: Fix FromVTI to not throw an ASSERT when sort elimination occurs. In particular this patch does the following: 1 - Renames the "markOrderingDependent()" method and related variables to reflect their use, which is to indicate that the optimizer has eliminated a sort and thus that the underlying result sets *may* need to make adjustments to compensate for the dropped sort. At the moment the only result set node which needs to make such an adjustment is IndexRowToBaseRowNode. 2 - Updates comments where appropriate to more explicitly describe the intended use of the "adjustForSortElimination()" method (which is what "markOrderingDependent()" was renamed to). 3 - Adds a void implementation of "adjustForSortElimination()" to the FromVTI class since that class doesn't need to make any adjustments. This void method is what solves the failure reported in DERBY-2805. 4 - Adds appropriate test cases to a new fixture in the existing lang/SysDiagVTIMappingTest JUnit test. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547066 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/SelectNode.java", "hunks": [ { "added": [ "\t\tboolean\t\t\t\teliminateSort = false;" ], "header": "@@ -1206,7 +1206,7 @@ public class SelectNode extends ResultSetNode", "removed": [ "\t\tboole...
derby-DERBY-2806-6b5cc244
DERBY-2818: Rewrite ClobUpdateableReader constructors. Preparation for DERBY-2806. Patch file: derby-2818-1a.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547296 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/ClobUpdateableReader.java", "hunks": [ { "added": [ " private InputStream stream = null;" ], "header": "@@ -48,7 +48,7 @@ final class ClobUpdateableReader extends Reader {", "removed": [ " priva...
derby-DERBY-2806-ddb70fe3
DERBY-2806: Fix a test failure in ClobUpdatableReaderTest (testMultiplexedOperationProblem). The patch also cleans up the tests in general (the diff is so large because I removed a try - finally and had to reindent the block). Patch file: derby-2806-3a-test_fix_and_cleanup.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547461 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2806-f839f5e0
DERBY-2806: Added a position-aware stream that can be repositioned on request. This was needed to support multiplexed operations on Clob, specifically involving streams. The code is isolated to Clobs on top of a stream from store (read-only), with the exception of UTF8Reader which is also used for other Clobs (temporary, modifiable ones). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547422 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/StoreStreamClob.java", "hunks": [ { "added": [ " private final PositionedStoreStream positionedStoreStream;" ], "header": "@@ -66,7 +66,7 @@ final class StoreStreamClob", "removed": [ " private ...
derby-DERBY-2807-6b141721
DERBY-2807: Patch adds BLOB/CLOB testing to the compatibility testing framework git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@599836 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java", "hunks": [ { "added": [ " /**", " * Equivalent to \"defaultSuite\" as defined above, but assumes a server", " * has already been started. ", " * Does NOT decora...
derby-DERBY-2809-3233189a
DERBY-2809 (cleanup) Rename bind method to bindOperand() in UnaryOperatorNode since that correctly reflects its role. Change sub-classes to call the node correctly. Move some of the logic from UnaryOperatorNode.bindOperator() to the actual sub-classes where it logically lives. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@548822 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java", "hunks": [ { "added": [ " bindOperand( fromList, subqueryList, aggregateVector);" ], "header": "@@ -81,7 +81,7 @@ public final class DB2LengthOperatorNode extends UnaryOperato...
derby-DERBY-2809-ac12b1fc
DERBY-2809 (cleanup) Remove need for specific method indicating a node is a unary +/- with a parameter node, it can be handled consistently by the method ValueNode.isParameterNode(). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@552070 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CastNode.java", "hunks": [ { "added": [ " // Obviously the type of a parameter that", " // requires its type from context (a parameter)", " // gets its type from the type of the CAST.", ...
derby-DERBY-2809-b9599450
DERBY-2809 Add test cases for non-boolean unary operators in case expressions. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@551764 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2809-e2f08d22
DERBY-2809 (partial) Cleanup the handling of nodes under UnaryOperatorNode to ensure parameters (nodes requiring type to be set from the context) are handled consistently. This includes moving logic to the node (UnaryArithmeticOperatorNode) that "owns" it rather than having it in the parent class (UnaryOperatorNode). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@551183 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java", "hunks": [ { "added": [], "header": "@@ -52,23 +52,6 @@ public class UnaryArithmeticOperatorNode extends UnaryOperatorNode", "removed": [ "", "\t//when the bindExpres...
derby-DERBY-2811-87264765
DERBY-2811: Use internal variable name for host parameter in default security policy; and handle hostname wildcard :: git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547521 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetworkServerControl.java", "hunks": [ { "added": [ "\tprivate final static String IPV6_HOSTNAME_WILDCARD = \"::\";" ], "header": "@@ -178,6 +178,7 @@ public class NetworkServerControl{", "removed": [] }, ...
derby-DERBY-2811-f69e1a28
DERBY-2811: Handle special 0.0.0.0 wildcard as host parameter when installing the server's security manager. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547230 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/drda/NetworkServerControl.java", "hunks": [ { "added": [ "\tprivate final static String DERBY_HOSTNAME_WILDCARD = \"0.0.0.0\";", "\tprivate final static String SOCKET_PERMISSION_HOSTNAME_WILDCARD = \"*\";" ], "header": "...
derby-DERBY-2818-6b5cc244
DERBY-2818: Rewrite ClobUpdateableReader constructors. Preparation for DERBY-2806. Patch file: derby-2818-1a.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547296 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/ClobUpdateableReader.java", "hunks": [ { "added": [ " private InputStream stream = null;" ], "header": "@@ -48,7 +48,7 @@ final class ClobUpdateableReader extends Reader {", "removed": [ " priva...
derby-DERBY-2822-6f9cd955
DERBY-2822: Add caching of store stream length in StoreStreamClob, if appropriate. StoreStreamClob is a read-only representation of a Clob, and will now cache the character length after it has been obtained the first time. Getting the length initially is still expensive, as the UTF-8 data stream has to be decoded. Patch file: derby-2822-1b-cacheCharLength.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@708912 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/StoreStreamClob.java", "hunks": [ { "added": [ " /**", " * The cached length of the store stream in number of characters.", " * A value of {@code 0} means the length is unknown, and zero is an invalid", ...
derby-DERBY-2824-2dce4aba
DERBY-2824: Improved error reporting when encountering invalid encodings and other error situations. Patch file: derby-2824-3b-improved_error_reporting.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@568086 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java", "hunks": [ { "added": [ " private static final String READER_CLOSED = \"Reader closed\";" ], "header": "@@ -37,6 +37,7 @@ import org.apache.derby.iapi.types.Resetable;", "removed": [] ...
derby-DERBY-2824-48152c29
DERBY-2824: Improve error reporting, fix whitespace/formatting issues and replace tabs in UTF8Reader. This commit fixes and improves the JavaDoc. Patch file: derby-2824-4a-javadoc.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@581934 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java", "hunks": [ { "added": [ " * Class for reading characters from streams encoded in the modified UTF-8", " * format.", " * <p>", " * Note that we often operate on a special Derby stream.", ...
derby-DERBY-2824-fe27d9d4
DERBY-2824: Improve error reporting, fix whitespace/formatting issues and replace tabs in UTF8Reader. Whitespace changes only. Patch file: derby-2824-2a-whitespace_changes.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547694 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java", "hunks": [ { "added": [ " private final long utfLen; // bytes", " private long utfCount; // bytes", " private long readerCharCount; // characters", "...
derby-DERBY-2827-b0c495f8
DERBY-2827: Rename ClobStreamControl to TemporaryClob. Updated all affected classes. Patch file: derby-2827-1a.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547657 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/ClobUtf8Writer.java", "hunks": [ { "added": [ " private TemporaryClob control; " ], "header": "@@ -35,7 +35,7 @@ import org.apache.derby.iapi.services.i18n.MessageService;", "removed": [ " pr...
derby-DERBY-2830-a535ea90
DERBY-2830: Rename UpdateableBlobStream to UpdatableBlobStream. Also renames the corresponding test class and all affected classes. Patch file: derby-2830-1b.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@547715 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java", "hunks": [ { "added": [ " return new UpdatableBlobStream (this, " ], "header": "@@ -458,7 +458,7 @@ final class EmbedBlob extends ConnectionChild implements Blob", "removed":...
derby-DERBY-2831-62299081
DERBY-2831 Forgot to enter a test case during 551793 checkin. This commit just creates a function in non-existent database to ensure we don't throw null pointer exception. In addition, this commit also makes sure that we associate correct collation information with the character string parameters to procedures when the procedure gets created in CreateAliasNode. We already do this for function but similar work needs to happen for procedures. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@551942 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java", "hunks": [ { "added": [ "\t * or procedure in it's init method, which is called by the parser. But at ", "\t * that time, we do not have the SchemaDescriptor ready to determine the ", ...
derby-DERBY-285-2abb2b2c
Fix for DERBY-285 Network Client should not print non-ascii token separators in message when it cannot connect to the server to retrieve the error message This patch changes network server to send the complete message in its own locale instead of just the message arguments and delimiters if the exception is severe enough to terminate the connection. This will eliminate the special characters and provide a more readable message. I also cleaned up the code a bit in this area. I removed the extra logging for the severe exceptions as these will already be logged as part of the normal Derby error logging. git-svn-id: https://svn.apache.org/repos/asf/incubator/derby/code/trunk@180107 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DRDAConnThread.java", "hunks": [ { "added": [], "header": "@@ -5086,7 +5086,6 @@ public class DRDAConnThread extends Thread {", "removed": [ "\t\tString severeExceptionInfo = null;" ] }, { "ad...
derby-DERBY-2861-7ae131ba
DERBY-2861 Thread safety issue in TableDescriptor Patch derby-2861-2, which solves the issue by make session local state in TableDescriptor thread local. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@670286 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java", "hunks": [ { "added": [ "import java.util.WeakHashMap;" ], "header": "@@ -24,6 +24,7 @@ package org.apache.derby.iapi.sql.dictionary;", "removed": [] }, { "a...
derby-DERBY-2871-b1d6f8e9
DERBY-2871 - revert revision 552621, it causes an intermittent problem. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@553028 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2871-bb9f97a7
DERBY-2871: XATransactionTest gets XaException: Error executing a XAResource.commit(), server returned XAER_PROTO. Patch contributed by Julius Stroffek Patch file: derby-2871.v2.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@647078 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.jdbc.ResourceAdapter;", "import org.apache.derby.iapi.services.monitor.Monitor;", "import org.apache.derby.iapi.store.access.xa.XAXactId;", ...
derby-DERBY-2871-d4cbc63f
DERBY-2871; modifying timeout in test XATransactionTest. Patch contributed by Julius Stroffek git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@552621 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2878-47efb9bf
DERBY-2878 (partial) Scan protection handle could be cached in BasePage This patch is the first step towards eliminating the allocation of protection handles. It adds a method to Page/BasePage called getProtectionRecordHandle(). This method creates a new record handle if it hasn't been called before and returns a cached value otherwise. B2IRowLocking3.lockScan() and lockScanForReclaimSpace() have been modified to use the new method. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@551933 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/btree/index/B2IRowLocking3.java", "hunks": [ { "added": [ " current_leaf.getPage().getProtectionRecordHandle();" ], "header": "@@ -665,8 +665,7 @@ class B2IRowLocking3 implements BTreeLockingPolicy",...
derby-DERBY-2878-bbcc9236
DERBY-2878: Scan protection handle could be cached in BasePage Don't allocate a new RecordHandle and PageKey in unlockScan(). 1) Replaced the field current_scan_pageno (a long) in BTreeRowPosition with current_scan_protectionHandle (a RecordHandle which is cached in BasePage) 2) Changed the signature of BTreeLockingPolicy.unlockScan() to take a RecordHandle 3) Removed unused method OpenBTree.makeRecordHandle() git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@557507 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeLockingPolicy.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.store.raw.RecordHandle;" ], "header": "@@ -24,6 +24,7 @@ package org.apache.derby.impl.store.access.btree;", "remove...
derby-DERBY-2878-fabdf938
DERBY-2878 (partial) Scan protection handle could be cached in BasePage Factor out common code in BTreeScan for unlocking the current scan. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@552677 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java", "hunks": [ { "added": [ " unlockCurrentScan(pos);" ], "header": "@@ -718,8 +718,7 @@ public abstract class BTreeScan extends OpenBTree implements ScanManager", "removed": [...
derby-DERBY-2879-a9dbccec
DERBY-2879 Derby currently requires all the character columns in a table to have the same collation as the collation of the schema in which the table is getting defined. In order to implement this behavior, CreateTableNods's bind method will check the collation of it's character columns against the schema's collation and if there is a mismatch, an exception will be thrown. In addition, this patch does minor cleanup. The string constants for the 2 collation types in Derby were declared in both StringDataValue.java and Property.java I have removed it from StringDataValue so we don't have duplicate constants. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@552531 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/catalog/types/TypeDescriptorImpl.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.reference.Property;" ], "header": "@@ -28,6 +28,7 @@ import org.apache.derby.catalog.TypeDescriptor;", "removed": [] } ...
derby-DERBY-2885-9858f6f4
DERBY-2885 (cleanup) Some more cleanup of EmbedConnection.clearLOBMapping(): 1) Store the map in a local variable instead of calling getlobHMObj() a number of times. 2) Replace two disjoint if statements with if/else-if + THROWASSERT if none of them matches. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@552325 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "hunks": [ { "added": [ "\t\tHashMap map = rootConnection.lobHashMap;", "\t\tif (map != null) {", "\t\t\tfor (Iterator it = map.values().iterator(); it.hasNext(); ) {", "\t\t\t\tObj...
derby-DERBY-2887-cc30c0c4
DERBY-2887: NULLS FIRST/LAST for ORDER BY This change implements the SQL Standard 10.10 Sort Specification List feature: <null ordering :== NULLS FIRST | NULLS LAST The implementation adds a new boolean argument to the DataType.compare() function to allow control over whether NULL values should be compared as lower than non-NULL values or as higher. The change also adds code to the parser to recognize the new syntax, and to pass it to the execution layer via the compiler data structures. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@567314 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/DataValueDescriptor.java", "hunks": [ { "added": [ "\t * that is, it treats SQL null as equal to null and greater than all" ], "header": "@@ -720,7 +720,7 @@ public interface DataValueDescriptor extends Storable, Orde...
derby-DERBY-289-b175fd27
DERBY-4856 DERBY-4929 Add thread dump information for error StandardException and SQLException. Due to DERBY-289, ThreadDump.java and ExceptionUtil.java should go to iapi/error for engine. Currently, all thread dump information goes to derby.log git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1043290 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/context/ContextManager.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.error.ExceptionUtil;" ], "header": "@@ -29,6 +29,7 @@ import org.apache.derby.iapi.error.PassThroughException;", "removed"...
derby-DERBY-2890-debc0fc6
DERBY-2890: Simplify handling of maxPos in UpdatableBlobStream and ClobUpdatableReader git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@552702 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/ClobUpdatableReader.java", "hunks": [ { "added": [ " * Position in Clob where to stop reading unless EOF is reached first." ], "header": "@@ -56,7 +56,7 @@ final class ClobUpdatableReader extends Reader {", ...
derby-DERBY-2891-5b41e458
DERBY-2891: Clob.getCharacterStream(long,long) ignores position parameter for large (>32k) CLOBs Fixed hard-coded start position in ClobUpdatableReader's constructor. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@553111 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/ClobUpdatableReader.java", "hunks": [ { "added": [ " // Hence set length to infinity (or as close as we get).", " this(clob, 0L, Long.MAX_VALUE);" ], "header": "@@ -87,30 +87,9 @@ final class Cl...
derby-DERBY-2892-4015c92f
DERBY-2892: Closing a resultset after retrieving a large > 32665 bytes value with Network Server does not release locks. Fixed the problem in an alternative way to avoid compatibility problems. Instead of explicitly closing the underlying LOB when creating streams etc, closing is now handled by the LOBStateTracker in the same way as if the LOB column had never been accessed by the user. Multiple result set getter methods can (again) be called on a LOB column, except for the getters returning streams. Patch file: derby-2892-1b-alternative_fix_partial.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@646255 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/Cursor.java", "hunks": [ { "added": [ " /**", " * Returns a {@code Blob} object.", " *", " * @param column 1-based column index", " * @param agent associated agent", ...
derby-DERBY-2892-50f5a012
DERBY-2892: Closing a resultset after retrieving a large > 32665 bytes value with Network Server does not release locks. Cleanup patch removing code that became unused after the alternative fix went in. Patch file: derby-2892-2a-alternative_fix_cleanup.diff git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@647680 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/BlobLocatorInputStream.java", "hunks": [ { "added": [], "header": "@@ -21,12 +21,8 @@", "removed": [ "import java.sql.SQLException;", "", "import org.apache.derby.shared.common.error.ExceptionUtil;"...
derby-DERBY-2892-c6ed70e8
DERBY-2892 Closing a resultset after retrieving a large > 32665 bytes value with Network Server does not release locks Fixes getString(), getCharacaterStream(), getBytes, getBinaryStream() so they don't hold locks. Also restricts BLOB columns to a single getXXX call. Patch contributed by Oystein Grovlen (oystein dot grovlen at sun dot com) git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@642974 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/client/org/apache/derby/client/am/Blob.java", "hunks": [ { "added": [], "header": "@@ -21,7 +21,6 @@", "removed": [ "import java.io.BufferedInputStream;" ] }, { "added": [ " java.io.InputStream getBinaryStreamX(...
derby-DERBY-2893-3ce8a04e
DERBY-2893 Fix GrantRevokeTest to use correct user for assertInsertPrivilege git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@555075 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2896-b1f37df6
DERBY-2896 Metadata calls getTables and getUDTs were failing when run from a user schema in a territory based collated database. The reason for it is that these metadata calls were not getting compiled in SYS schema when they were executed from a user schema. Metadata calls should always compile in SYS schema no matter what the current schema might be. The reason getTables was not getting compiled in SYS schema was because we were trying to modify it's metadata sql on the fly and then were compiling that modified sql in whatever the current schema might be. I have changed the metadata sql for getTables in metadata.properties so that we do not need to modify it on the fly anymore. This will allow getTables to follow the same codepath as other metadata queries which will also ensure that the sql gets compiled in SYS schema. As for getUDTs, it was merely a coding bug that we didn't follow the same logic as other metadata queries for it. I have changed getUDTs implementation to follow the same codepath as other metadata queries. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@557334 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java", "hunks": [ { "added": [ "\t\tPreparedStatement s = getPreparedQuery(\"getTables\");", "\t\ts.setString(1, swapNull(catalog));", "\t\ts.setString(2, swapNull(schemaPattern));", ...
derby-DERBY-2903-0c8386da
DERBY-2903 ; addressing some review comments git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@593643 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2903-d1b8db2c
DERBY-2903 ; adding init() to sysinfo.Main.java's call to LocalizedResource.getInstance() ensures that if sysinfo has a clean one that does not get affected by any earlier calls to init. After this, the redirections of system.out work correctly in a loop, so adjusting the test to do away with the hoky annotating and unraveling of the output; also now sequence of tests in tools._Suite no longer matters. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@593635 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/tools/org/apache/derby/impl/tools/sysinfo/Main.java", "hunks": [ { "added": [ " LocalizedResource.getInstance().init();" ], "header": "@@ -93,7 +93,7 @@ public final class Main {", "removed": [ " LocalizedResource.getIns...
derby-DERBY-2905-45cb2dfc
DERBY-2905 Shutting down embedded Derby will remove AutoloadedDriver. The AutoloadedDriver is not left registered in the DriverManager. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1063996 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/jdbc/AutoloadedDriver.java", "hunks": [ { "added": [ "import org.apache.derby.shared.common.sanity.SanityManager;" ], "header": "@@ -34,6 +34,7 @@ import org.apache.derby.iapi.reference.MessageId;", "removed": [] }...
derby-DERBY-2905-57af2a55
DERBY-2905 Check-in deregister attribute option with shutdown. After shutdown and reloading the engine via Class.forName(...).newInstance(), AutoloadedDriver will get registered to DriverManager even if AutoloadedDriver40 was the original driver. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1068842 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/jdbc/AutoloadedDriver.java", "hunks": [ { "added": [ " //This flag is set is deregister attribute is set by user, ", " //default is true (DERBY-2905)", " private static boolean deregister = true;" ], ...
derby-DERBY-2905-90e70fe0
DERBY-2905 (partial) Add test fixtures to test that after an embedded shutdown that no Derby driver is left registered and that a subsequent load of the embedded driver succeeds. The assert for no driver left registered is disabled until DERBY-2905 is fixed. Inspired by Ramin Moazeni's patch v3 attached to the Jira issue. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@572822 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2907-442f6967
DERBY-2907 Close Statement objects opened by utility methods in BaseJDBCTestCase at tearDown time. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@553994 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2910-d9b61925
DERBY-2910 SimpleStringOperatorNode in it's bindExpression method generates a character string CAST if required but does not set the correct collation. This change changes implicit casts in SimpleStringOperatorNode, ConcatenationOperatorNode, and TernaryOperatorNode to use the current schema collation when doing an implicit cast. Since the SQL Spec had no specific rules for implicit casts, I matched the explicit cast behavior described in 6.1.2 (10). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@570546 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2911-086dee28
DERBY-2911: Implement a buffer manager using java.util.concurrent classes Addressed some review comments: - Split calls to CacheEntry.lockWhenIdentityIsSet() into to separate steps (lock and wait) to make it easier to follow the code. - Created named constants for some of the heuristics in ClockPolicy git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@636670 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ClockPolicy.java", "hunks": [ { "added": [ " /**", " * How large part of the clock to look at before giving up in", " * {@code rotateClock()}.", " */", " private stat...
derby-DERBY-2911-0b57378c
DERBY-2911: Implement a buffer manager using java.util.concurrent classes Clean-up to address review comments: - Make ReplacementPolicy.insertEntry() void since the return value isn't used - Simplify handling of small caches in ClockPolicy.rotateClock() - Factor out common code in rotateClock() and shrinkMe() git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@636247 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ClockPolicy.java", "hunks": [ { "added": [ " /**", " * The minimum number of items to check before we decide to give up", " * looking for evictable entries when rotating the clock.", ...
derby-DERBY-2911-106ea47b
Checked in the performance tests used in DERBY-1961 and DERBY-2911. The following command prints information on how to run the tests: java org.apache.derbyTesting.perf.clients.Runner git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@619404 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/perf/clients/WisconsinFiller.java", "hunks": [ { "added": [ "/*", "", "Derby - Class org.apache.derbyTesting.perf.clients.WisconsinFiller", "", "Licensed to the Apache Software Foundation (ASF) un...
derby-DERBY-2911-29141b85
DERBY-2911: Implement a buffer manager using java.util.concurrent classes Improved comments as suggested in the review. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@635577 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/BackgroundCleaner.java", "hunks": [ { "added": [ " * A background cleaner that {@code ConcurrentCache} can use to clean {@code", " * Cacheable}s asynchronously in a background instead of synchronously in the", ...
derby-DERBY-2911-2d09c33b
DERBY-2911: Implement a buffer manager using java.util.concurrent classes Removed ClockPolicy.trimMe() since it adds complexity without adding any obvious benefit. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@642755 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ClockPolicy.java", "hunks": [ { "added": [ " * Tells whether there currently is a thread in the {@code doShrink()}", " * method. If this variable is {@code true} a call to {@code doShrink()}", " ...
derby-DERBY-2911-3141a3ba
DERBY-2911: Implement a buffer manager using java.util.concurrent classes Improved comments as suggested in the review. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@635556 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCache.java", "hunks": [ { "added": [ " * Evict an entry to make room for a new entry that is being inserted into", " * the cache. Clear the identity of its {@code Cacheable} and set it to", ...
derby-DERBY-2911-45c4ca4a
DERBY-2911: Implement a buffer manager using java.util.concurrent classes Release the ReentrantLock on the CacheEntry while the identity of the Cacheable is being set. Otherwise, we may run into a deadlock if the Cacheable's setIdentity() or createIdentity() method accesses the cache. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@603491 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/CacheEntry.java", "hunks": [ { "added": [ " * <dt>Uninitialized</dt> <dd>The entry object has just been constructed, but", " * has not yet been initialized. In this state, <code>isValid()</code> returns", ...
derby-DERBY-2911-651fa21e
DERBY-2911 (partial) Implemented background cleaner for ConcurrentCache Created a background cleaner which enables the user threads to request that the cleaning of a cached object happens asynchronously in Derby's service daemon. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@596265 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ClockPolicy.java", "hunks": [ { "added": [ " // This variable will hold a dirty cacheable that should be cleaned", " // after the try/finally block.", " final Cacheable di...
derby-DERBY-2911-6a317f01
DERBY-2911 (partial) Implement a buffer manager using java.util.concurrent classes Changed the replacement algorithm so that the cache will never grow if there is an unused entry that can be reused. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@585060 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ClockPolicy.java", "hunks": [ { "added": [ "import java.util.concurrent.atomic.AtomicInteger;" ], "header": "@@ -22,6 +22,7 @@", "removed": [] }, { "added": [ " /**", ...
derby-DERBY-2911-721f8959
DERBY-2911 (partial) Removed unused methods from the CacheManager and CacheFactory interfaces git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@571055 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/cache/CacheManager.java", "hunks": [ { "added": [], "header": "@@ -31,21 +31,6 @@ import java.util.Collection;", "removed": [ " /**", " * @return the current maximum size of the cache.", ...
derby-DERBY-2911-73a34db6
DERBY-2911 (partial) Added a partial implementation of a buffer manager using the java.util.concurrent utilities. Only basic operations to fetch objects from the cache are implemented. For the other methods there are stubs only. The code is currently disabled. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@572645 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCacheFactory.java", "hunks": [ { "added": [ "/*", "", " Derby - Class org.apache.derby.impl.services.cache.ConcurrentCacheFactory", "", " Licensed to the Apache Software ...
derby-DERBY-2911-7a816cbd
DERBY-2911 (partial) Implement a buffer manager using java.util.concurrent classes Added replacement algorithm in the new buffer manager. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@580252 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/CacheEntry.java", "hunks": [ { "added": [ "", "", "" ], "header": "@@ -76,13 +76,16 @@ import org.apache.derby.iapi.services.sanity.SanityManager;", "removed": [] }, { ...
derby-DERBY-2911-a0ab25a8
DERBY-2911 (partial) Updated class javadoc for CacheEntry with information about its different states and how to lock more than one entry without risking deadlocks. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@575607 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/CacheEntry.java", "hunks": [ { "added": [ " * this class, except <code>lock()</code>, it must first have called", " * <code>lock()</code> to ensure exclusive access to the entry.", " *", " * <p>...
derby-DERBY-2911-a8544646
DERBY-2911 (partial) Implemented CacheManager.values() for ConcurrentCache git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@572693 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCache.java", "hunks": [ { "added": [ "import java.util.ArrayList;" ], "header": "@@ -21,6 +21,7 @@", "removed": [] }, { "added": [ " /**", " * ...
derby-DERBY-2911-b5ca246a
DERBY-2911 (partial) Improved some javadoc comments in the CacheManager interface and made them match what's actually implemented. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@573196 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/cache/CacheManager.java", "hunks": [ { "added": [ "\t\tRelease a <code>Cacheable</code> object previously found with", "\t\t<code>find()</code> or <code>findCached()</code>, or created with", "\t\t<code>create(...
derby-DERBY-2911-ce4ee235
DERBY-2911: Implement a buffer manager using java.util.concurrent classes Minor change in ClockPolicy.shrinkMe() to make it easier to read. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@642752 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ClockPolicy.java", "hunks": [ { "added": [ " // Fetch the next holder from the clock.", " h = clock.get(pos);", " // The index of the holder we're looking at. Since no...
derby-DERBY-2911-d8bdc4cb
DERBY-2911 (partial) Implement a buffer manager using java.util.concurrent classes Add functionality to shrink the cache when it has grown bigger than its specified maximum size. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@601680 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/BackgroundCleaner.java", "hunks": [ { "added": [ " /**", " * Flag which tells whether the cleaner should try to shrink the cache", " * the next time it wakes up.", " */", ...
derby-DERBY-2911-dbc7584c
DERBY-2911 (partial) Implement a buffer manager using java.util.concurrent classes Changed signatures of ConcurrentCache.findFreeCacheable() and ConcurrentCache.removeEntry(). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@577224 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCache.java", "hunks": [ { "added": [ " * Find a free cacheable and give the specified entry a pointer to it. If", " * a free cacheable cannot be found, allocate a new one. The entry must be", ...
derby-DERBY-2911-df17cb04
DERBY-2911 (partial) Implement a buffer manager using java.util.concurrent classes Remove entries from the cache if a failure occurs while setting the identity of the Cacheable. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@578006 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCache.java", "hunks": [ { "added": [ " Cacheable c = entry.getCacheable();", " if (c != null && c.getIdentity() != null) {", " // The cacheable should not have an identi...
derby-DERBY-2911-e4501308
DERBY-2911 (partial) Implemented CacheManager.shutdown() in ConcurrentCache git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@572953 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCache.java", "hunks": [ { "added": [ " /**", " * Flag that indicates whether this cache instance has been shut down. When", " * it has been stopped, <code>find()</code>, <code>findCac...
derby-DERBY-2911-f30ee415
DERBY-2911: Implement a buffer manager using java.util.concurrent classes DERBY-3493: stress.multi times out waiting on testers with blocked testers waiting on the same statement Changed ConcurrentCache.create() to match Clock.create() more closely. The patch basically makes ConcurrentCache.create() use ConcurrentHashMap.get() directly instead of going through ConcurrentCache.getEntry(), which may block until the identity has been set by another thread. Then create() fails immediately if the object already exists in the cache, also if another thread is in the process of inserting the object into the cache. Since this introduced yet another difference between find() and create() in findOrCreateObject(), I also followed Øystein's suggestion from his review of DERBY-2911 and split findOrCreateObject() into a number of smaller methods, which I think makes the code easier to follow. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@635183 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/services/cache/ConcurrentCache.java", "hunks": [ { "added": [ " * Insert a {@code CacheEntry} into a free slot in the {@code", " * ReplacementPolicy}'s internal data structure, and return a {@code", " * Cach...
derby-DERBY-2915-acaa764f
DERBY-2915 - make test NoConnetionAfterHardUpgrade accept XSLAP or XSLAN errors. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@555441 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2920-4ecfb0ef
DERBY-2920: Share code between readExternal() and readExternalFromArray() Provide a default readExternalFromArray() method that simply forwards calls to readExternal() in the DataType class. Remove the method from sub-classes where the readExternal() and readExternalFromArray() methods are identical. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1407432 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/BinaryDecimal.java", "hunks": [ { "added": [], "header": "@@ -30,7 +30,6 @@ import java.sql.Types;", "removed": [ "import org.apache.derby.iapi.services.io.ArrayInputStream;" ] } ] }, { "file...
derby-DERBY-2920-5baee936
DERBY-2920: Remove unused readExternal() methods git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1411164 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/services/io/FormatableArrayHolder.java", "hunks": [ { "added": [], "header": "@@ -21,13 +21,6 @@", "removed": [ "import org.apache.derby.iapi.services.io.ArrayInputStream;", "", "import org.apache.derby....
derby-DERBY-2931-bdd93c5c
DERBY-2931 In soft upgrade mode the format id of the new heap format was being written out along with the old format metadata. On reboot system would try to read new format and fail. Problem was that wrong format id was associated with the soft upgrade version of the heap conglomerate class (Heap_v10_2.java). The code change is just changing that format id from StoredFormatIds.ACCESS_HEAP_V3_ID to StoredFormatIds.ACCESS_HEAP_V2_ID. The rest of the changes is comments in the code and updates to the upgrade test suite. The changes to the upgrade suite showed the problem before the fix in both 10.3 branch and trunk and then passed once the fix was applied. Adding those tests actually caused some other tests in the upgrade suite to fail which passed previously, and those cases were also fixed by this change. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@555778 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/heap/Heap_v10_2.java", "hunks": [ { "added": [ " * conglomerate object. Access contains no \"directory\" of ", " * conglomerate information. In order to bootstrap opening a file", " ...
derby-DERBY-2931-db85ee3a
DERBY-2931 move test case to BasicSetup git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@555806 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2933-b672fd0e
DERBY-2933 (partial) When network server disconnects due to an I/O Exception it does not always log the exception that caused the error Committing change for IOExceptions during writeScalarStream(). There also may be exceptions during disconnect of a session when the server shuts down and I left these unlogged. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@562524 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DRDAConnThread.java", "hunks": [ { "added": [ "\t markCommunicationsFailure(null,arg1,arg2,arg3, arg4);", " ", " ", " /**", " * Indicate a communications failure. L...
derby-DERBY-2935-24d0b901
DERBY-2935: DDMReader.readLengthAndCodePoint() decodes long integer incorrectly Use long arithmetic instead of int arithmetic. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@557513 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DDMReader.java", "hunks": [ { "added": [ "\t\t\t\t\t((buffer[pos++] & 0xFFL) << 56) +", "\t\t\t\t\t((buffer[pos++] & 0xFFL) << 48) +", "\t\t\t\t\t((buffer[pos++] & 0xFFL) << 40) +", "\t\t\t\t\t((buffer[pos+...
derby-DERBY-2936-298ff5e4
DERBY-2936 (partial) Use java.nio.ByteBuffer for buffering in DDMWriter Wrap the byte array in a java.nio.ByteBuffer and use the utility methods for encoding primitive types. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@556583 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DDMWriter.java", "hunks": [ { "added": [ "import java.nio.ByteBuffer;" ], "header": "@@ -33,6 +33,7 @@ import org.apache.derby.iapi.reference.Property;", "removed": [] }, { "added": [ ...
derby-DERBY-2936-9f8e1ebc
DERBY-2936: Use java.nio.ByteBuffer for buffering in DDMWriter Use java.nio.charset.CharsetEncoder instead of String.getBytes() to encode strings. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@557506 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DDMWriter.java", "hunks": [ { "added": [], "header": "@@ -24,7 +24,6 @@ package org.apache.derby.impl.drda;", "removed": [ "import java.io.UnsupportedEncodingException;" ] }, { "added": [ ...
derby-DERBY-2936-a0adefe5
DERBY-2936: Use java.nio.ByteBuffer for buffering in DDMWriter Removed the bytes field from DDMWriter. Also - updated comments which contained references to the old field - made endDdm() use ByteBuffer.put(byte[],int,int) instead of System.arraycopy() - made writeScalarStream() use buffer.array() instead of the old field - removed unused variables and narrowed the scope of others in writeScalarStream() git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@569661 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/DDMWriter.java", "hunks": [ { "added": [], "header": "@@ -57,14 +57,6 @@ class DDMWriter", "removed": [ "\t * @see #bytes", "\t */", "\tprivate byte[] bytes;", "\t/**", "\t * Wrapp...
derby-DERBY-2936-a1f00681
DERBY-2936 (partial) Use java.nio.ByteBuffer for buffering in DDMWriter Description of the patch: * replaces all occurrences of bytes[xxx] with absolute buffer.get/put methods * replaces calls to Arrays.fill() + buffer.position() with calls to the existing padBytes() method * makes CcsidManager.convertFromUCS2() take a ByteBuffer instead of byte array + offset * removes the original writeBigDecimal() method and renames bigDecimalToPackedDecimalBytes() to writeBigDecimal() git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@568039 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/drda/org/apache/derby/impl/drda/CcsidManager.java", "hunks": [ { "added": [ "import java.nio.ByteBuffer;", "" ], "header": "@@ -20,6 +20,8 @@", "removed": [] } ] }, { "file": "java/drda/org/apache/derby/impl/drda/DDM...
derby-DERBY-2937-8fe95616
DERBY-2937 Add a test case for the error seen in this bug and ensure that when a column reference is created for an aggregate node that it points to its source. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@561860 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2937-d1fbe3c3
In tracing the types of various nodes created by the failing query for DERBY-2937 I saw that some nodes had types of CHAR(0) which makes no sense. These were NULL constant nodes where no type attributes were being passed in. Change QueryTreeNode.getNullNode() to have a DataTypeDescriptor as a parameter and set the type of the constant node to be that type. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@561806 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java", "hunks": [ { "added": [ "\t\tDataTypeDescriptor compType =", " DataTypeDescriptor.getSQLDataTypeDescriptor(className);", "\t\tConstantNode nullNode = getNullNode(compType);" ...
derby-DERBY-2939-10b43853
DERBY-2939: Log file is flushed every time a log buffer gets full Contributed by Jørgen Løland git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@579511 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/log/LogAccessFile.java", "hunks": [ { "added": [ " In case of a large log record that does not fit into a buffer, the", " checksum is written to the byte[] allocated for the big log", " record. " ...
derby-DERBY-2946-ea5ca3f8
DERBY-2946 The character string literals take their collation from the current compilation schema. Derby's metadata queries have lots of comparisons where a character string literal is compared with a character string column from SYS schema. The character string columns from SYS schema have the collation of UCS_BASIC. If the metadata queries get run with user schema as current compilation schema, then the character string constants in metadata queries will get a collation of territory based and this mismatch in collation of character string constants and character string columns will cause the metadata queries to fail. This situation can arise in the current softupgrade code. In softupgrade mode, we do not ensure that the current compilation schema is SYS schema. A simple change in GenericLanguageConnectionContext(GLCC) takes care of that problem. In GLCC, with this checkin, we check if the query being executed is a metadata query and if yes, then we should set the current compilation schema to be SYS schema for that metadata query execution. This takes care of the soft upgrade problem. Outside of soft upgrade mode, we do not have problems with metadata queries because during a normal run/hard upgrade, we go to SYSSTATEMENTS to run metadata queries and that code path ensures that the current compilation schema is SYS schema. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@572880 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2949-db8af5c2
DERBY-2949: AssertionFailedError in testStalePlansOnLargeTable Use explicit checkpoints to make the test independent of the timing of the implicit checkpoints. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1043389 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2951-197b3d3c
This commit has 2 simple fixes (DERBY-2951 which gives assert failure and DERBY-2959 The table will have collation type UCS_BASIC which is different than the collation of the schema TERRITORY_BASED hence this operation is not supported.) The failure in DERBY-2951 is because in store, we were not using correct format id and hence collation information was not getting written out and read from disk. Added a test case for this in CollationTest. The failure in DERBY-2959 was because of the bug that we were comparing collation type for non-character types. Collation is only applicable to character types and hence we should check for character types before comparing the collation info. Added a test case for this one too. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@557693 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2955-27791253
DERBY-2955 We used to set the collation type of character string columns in the generate phase rather than the bind phase of create table. But this will cause problem with following query CREATE TABLE STAFF9 (EMPNAME CHAR(20), CONSTRAINT STAFF9_EMPNAME CHECK (EMPNAME NOT LIKE 'T%')) For the query above, when run in a territory based db, we need to have the correct collation set in bind phase of create table so that when LIKE is handled in LikeEscapeOperatorNode, we have the correct collation set for EMPNAME otherwise it will throw an exception for 'T%' having collation of territory based and EMPNAME having the default collation of UCS_BASIC. The change in this commit will ensure that character string columns get their collation set early on in the bind phase so when the bind code for LIKE kicks in, we are all set with correct collation information. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@557886 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java", "hunks": [ { "added": [ "\t\t} else {", "\t\t\t//Set the collation type and collation derivation of all the ", "\t\t\t//character type columns. Their collation type will be same as the...
derby-DERBY-2959-197b3d3c
This commit has 2 simple fixes (DERBY-2951 which gives assert failure and DERBY-2959 The table will have collation type UCS_BASIC which is different than the collation of the schema TERRITORY_BASED hence this operation is not supported.) The failure in DERBY-2951 is because in store, we were not using correct format id and hence collation information was not getting written out and read from disk. Added a test case for this in CollationTest. The failure in DERBY-2959 was because of the bug that we were comparing collation type for non-character types. Collation is only applicable to character types and hence we should check for character types before comparing the collation info. Added a test case for this one too. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@557693 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2961-27f9fd60
DERBY-2961 This commit fixes the ASSERT failure thrown by the SELECT statement in following query CREATE TABLE T_MAIN1 (ID INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, V XML); INSERT INTO T_MAIN1(V) VALUES NULL; SELECT ID, XMLSERIALIZE(V AS CLOB), XMLSERIALIZE(V AS CLOB) FROM T_MAIN1 ORDER BY 1; The SELECT statement was resulting in Assert Failure because the StringDataValue generated for V AS CLOB was not taking collation type into consideration ie it was always generating collation insensitive StringDataValue. I have fixed that problem by passing the current compilation schema's collation type to SqlXmlExecutor which then will get used in determining whether for instance we should generate SQLChar vs CollatorSQLChar. This collation information is required only for character string types. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@567735 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/XML.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.sql.conn.ConnectionUtil;" ], "header": "@@ -31,6 +31,7 @@ import org.apache.derby.iapi.services.io.Storable;", "removed": [] }, { ...
derby-DERBY-2962-96c3cce8
DERBY-2962 Change functional tests to use casts for System table queries to avoid conversion errors when run with TERRITORY_BASED collation git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@558801 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2966-274e189e
DERBY-2966 We need to have context set up inside a moveToInsertRow code because that code tries to do DTD.getNull and getNull needs to find RuleBasedCollator which is found by relying on the context. Putting the context fixed the problem. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@559125 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java", "hunks": [ { "added": [ "\t\t\t\t//we need to set the context because the getNull call below ", "\t\t\t\t//(if dealing with territory based database) might need to ", "\t\t\t\t//look up the cu...
derby-DERBY-2967-f148f1f5
DERBY-2967 Commiting the patch (DERBY2967_Oct11_07_diff.txt) attached to DERBY-2967. The implementation of LIKE for UCS_BASIC and territory based character string types do not differ much(based on SQL standard as explained in comments to this Jira entry). I have been able to change the existing code for LIKE (in Like.java) for UCS_BASIC character strings to support territory based character strings. The existing method in Like.java now gets a new parameter and it is RuleBasedCollator. For UCS_BASIC strings, this will be passed as NULL. We check if the RuleBasedCollator is NULL and if so then we do simple one character equality check for non-metacharacters in pattern and correspnding characters in value string. But if RuleBasedCollator is not NULL, then we use it to get collation element(s) for one character at a time for non-metacharacters in patterns and corresponding characters in value string and do the collation element(s) comparison to establish equality. In addition to the above mentioned change in Like.java, I have changed the callers of the method in Like.java to pass correct value for the RuleBasedCollator. Additionally, I have added a test to CollationTest.java for the code changes. Existing like tests in CollationTest2.java were very useful in the testing of my changes. And lastly, I changed few of the existing tests to use different character string values so that when we run the full collation tests, we do not see some of the test failures which are genuine because of the nature of their data. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@585261 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/iapi/types/Like.java", "hunks": [ { "added": [ "\t ", "\t This method gets called for UCS_BASIC and territory based character", "\t string types to look for a pattern in a value string. It also deals", "\t with es...
derby-DERBY-2972-72abc725
DERBY-2972 Update or select with function in the where clause causes with TERRITORY_BASED collation fails with ERROR 42818: Comparisons between 'VARCHAR' and 'VARCHAR' are not supported. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@574590 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.types.StringDataValue;" ], "header": "@@ -23,6 +23,7 @@ package\torg.apache.derby.impl.sql.compile;", "removed": [] }...
derby-DERBY-2973-93b320dc
DERBY-2973 ALTER TABLE MODIFY COLUMN should maintain the collation info when the column being altered is character string type. The changes for this went into as a new method in ModifyColumnNode which gets called during the bind phase. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@560289 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/ModifyColumnNode.java", "hunks": [ { "added": [ "import org.apache.derby.iapi.types.StringDataValue;" ], "header": "@@ -37,6 +37,7 @@ import org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor;", "...
derby-DERBY-2979-cd2b901b
DERBY-2979; fix IllegalArgumentException in system test mailjdbc. Patch contributed by Manjula Kutty git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@585297 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java", "hunks": [ { "added": [ "\t\t\tint attach_id = 0;", "\t\t\tif((count - 1) <= 0)", "\t\t\t\tattach_id = 0;", "\t\t\telse", "\t\t\t\t attach_id = Rn.nextInt(coun...
derby-DERBY-298-2fb95565
fix for DERBY-298. committing change for ·¹ystein Gr±±±vlen The attached patch fixes the bug by setting the logEnd after recovery to the beginning of the new empty log file instead of the end of the previous file. The patch contains changes to the following files: M java/engine/org/apache/derby/impl/store/raw/log/FileLogger.java - At the end of the redo scan, if the scan stopped in a file succeeding the file of the last log record, update logEnd to this position. - Change assert to allow logEnd to be in a newer file than that of the last log record. M java/engine/org/apache/derby/impl/store/raw/log/Scan.java - Introduced new variable newFileStart which will only have a valid LogInstant value when the scan is at the header of the file. - When a new file is entered, set newFileStart to the first possible LogInstant of this file (end of header). - When a log record is encountered, set newFileStart to INVALID_LOG_INSTANT. - Changed getLogRecordEnd() to return newFileStart if that is valid (i.e., scan is at the start of a file) - Removed comment about not starting to write to the new empty log file, since that is not true anymore. A java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackup_app.properties - Test properties M java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant - Added new property files A java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackupSetup_app.properties - Test properties. - useextdirs=true needed so the backup is placed somewhere the next test can find it. A java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackup.java - Test that is supposed to be run after RecoveryAfterBackupSetup.java. - Does recovery, updates the database, shutdowns the database, and does roll-forward restore. - Checks that updates made after recovery is reflected in the database after roll-forward restore. A java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackupSetup.java - Test that does the preparation for the RecoveryAfterBackup test. - Inserts a few records, makes a backup, and stops without shutting down. M java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java - For tests where the database is not deleted at the end of the test, do not delete the external directories either. - This is necessary to be able to access the backup in suceeding tests. A java/testing/org/apache/derbyTesting/functionTests/master/RecoveryAfterBackupSetup.out - Test output A java/testing/org/apache/derbyTesting/functionTests/master/RecoveryAfterBackup.out - Test output MM java/testing/org/apache/derbyTesting/functionTests/suites/storerecovery.runall - Added tests to storerecovery suite. - Changed property eol-style. The recently attached patch (derby-298a.diff) addresses Suresh's review comments. The only major change from the previous patch is in java/engine/org/apache/derby/impl/store/raw/log/Scan.java. The changes to this file compared to the current head of trunk are: - When a new log file is entered, check that the header of this file refers to the end of the last log record of the previous log file. If not, stop the scan. - If the header was consistent, update knowGoodLogEnd to the first possible LogInstant of this file (end of header). - close() no longer reset knownGoodLogEnd since it is needed by FileLogger after the scan is closed. - Changed comment of getLogRecordEnd() to reflect that it can be used after the scan is closed, and that it at that time may return the start of an empty log file. - Removed comment about not starting to write to the new empty log file, since that is not true anymore. In addition, the property files for the tests have been updated so they are run without the security manager. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@367352 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/raw/log/FileLogger.java", "hunks": [ { "added": [ "\t\t\t} // while redoScan.getNextRecord() != null", "", " // If the scan ended in an empty file, update logEnd to reflect that", " ...
derby-DERBY-2983-768e56f2
DERBY-2983: Add missing FUNCTION_TYPE column to the ResultSet returned by DatabaseMetaData.getFunctions(). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@563172 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2986-4c2072eb
DERBY-2986: Add regression test case to lang/CaseExpressionTest.java. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@566235 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2986-5e32892e
DERBY-2986: Fix performance regression for queries involving CASE statements that have multiple WHEN clauses. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@566217 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java", "hunks": [ { "added": [ "\t\tFromList fromList, SubqueryList subqueryList, Vector aggregateVector)", "\t\tthrows StandardException" ], "header": "@@ -206,7 +206,8 @@ public class...
derby-DERBY-2991-152b9a7b
DERBY-2991: Index split deadlock Added comment to IndexSplitDeadlockTest describing missing test cases for BTreeScan.reposition(). git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@747371 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2991-3811800e
DERBY-2991: Use setAutoCommit() helper method in IndexSplitDeadlockTest git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@746965 13f79535-47bb-0310-9956-ffa450edef68
[]
derby-DERBY-2991-8654374d
DERBY-4177: Javadoc for BTreeLockingPolicy should not mention "scan lock" The fix for DERBY-2991 removed the concept of a "scan lock" and RECORD_ID_PROTECTION_HANDLE, so the javadoc for the BTreeLockingPolicy class hierarchy should not mention them anymore. git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@775937 13f79535-47bb-0310-9956-ffa450edef68
[ { "file": "java/engine/org/apache/derby/impl/store/access/btree/BTreeLockingPolicy.java", "hunks": [ { "added": [], "header": "@@ -24,7 +24,6 @@ package org.apache.derby.impl.store.access.btree;", "removed": [ "import org.apache.derby.iapi.store.raw.RecordHandle;" ...