id stringlengths 22 25 | commit_message stringlengths 137 6.96k | diffs listlengths 0 63 |
|---|---|---|
derby-DERBY-1701-27fff3cf | DERBY-1701 (partial) change SURDataModelSetup to extend from BaseJDBCTestSetup and use its connection handling.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@432031 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1701-4292752a | DERBY-1701 (partial) Close statements and result sets in BLOBTest.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@431939 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1701-7ebfefeb | DERBY-1555 DERBY-1701 (partial) Add utiltiy methods to BaseJDBCTestCase to get Statements, PreparedStatements against
the default connection for the test.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@432222 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1701-a6464f22 | DERBY-1701 (partial) Clean up some of the jdbcapi tests by closing statements when finished and
cleaning up the connection. The connection handling needs to be simplified by having default connection
handling in BaseJDBCTestCase.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@431799 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1701-df2b52c0 | DERBY-1555 DERBY-1701 (partial) Change the name of the TestConfiguration methods to openConnection from getConnection.
Step to having BaseJDBCTestCase.getConnection() be a method matching BaseJDBCTestSetup.getConnection, a handle
to a default connection stored in the instance. This will remove a lot of code in the classes that extend BaseJDBCTestCase
that store a connection locally and have N different ways of cleaning it up.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@431919 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/BaseJDBCTestSetup.java",
"hunks": [
{
"added": [
" * @see TestConfiguration#openDefaultConnection()"
],
"header": "@@ -60,7 +60,7 @@ public abstract class BaseJDBCTestSetup",
"removed": [
... |
derby-DERBY-1701-fb2bfd52 | DERBY-1555 DERBY-1701 (partial) Incremental step in changing the tests that extend
SURBaseTest to use the single connection provided by BaseJDBCTestCase. Added
initialize method to BaseJDBCTestCase to allow tests to have a consistent
initial state for a connection. The SURBaseTest still has its con variable,
will be cleaned up in subsequent commits.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@432438 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1701-ff658306 | DERBY-1555 DERBY-1701 (partial) Change the tests that extend SURBaseTest to use the utilitiy methods
rather than the con field from SURBaseTest to fit into the generic single connection model provided
by BaseJDBCTestCase. Incremental development, next step will be to remove the con field from SURBaseTest.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@432450 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1701-ffe3f662 | DERBY-1555 DERBY-1701 (partial) Improve the BaseJDBCTest by adding support for a default connection
exactly like BaseJDBCTestSetup. Provides consistent handling for a connection in the common case
of a test using just one. Removes duplicated/inconistent code across many tests. First step
has the getConnection method called getXConnection until all the tests ahve stopped using the getConnection
static method and instead use the openDefaultConnection method.
Change the tests in jdbcapi to the new scheme.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@431999 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1704-0f57d0e7 | DERBY-1704 (partial) Allow more concurrency in the lock manager
Removed some unused code.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@499316 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/locks/SinglePool.java",
"hunks": [
{
"added": [],
"header": "@@ -504,19 +504,6 @@ public class SinglePool extends Hashtable",
"removed": [
"\t/*",
"\t** Non-public methods",
"\t*/",
""... |
derby-DERBY-1704-7a0cbb44 | DERBY-1704 (partial) Allow more concurrency in the lock manager
Modified LockSpace so that it doesn't extend Hashtable.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@507428 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/locks/LockSpace.java",
"hunks": [
{
"added": [],
"header": "@@ -28,7 +28,6 @@ import org.apache.derby.iapi.util.Matchable;",
"removed": [
"import java.util.Hashtable;"
]
},
{
"added": [
... |
derby-DERBY-1704-7b8eea6f | DERBY-1704 (cleanup)
* Remove unused imports
* Make classes package private
* Remove check for condition that is always true
* Simplify parameter lists
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@518052 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/locks/LockControl.java",
"hunks": [
{
"added": [],
"header": "@@ -27,7 +27,6 @@ import org.apache.derby.iapi.services.locks.Latch;",
"removed": [
"import java.util.Stack;"
]
},
{
"added"... |
derby-DERBY-1704-a67b8777 | DERBY-1704 (cleanup) Remove unused Hashtable.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@518073 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/locks/LockSet.java",
"hunks": [
{
"added": [],
"header": "@@ -35,7 +35,6 @@ import org.apache.derby.iapi.reference.Property;",
"removed": [
"import java.util.Hashtable;"
]
},
{
"added": ... |
derby-DERBY-1704-fa8c910d | DERBY-1704 (partial) Allow more concurrency in the lock manager
* Made LockSet contain a HashMap instead of extending Hashtable.
* Fixed some comments about MT/synchronization.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@498999 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/locks/Deadlock.java",
"hunks": [
{
"added": [
"\t/**",
"\t * Look for a deadlock.",
"\t * <BR>",
"\t * MT - must be synchronized on the <code>LockSet</code> object.",
"\t */"
],
... |
derby-DERBY-1706-4d04c7bf | DERBY-1706
contributed by Mamta Satoor
This fix addresses the null pointer reported in DERBY-1706.
SESSION schema is a special schema which is used for global temporary tables.
In order to handle global temporary table, Derby creates a in-memory SESSION
schema descriptor which does not have any uuid associated with it. A physical
SESSION schema(with it's uuid set properly) will be created *only* if there is
a persistent object created in it by a user. Global temporary tables can only
reside in SESSION schema and Derby documentation recommends that SESSION schema
should not be used for other persistent objects. This is because the same
object name could be referencing different objects within SESSION schema
depending on in what order they got created.
For instance
create table session.t1(c11 int);
-- the following select will get data from the persistent table t1 in SESSION schema
select * from session.t1;
declare global temporary table session.t1(c11 int, c12 int) on commit delete rows not logged;
-- the following select this time will return data from the temporary table t1 rather than persistent table t1
-- This is because, at any time, if there is a global temporary table by the table referenced by a statement,
-- then Derby will always pick up the global temporary table. If no global temporary table by that name is
-- found, then Derby will look for persistent table in SESSION schema. If none found, then error will be thrown
select * from session.t1;
-- following will drop the temporary table t1 and not the persistent table t1
drop table session.t1;
-- the following select will get data from the persistent table t1 in SESSION schema because temporary table
-- doesn't exist anymore
select * from session.t1;
So, as can be seen from the example above, the statements referencing SESSION schema objects could have different meanings depending on what kind of objects exist in SESSION schema. Because of this, the compiled plans of statements referencing SESSION schema are not saved in the statement cache, rather they get compiled everytime they are executed. In order to enforce this, in the compilation phase, Derby checks if the statement at hand is referencing a SESSION schema object by calling referencesSessionSchema method. If this method returns true, the statement's compiled plan will not be saved in the statement cache.
Now, taking the script provided by Yip which results in NPE
set schema session;
create table t1 (i int);
Derby calls referencesSessionSchema while compiling "create table t1 (i int); " to see if it references SESSION schema object. Since, there is no schema associated with the table t1, Derby will check for the compilation schema which in this case is SESSION schema because we used "set schema session; ". (This happens in QueryTreeNode.getSchemaDescriptor(String schemaName, boolean raiseError) line 1486). The method
then tries to call an equal method on the UUID associated with the SESSION schema descriptor but since it is null(because no physical SESSION schema has been created yet), we end up with a null pointer exception. This will happen only if no physical SESSION schema has been created yet and user tries to create a first persistent object inside SESSION schema after doing a set schema session.
Following will not give a NPE because user hand created SESSION schema before doing set schema SESSION and creating an object inside it.
create schema session;
set schema session;
create table t1 (i int);
The hand creation of SESSION schema causes Derby to have a schema descriptor for SESSION schema with it's uuid set correctly.
The fix for the NPE is simple and that is to check if the UUID is null.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@447212 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-171-444aa520 | Committing changes for DERBY-171 - Need correlation ID in UPDATE/DELETE statements.
Submitted by Rick Hillegas.
Comments from Rick:
I have added the optional correlation name clauses to the UPDATE and DELETE productions in the parser and added supporting bind-time logic. In addition to fixing this particular bug, I have significantly changed the binding of correlated subqueries which have GROUP BY or HAVING clauses: I am now passing the outer fromList context down the subquery binding stack. This makes it possible to bind correlated references in those subqueries and fixes a cluster of other bugs. These other correlated subqueries were failing to compile because the bind logic did not match the way that the parser rewrites the query tree in these cases. I tripped across these problems in the lang/refActions1.sql regression test. I have extensively updated the canon for that test. Looking at the old canon, it appears to me that the old canon was riddled with incorrect results.
Here are some responses to issues which Army raised while reviewing the first rev of this bugfix:
1) This bugfix fixes some other, unlogged bugs. These are basically syntax errors raised by the parser when it encounters correlated references in subqueries which contain GROUP BY or HAVING clauses. The problem was that the parser does something clever. It takes advantage of the fact that the HAVING clause functions like a WHERE clause on the GROUP BY result. The parser then makes the GROUP BY result an outer query with the HAVING clause as its WHERE clause, and the parser then turns the rest of the SELECT into a subquery which feeds the GROUP BY outer query. However, the the binding logic for these rewritten GROUP BY results was not as clever as the parser. Subselects which had GROUP BY or HAVING clauses were not passed the list of correlated tables and so failed to bind correlated references. Perhaps an example would help:
select e.* from employee e
where e.bonus <
( select b.bonus from bonus b where b.empid=e.empid group by bonus having bonus > 3)
In this case, the query would be rewritten to have 3 rather than 2 levels. The outer level would remain like the original. But the subselect would be rewritten to have its own outer select, consisting of the GROUP BY and HAVING clauses and an inner select consisting of the SELECT B.BONUS. In binding this query, level 1 would pass its correlated from list down to level 2, but level 2 would not pass the list on to level 3. However, level 3 needs the correleted from list in order to resolve b.empid=e.empid.
2) This bugfix changes some queries in refActions1.sql. These are queries which used to raise syntax errors.because of the bugs mentioned in (1) above. I first changed these queries by qualifying some dangling references with correlation names. I did this to prove that the syntax errors were not being caused by ambiguity. I verified that the changed queries continued to raise the same syntax errors. Then I fixed the bugs mentioned in (1) above. Most of the queries then successfully compiled. What did the authors of this test hope to demonstrate? It's hard to say since the comments indicate that these statements are supposed to both be correlated and to complete successfully but, of course, they didn't. complete. The changed queries satisfy the minimal contract in the comments: the statements have correlated references and they complete successfully. Do these changes mask other bugs? Possibly. Were those other bugs disclosed by the previous state of the test? No, The changed queries at least track something useful now: syntax that is supposed to compile. I think this is an improvement.
Second rev of bugfix. Incorporates Army's feedback: 1) Removes FromBaseTable.java, which had a vacuous diff, 2) Moves regression tests into update.sql and delete.sql.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@231366 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java",
"hunks": [
{
"added": [
"\t\t\t\t\"tableName: \" + ( ( tableName != null) ? tableName.toString() : \"null\") + \"\\n\" +"
],
"header": "@@ -142,9 +142,7 @@ public class ColumnReference ext... |
derby-DERBY-1710-6f4ffc7f | DERBY-1710: Unchecked casts from SQLException to EmbedSQLException
cause ClassCastException in NetworkServerControlImpl when running
Java SE 6
The attached patch makes NetworkServerControlImpl use
SQLException.getSQLState() instead of EmbedSQLException.getMessageId()
where possible. Where it is not possible, check that the exception is
EmbedSQLException before casting, and fall back to a more generic
approach if it is not.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@432493 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.error.StandardException;"
],
"header": "@@ -50,6 +50,7 @@ import java.util.StringTokenizer;",
"removed": []
},
{
... |
derby-DERBY-1714-8aff1cda | DERBY-766 DERBY-1714 Working method in CodeChunk that splits expressions out of generated methods that are too large.
Bumps the number of unions supported in largeCodeGen to over 6,000 from around 800. Also increases the
number of rows supported in a VALUES clause. A large number of UNION clauses still requires a large amount of
memory for optimization (see DERBY-1315). A large number of rows in a VALUES clause fails at some point due to
a StackOverflow. Subsequent commit will modify largeCodeGen to be a JUnit test and adapt to these changes
but running into issues finding a useful workign limits that can produce repeatable results without
hitting memory issues.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@432856 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java",
"hunks": [
{
"added": [
" "
],
"header": "@@ -74,7 +74,7 @@ class BCMethod implements MethodBuilder {",
"removed": [
""
]
}
]
},
{
"file": "ja... |
derby-DERBY-1714-b1397ecd | DERBY-766 DERBY-1714 Convert largeCodeGen to a JUnit test, add it to the lang._Suite and add that to
the derbylang.runall old harness suite. Added tests for insert a large number of rows with a VALUES
clause. Test needs further improvements due to errors from DERBY-1315 and stack overflow with
a large INSERT VALUES clause.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@433085 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [
"\t * Provides simple testing of the ResultSet when the contents"
],
"header": "@@ -299,7 +299,7 @@ public class JDBC {",
"removed": [
"\t * Provides simple tes... |
derby-DERBY-1716-8af8676c | DERBY-1716
contributed by Yip Ng
patch: derby1716-trunk-diff03.txt
Unlike other descriptors, when privilege(s) get revoked from user,
the statement is not subject to recompilation, so then we are back to square one
since the previous patch attempts to bring in the permission descriptor(s) into
the permission cache at compilation time to avoid reading from system tables at
execution time.
I believe the proper proposal fix is to use internal nested read-only transaction
when the system is reading permission descriptors from the system tables. At a
high level, a statement undergoes the following typical steps for it to get executed
by the system:
1. Statement Compilation Phase
a) Parse the statement
b) Bind the statement and collects required permissions for it to be executed.
c) Optimize the statement
d) Generate the activation for the statement
2. Statement Execution Phase
a) Check if the authoration id has the required privileges to execute the statement.
b) Execute the statement
The problem lies in permissions checking step at statement execution phase. Before a statement can be executed in SQL authorization mode, the authorization id's privileges needs to be check against the permission cache or if the privileges are not available in the cache, the system needs to read this metadata information from the system tables. But the system is using *user transaction* to do this, so the shared locks that got acquired by the user transaction may not get released immediately; therefore, leading to lock timeout when the grantor attempts to revoke the user's privilege. To resolve this issue, the system now will start an internal read-only nested transaction(same lock space as the parent transaction) to read permission related info from the system tables and release the shared locks
as soon as the permissions check is completed before statement execution. This tackles the root of the stated problem.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@453935 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java",
"hunks": [
{
"added": [
" if( requiredPermissionsList != null && ",
" !requiredPermissionsList.isEmpty() && ",
" int ddMode = dd.startReading... |
derby-DERBY-1718-a4656283 | DERBY-1718 ( creating an after insert trigger with trigger action involving
xml datatype throws java.io.NottSerializableException)
Patch contributed by Yip Ng.
The fix basically implements the Formatable interface for SqlXmlUtil class.
Currently, it writes out the query expression string instead of the XPath
object(its serializable I think), and then later recompiles the query once
at evaluation time. The reason behind this is that I don't want the stored
form to be tied to a particular XML implementation.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@448085 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java",
"hunks": [
{
"added": [
" /**",
" \tclass org.apache.derby.iapi.types.SqlXmlUtil",
" */",
" static public final int SQL_XML_UTIL_V01_ID =",
... |
derby-DERBY-1729-fec62a7b | DERBY-1729, contributed by Yip Ng
committing derby1729-trunk-diff03.txt patch.
The GrantNode and RevokeNode should have derived from DDLStatementNode instead
of MiscellaneousStatementNode. Subclassing DDLStatementNode will generate a
call to GenericResultSetFactory's getDDLResultSet() in the activation class
and invokes the GenericAuthorizer's authorize() method with the proper
parameters to enforce the correct semantics.
public ResultSet getDDLResultSet (Activation activation) throws StandardExceptio
n
{
getAuthorizer(activation).authorize(activation, Authorizer.SQL_DDL_OP);
return getMiscResultSet( activation);
}
Also adding an additional sql file for derbylang. The reason I didn't include
this in grantRevokeDDL.sql is because of name collision and this testcase is
one of the many additonal grant/revoke tests that I wrote and I'll like to
append the rest of those testcases to this file(grantRevokeDDL2.sql) when I
submit my patch for DERBY-1736.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@441140 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1732-665a8b9a | DERBY-1732 1. Make change to GenericStatementContext.isLastHandler() so it will return false for JVM errors thus
allowing the outer contexts to take corrective action.
2. Store transaction context treats JVM errors as session severity. To ensure consistency,
map severity for non StandardException instances to be SESSION_SEVERITY in GenericLanguageContext,
and GenericStatementContext.
Patch contributed by Sunitha Kambhampati ksunithaghm@gmail.com
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@453395 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java",
"hunks": [
{
"added": [
"\t\t** session severity. It is probably an unexpected",
" ** Store layer treats JVM error as session severity, ",
" ** hence to be consiste... |
derby-DERBY-1742-4b3350cb | DERBY-1734 (partial) Change SYSALIASESRowFactory to use the utility methods to obtain SystemColumn implementations
to avoid passing redundant parameters leading to bugs (see DERBY-1742). Fix the bug described by DERBY-1742
so that the column descriptor for SYSTEMALIAS BOOLEAN column is created correctly. Remove the calls to
convert the case for the SYSTEMALIASES columns as the system tables are an implementation detail of
Derby which is fixed at upper case.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@433434 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.reference.JDBC30Translation;"
],
"header": "@@ -22,6 +22,7 @@",
"removed": []
}
]
},
{
"file": "java/en... |
derby-DERBY-1746-b4fdbf81 | DERBY-1746 - removing svn:externals property from <trunk>/tools/testing, adjusting upgrade tests to by default attempt to access https://svn.apache.org/repos/asf/db/derby/jars for the older version's derby.jar files; removing dependency on 'lib' in old version's directory structure. Also adjusted comments.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@538724 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1748-52121014 | DERBY-1748: Global case insensitive setting
Patch contributed by Gunnar Grim.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@929111 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java",
"hunks": [
{
"added": [
" * Obtain the collation type from a collation property value.",
"\t * @return The collation type, or -1 if not recognized.",
" */",
"\tpublic st... |
derby-DERBY-1748-abe46d01 | DERBY-1748 (partial) Removed unused collation code
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@922682 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/services/i18n/LocaleFinder.java",
"hunks": [
{
"added": [],
"header": "@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.StandardException;",
"removed": [
"import java.text.RuleBasedCollator;"
]
}
]
}... |
derby-DERBY-1751-953604b4 | DERBY-1751: derbynet/testSecMec.java fails with ShutdownException in
DerbyNetClient framework
The attached patch avoids the problem seen in this issue by setting
the console output of the network server to a file. This change in
made to the following files:
* functionTests/tests/jdbc4/TestConnectionMethods.java
* functionTests/tests/derbynet/testSecMec.java
* functionTests/tests/derbynet/dataSourcePermissions_net.java
* junit/NetworkServerTestSetup.java
It also changes DRDAProtocolException so that agent Errors will be
printed to the network server console instead of System.out.
Contributed by Fernanda Pizzorno.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@449671 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java",
"hunks": [
{
"added": [
"import java.io.FileNotFoundException;",
"import java.io.FileOutputStream;",
"import java.security.AccessController;",
"import java.security.Privi... |
derby-DERBY-1755-6c1fe080 | DERBY-1756
patch Derby1756.2.diff.txt contributed by Sunitha Kambhampati
with derby-962 changes, if client jvm supports EUSRIDPWD then the client would
use EUSRIDPWD as the security mechanism. But it is possible that the server jvm
might not support EUSRIDPWD and the connection can fail.
When DERBY-1517, DERBY-1755 is fixed, there might be a way to use EUSRIDPWD
when both client and server vm's have support for it.
This patch does the following:
o Do not use EUSRIDPWD as the default security mechanism even if the client vm can support it.
o Fix comments in testSecMec.java.
o Existing tests in testSecMec.java cover this codepath and the master file
output reflects the changes made. Note, only the ibm14 client master file has
changed since only ibm141 and greater jvms come with jce that can support
eusridpwd.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@439775 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/client/org/apache/derby/jdbc/ClientBaseDataSource.java",
"hunks": [
{
"added": [
" * 2. if password is available,then USRIDPWD is returned."
],
"header": "@@ -277,10 +277,7 @@ public abstract class ClientBaseDataSource implements Serializable, Refe... |
derby-DERBY-1756-6c1fe080 | DERBY-1756
patch Derby1756.2.diff.txt contributed by Sunitha Kambhampati
with derby-962 changes, if client jvm supports EUSRIDPWD then the client would
use EUSRIDPWD as the security mechanism. But it is possible that the server jvm
might not support EUSRIDPWD and the connection can fail.
When DERBY-1517, DERBY-1755 is fixed, there might be a way to use EUSRIDPWD
when both client and server vm's have support for it.
This patch does the following:
o Do not use EUSRIDPWD as the default security mechanism even if the client vm can support it.
o Fix comments in testSecMec.java.
o Existing tests in testSecMec.java cover this codepath and the master file
output reflects the changes made. Note, only the ibm14 client master file has
changed since only ibm141 and greater jvms come with jce that can support
eusridpwd.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@439775 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/client/org/apache/derby/jdbc/ClientBaseDataSource.java",
"hunks": [
{
"added": [
" * 2. if password is available,then USRIDPWD is returned."
],
"header": "@@ -277,10 +277,7 @@ public abstract class ClientBaseDataSource implements Serializable, Refe... |
derby-DERBY-1757-86cae7bf | DERBY-1817: Race condition in network server's thread pool
Instead of always putting new sessions in the run queue when there are
free threads, the network server now compares the number of free
threads and the size of the run queue. This is done to prevent the run
queue from growing to a size greater than the number of free
threads. Also, the server now synchronizes on runQueue until the
session has been added to the queue. This is to prevent two threads
from deciding that there are enough free threads and adding the
session to the run queue, when there in fact only were enough free
threads for one of them. With this patch, I am not able to reproduce
DERBY-1757 on platforms where the failure was easily reproduced
before.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@441802 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/drda/org/apache/derby/impl/drda/ClientThread.java",
"hunks": [
{
"added": [],
"header": "@@ -47,7 +47,6 @@ final class ClientThread extends Thread {",
"removed": [
"\t\t\tSession clientSession = null;"
]
}
]
},
{
"file": "java... |
derby-DERBY-1758-3098ab04 | DERBY-1758: Enable xmlSuite to run as part of derbyall for qualified JVMs
This patch was contributed by A B (qozinx@gmail.com)
This patch adds two JUnit tests to lang/_Suite.java. The first test,
XMLTypeAndOpsTest.java, is meant to be a JUnit equivalent to the current
lang/xml_general.sql test. The second test, XMLMissingClassesTest,
tests the behavior of the SQL/XML operators when the required JAXP
or Xalan classes are not in the classpath.
The XML classes can be provided in any of a number of ways:
1) bundled into the JVM
2) installed as endorsed libraries
3) specified in the classpath
Hand-testing was performed to ensure that the new JUnit tests perform
correctly in these various configurations.
If the tests are run in an environment which does not support the XML
features, the tests quietly do nothing.
The patch, d1758_newJUnitTests_v2.patch, also adds a new utility method
and some associated state to JDBC.java for checking two things:
1) that the classpath has JAXP and Xalan classes, and
2) if the classpath has Xalan, check that the version of Xalan meets
the minimum requirement for use of Derby SQL/XML operators.
These methods/flags are then used to determine when to run the new
XML JUnit tests.
NOTE: After this patch has been reviewed/updated and finally committed
I will post a separate patch to remove the old lang/xml_general.sql test
and the corresponding master files. I will then continue addressing the
rest of the tasks for this issue (esp. xmlBinding.java) in incremental fashion.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@468503 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [
"import java.io.PrintWriter;",
"import java.io.ByteArrayInputStream;",
"import java.io.ByteArrayOutputStream;",
"",
"import java.lang.reflect.Method;",
... |
derby-DERBY-1758-378aa34e | DERBY-2131: Use a privileged block when calling out to the JAXP parser
so that users running with a security manager can insert XML values
that reference external DTDs without encountering security exceptions.
This patch does not include any tests; however, relevant test cases
will be enabled as part of DERBY-1758.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@481117 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java",
"hunks": [
{
"added": [
" protected String serializeToString(final String xmlAsText)",
" final ArrayList aList = new ArrayList();",
"",
" /* The call to dBuilder.parse(... |
derby-DERBY-1758-b73c2a37 | DERBY-1758: Enable xmlSuite to run as part of derbyall for qualified JVMs
This patch was contributed by A B (qozinx@gmail.com)
I'm attaching another patch, d1758_followup_v1.patch, that moves the XML
utility methods out of junit.JDBC and into a new class, junit.XML, per Dan's
suggestion (thanks Dan).
Note that I changed the "haveClass()" method in JDBC.java from private to
protected so that it can be called from the junit.XML class. That was the
easiest thing to do.
Since checking the classpath is not a JDBC-specific operation, the other
option is to move "haveClass()" to some other class in the junit package. If
anyone indicates a preference for doing so and also indicates the class to
which the method should be moved, I can do it this way. Otherwise I'll just
leave it as it is (i.e. keep it in JDBC.java and make it protected).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@468605 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [],
"header": "@@ -25,15 +25,6 @@ import java.util.Iterator;",
"removed": [
"import java.io.PrintWriter;",
"import java.io.ByteArrayInputStream;",
"import java.... |
derby-DERBY-1758-cd4ba4a7 | DERBY-1758 (partial): Adds a new JUnit test to replace the old
lang/xmlBinding.java test. The patch does the following:
- Adds XML file insertion utility methods to junit/XML.java
- Creates a new JUnit test called lang/XMLBindingTest.java that
uses the new utility methods to test various binding scenarios
with Derby's SQL/XML operators.
- Overloads the TestConfiguration.defaultSuite() method with a boolean
signature to allow optional addition of CleanDatabaseSetup.
- Updates lang/XMLTypeAndOpsTest to use the new overloaded defaultSuite()
method.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@476365 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/XML.java",
"hunks": [
{
"added": [
"import java.io.IOException;",
"import java.io.InputStreamReader;",
"import java.security.PrivilegedActionException;",
"",
"import java.sql.Connection;",
... |
derby-DERBY-1758-de7372b8 | DERBY-1758 (partial):
1. Updates XMLBindingTest to ignore the Windows line-ending character
("\r") when counting characters as part of serialization.
2. Updates XMLBindingTest to run with NO security manager for now.
This works toward the "progress not perfection" goal of incremental
development. Once the questions surrounding the security policy for
JAXP have been answered the test can be updated to run with the security
manager.
3. Creates a new JUnit suite, suites/XMLSuite.java, to run all of the
XML JUnit tests, and enables that suite to run as part of
lang/_Suite.java, which in turn means it is executed as part
suites.All.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@478336 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java",
"hunks": [
{
"added": [
" /**",
" * Same as noSecurityManager() above but takes a TestSetup",
" * instead of a BaseTestCase.",
" */",
" public s... |
derby-DERBY-1758-f7abbf44 | DERBY-1758 (partial): Enable the lang/XMLBindingTest to run under a security
manager. Changes include all of the following:
- Updates lang/XMLBindingTest.java so that it will run under the default
testing security manager (i.e. removed the "noSecurityManager()" wrapper).
- Adds a new property, derbyTesting.jaxpjar, to the default testing policy
file. This property holds the location of the JAXP jar picked up from the
classpath _if_ that jar is external to the JVM. If the jar is either embedded
within, or "endorsed" by, the JVM then this property is unused.
The JAXP jar is then given permission to read the "extin" testing
directory, which is the directory into which the DTD required by XMLBindingTest
is copied (and thus JAXP has permission to read the DTD file).
- Adds a new static utility method, "getJAXPParserLocation()", to the
junit/XML.java file. This method instantiates a JAXP object and then uses
the implementation-specific class name to try to find out where the JAXP
jar is located.
- Modifies derbyTesing/junit/build.xml so that junit/XML.java will only
build with 1.4 JVMs and higher. This is required because junit/XML.java
now references a JAXP class that is not defined in 1.3.
- Updates the "getURL()" method of junit/SecurityManagerSetup.java to account
for situations where a class "code source" is null. Also updates the
"determineClasspath()" method of that class to set the derbyTesting.jaxpjar
property as appropriate.
- And finally, moves the build order of the derbyTesting/junit directory
so that it is built *before* the derbyTesting/harness directory.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@482433 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java",
"hunks": [
{
"added": [
" /* When inserting XML values that use external DTD's, the JAXP",
" * parser needs permission to read the DTD files. So here we set",
" ... |
derby-DERBY-1759-0c5a8eb5 | DERBY-1759: XMLSERIALIZE doesn't follow spec when serializing sequence
This patch was contributed by Army Brown (qozinx@gmail.com)
The patch does the following:
1. Adds logic to SqlXmlUtil.serializeToString() to perform the
steps of "sequence normalization" as required by XML serialization
rules. This includes throwing an error if the user attempts to
explicitly serialize a sequence that contains one or more top-level
attribute nodes.
2. In order to ensure that the serialization error is only thrown
when the user performs an explicit XMLSERIALIZE, I added a
new field, "containsTopLevelAttr", to the XML class. This field
indicates whether or not the XML value corresponds to a sequence
with a top-level attribute node. If the user calls XMLSERIALIZE
on an XMLDataValue for which containsTopLevelAttr is true,
then we'll throw the serialization error 2200W as dictated by
SQL/XML.
3. Adds appropriate test cases to lang/xml_general.sql to verify
the fix.
4. Since Xalan doesn't provide a built-in way to retrieve a sequence
of attribue values (as opposed to attribute nodes), I also included
in lang/xml_general.sql a (rather ugly) way to accomplish that
task within the serialization restrictions of SQL/XML.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@441740 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java",
"hunks": [
{
"added": [
"import org.w3c.dom.Attr;"
],
"header": "@@ -32,6 +32,7 @@ import java.io.StringReader;",
"removed": []
},
{
"added": [
"",
" ... |
derby-DERBY-176-38fe427c | DERBY-176 Produce a clear error message when a SQL statement exceeds the
limit(s) of the generated Java class. These limits are imposed by the Java
Virtual Machine specification.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@358605 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/reference/SQLState.java",
"hunks": [
{
"added": [
"\tString GENERATED_CLASS_LIMIT_EXCEEDED\t= \"XBCM4.S\";"
],
"header": "@@ -197,6 +197,7 @@ public interface SQLState {",
"removed": []
}
]
},
{
"f... |
derby-DERBY-176-51cefa2a | DERBY-176 DERBY-766 Modify pushing a long value in generated code to avoid
using constant pool entries if the long is within the range of a short.
Then use the I2L instruction to convert the int to a long. Also if
the long is within range of an int, then create a integer constant pool
entry and I2L to avoid using two constant pool slots.
Add some clarifying comments over the code length in complete.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@378744 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java",
"hunks": [
{
"added": [
" // myCode.getPC() gives the code length since",
" // the program counter will be positioned after",
" // the last instruction. Note this v... |
derby-DERBY-176-c8208e1e | DERBY-176 Improved version of the largeCodeGen test with looping based upon query element count
and a test for a large IN clause.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@354826 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-176-ee1cc94b | DERBY-176 DERBY-776 Add the initial utility code and split algorithm
to split a single generated method that execeeds the java virtual
machine limit of 65535 bytes of instructions. Allows the byte-code api
caller to generate code without worrying about exceeding the limit.
The initial split algorithm is the ability to split methods
that consist of multiple independent statements, seen by the stack
depth dropping to zero after a statement.
In the largeCodeGen test this change allowed the number of parameters
in the IN list query to increase from 3,400 to 97,000. The limit hit
at 98,000 was the number of constant pool entries.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@377609 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java",
"hunks": [
{
"added": [
" ",
" /**",
" * Code length at which to split into sub-methods.",
" * Normally set to the maximim code length the",
" * JV... |
derby-DERBY-1762-8bc31837 | Add DatabasePropertyTestSetup decorator that sets and clears database properties.
Fix a bug in SystemPropertyTestSetup noticed while testing DatabasePropertyTestSetup.
Change ConcurrencyTest to use DatabasePropertyTestSetup to work around bug DERBY-1762.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@436653 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/SystemPropertyTestSetup.java",
"hunks": [
{
"added": [
"\tprivate Properties newValues;",
"\tprivate Properties oldValues;"
],
"header": "@@ -34,8 +34,8 @@ import junit.framework.Test;",
"removed"... |
derby-DERBY-1764-0433f1a7 | DERBY-1764 Rewrite stress.multi as a JUnit test
enable StressMultiTest.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@704259 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/SystemPropertyTestSetup.java",
"hunks": [
{
"added": [
"\tprivate boolean staticProperties;"
],
"header": "@@ -36,6 +36,7 @@ public class SystemPropertyTestSetup extends TestSetup {",
"removed": []
},... |
derby-DERBY-1764-bde05cd1 | DERBY-1764 (partial) Rewrite stress.multi as a JUnit test
incremental improvements for error handling and change StressMulti50x59 should only do an embedded run.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@678051 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1767-69d1cb89 | DERBY-1767: insertRow(), updateRow() and deleteRow() cannot handle
table names and column names containing double quotes
Patch contributed by Fernanda Pizzorno.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@441185 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/client/org/apache/derby/client/am/ResultSet.java",
"hunks": [
{
"added": [
" insertSQL.append(quoteSqlIdentifier(",
" resultSetMetaData_.getColumnName(column)));"
],
"header": "@@ -4392,7 +4392,8 @@ publi... |
derby-DERBY-1768-a9988eb1 | DERBY-1768: Removed empty JDBC 4.0 RowId classes
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@440321 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/jdbc/Driver40.java",
"hunks": [
{
"added": [],
"header": "@@ -32,7 +32,6 @@ import org.apache.derby.impl.jdbc.EmbedConnection;",
"removed": [
"import org.apache.derby.impl.jdbc.EmbedRowId;"
]
}
]
}
] |
derby-DERBY-177-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-177-8c502aef | Reduced derby.locks.waitTimeout for UpdatableResultSetTest because one
of the test cases gets a lock timeout in an internal transaction
(compilation of a trigger statement). The hang is probably caused by
DERBY-177.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@544155 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-177-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-1773-b9e22cc3 | DERBY-1773: cursor updates fail with syntax error when column has an alias
This change enhances the runtime column analysis code so that an updatable
cursor can make a more nuanced decision about whether a column update is
or is not allowed.
Specifically, certain columns may not be updated, if they have been aliased.
Prior to this change, a confusing syntax error message would be delivered
when attempting to update an aliased column. Now, a more clear error message
is delivered, pointing at the fact that the aliased column is not in the
FOR UPDATE list of the cursor.
So the net result is (at least, should be) that the same set of queries are
accepted, but those that are not accepted have a slightly more clear message
issued when they are detected.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1734744 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java",
"hunks": [
{
"added": [
" \t/**",
"\t * Return true if some columns in this list are updatable.",
"\t *",
"\t * @return\ttrue if any column in list is updatable, else false"... |
derby-DERBY-1777-7e5c6699 | DERBY-1777: Commit Army's d1777_v2.patch, cleaning up an NPE in the optimizer.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@446924 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java",
"hunks": [
{
"added": [
"\t\t\t\t/* If we already assigned at least one position in the",
"\t\t\t\t * join order when this happened (i.e. if joinPosition",
"\t\t\t\t * is greater than *o... |
derby-DERBY-1784-b6c6e95c | DERBY-1784
contributed by Yip Ng
After studying the
compiler code abit more, I found that DML statements such as INSERT, UPDATE and DELETE also suffer from the same problem (they use different bind logic)
With that said, this patch attempts to address all the stated problems above
when column reference is qualified with a synonym table name.
The fundamental problem is that Derby does not keep the original unbound table
name around once the synonym is resolved. So the fix is to address this case
and apply the qualification properly.
In the VIEW resolution case, the system needs to preserve the synonym name as
VIEW gets expanded to a subquery, the name to be set should be the exposed
name of the table and not the resolved table name.
For * expansion in the SELECT list, if the FROM clause happens to be a synonym,
the system should prepend it with the unbound name and not the resolved table
name. This way the binding logic is normalized.
For DML cases, the synonym name needs to be normalized to its base table so that
setColumnDescriptor can apply correctly. When the system binds the expression
for this result column, it will resolve this properly since the column binding
logic are in the respective FromTable subclasses implementation where they
will use the exposed name this time to check for qualification.
I wrote more testcases for synonym.sql but I found out that this SQL file is
actually not part of derbylang suite, so the patch added this back to the test
bucket.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@447469 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java",
"hunks": [
{
"added": [
"\tprotected TableName synonymTableName;",
"\t"
],
"header": "@@ -128,7 +128,8 @@ abstract class DMLModStatementNode extends DMLStatementNode",
... |
derby-DERBY-1785-9082f658 | DERBY-1785
contributed by Myrna van Lunteren
patch: DERBY-1785_20061007.diff
Attaching a band-aid patch for this issue. I chose to comment out the method
rather than remove as a way to document the quirky behavior.
Having the method setSecurityProps overload the one in jvm.java causes
problems when running the junit tests - they *do* successfully run with
securityManager.
Foundation class tests actually run ok with security manager - except when
useprocess is false. This is caused by a bug in the jvm. See also DERBY-885.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@462607 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/functionTests/harness/j9_foundation.java",
"hunks": [
{
"added": [
"// Having the following method overload the one in jvm.java causes problems when running",
"// the junit tests - they *do* successfully run with securityManag... |
derby-DERBY-1786-9e2a7491 | DERBY-1786 (a crash during re-encryption may cause an unrecoverable db)
The problem was when transaction log spans more than one log file during (re)
encryption of the database and if there is a crash just before switching the
database to use the new encryption properties; On recovery checkpoint in the
first log file is used as reference and the next log file is assumed to have
the commit log record for (re) encryption and deleted incorrectly to force the
roll-back , which lead to the incomplete rollback of re-encryption. And that
caused recovery failures on next (re) encryption crashed.
This patch fixes the problem by ensuring there a checkpoint record in the
last log file before creating a new log file with new encryption properties
and writing the commit log record. Log is also flushed before making the
transaction log use the new encryption key to avoid any part of old log
records in the buffers getting encrypted with the new encryption key.
While working on this problem , I noticed error message thrown incase of
re-encryption failures are confusing, added a new error message to indicate
failures specific to (re) encryption.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@442647 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/store/raw/RawStore.java",
"hunks": [
{
"added": [
" logFactory.setDatabaseEncrypted(false);"
],
"header": "@@ -302,7 +302,7 @@ public final class RawStore implements RawStoreFactory, ModuleControl, ModuleSup",
... |
derby-DERBY-1787-439d1e86 | DERBY-1787
contributed by Mamta Satoor
patch: DERBY1787_UseCorrectTerminologyV1diff.txt
Grant revoke functionality was added in Derby 10.2 The comments that went into the grant revoke code, in some places refer to database owner as "dba". They are not the same thing. In the grant revoke world, dba is a role. We haven't added roles into Derby yet but current use of dba in comments might make it confusing when we do start working on roles including dba.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@448424 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java",
"hunks": [
{
"added": [
"\t * @param\taid\t AuthorizationID of current user to be made Database Owner"
],
"header": "@@ -303,7 +303,7 @@ public\tclass DD_Version implements\tFormatable",
... |
derby-DERBY-1790-4ea76b17 | Improve JDBC.dropSchema to include dropping synoyms based upon JDBC metadata. Includes a workaround for DERBY-1790.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@439845 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/JDBC.java",
"hunks": [
{
"added": [],
"header": "@@ -154,7 +154,6 @@ public class JDBC {",
"removed": [
"\t * TODO: Drop Synonyms"
]
},
{
"added": [
"",
" // S... |
derby-DERBY-1793-197f1c28 | DERBY-1793
Increasing the maximum time to wait for the server to start up from 30 to 60
seconds. The test checks in 500ms increments, so this change does not increase
the time for test to run for those who are already successfully running it.
So far this change has made this test pass in my environment, where previously
it failed consistently. Since this test passes in the nightly full test runs
across a number of environments I assume the network server startup time is
somehow related to my particular machine (processor, memory, disk frag, firewall, vpn, ...)
Others have seen this issue so I am committing to the codeline. I have filed
a separate issue that work should be done to measure the performance of
network server startup as a targeted test (DERBY-1794).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@439041 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1794-197f1c28 | DERBY-1793
Increasing the maximum time to wait for the server to start up from 30 to 60
seconds. The test checks in 500ms increments, so this change does not increase
the time for test to run for those who are already successfully running it.
So far this change has made this test pass in my environment, where previously
it failed consistently. Since this test passes in the nightly full test runs
across a number of environments I assume the network server startup time is
somehow related to my particular machine (processor, memory, disk frag, firewall, vpn, ...)
Others have seen this issue so I am committing to the codeline. I have filed
a separate issue that work should be done to measure the performance of
network server startup as a targeted test (DERBY-1794).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@439041 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1810-59912979 | DERBY-1810
Bumping the time to wait for server to start in this test. In my environment
this test is failing consistently (and bad error handling in the test then
causes this test to hang forever). Bumping the timeout so far has made it
pass (I tried it 10 times), where before it failed 10 times.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@439702 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1811-0c7cafc6 | DERBY-1811 Ensure embedded ResultSet.getTimestamp on a TIME column returns a java.sql.Timestamp with a date portion
equal to the current date at the time the getTimestamp method is called.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@448456 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/types/SQLTime.java",
"hunks": [
{
"added": [
" * Convert a SQL TIME to a JDBC java.sql.Timestamp.",
" * ",
" * Behaviour is to set the date portion of the Timestamp",
" * to the actual current ... |
derby-DERBY-1816-26b9e3cc | DERBY-1816 (partial): Pre-patch "cleanup" that does the following:
1) Replaces each of the recyclable Date, Time, and Timestamp arguments
with a recyclable java.util.Calendar object in client/am/Cursor.java.
2) Modifies the relevant code in client/am/DateTime.java to call methods
on the recyclable Calendar object instead of on Date, Time, and
Timestamp objects. The benefit to doing this is that we are now using
non-deprecated methods.
Note that even with this patch we are still creating a new instance of
Time/Timestamp/Date for each method--the cleanup patch does not change that.
Instead, the cleanup patch adds the instantiation of a new Calendar object
(one per client/am/Cursor) and then (re-)uses that object to replace the
deprecated calls.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@540740 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/client/org/apache/derby/client/am/Cursor.java",
"hunks": [
{
"added": [
" java.util.Calendar recyclableCalendar_ = null;"
],
"header": "@@ -95,9 +95,7 @@ public abstract class Cursor {",
"removed": [
" java.sql.Date recyclableDa... |
derby-DERBY-1816-33a27994 | DERBY-1816: ResultSet.getTime() on a SQL TIMESTAMP should retain millisecond
precision. Patch does the following:
1. Separates the timestamp parse logic in client/am/DateTime.java into a new
method called "parseTimestampString()". The new method takes a timestamp
string and a Calendar object, and sets the fields of the Calendar based on
the fields that are parsed from the timestamp string. The method also
returns the parsed microseconds value since that cannot be set on a
Calendar object (the precision of a Calendar is milliseconds).
2. Modifies timestampBytesToTimestamp(...) to call the new method for
parsing timestamps.
3. Changes the timestampBytesToTime(...) method so that it now parses the
full timestamp (via the new parseTimestampString() method) instead of
just parsing the hours, minutes, and seconds. Then a java.sql.Time
object is created from the Calendar object into which the timestamp
string was parsed. This allows us to preserve the sub-second resolution
that is parsed from the timestamp.
4. Re-enables the relevant test case in lang/TimeHandlingTest.java so that
it now runs in client mode.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@541333 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/client/org/apache/derby/client/am/DateTime.java",
"hunks": [
{
"added": [
" Calendar cal = getCleanCalendar(recyclableCal);",
"",
" /* java.sql.Timestamp has nanosecond precision, so we have to keep",
" * the parsed ... |
derby-DERBY-1817-86cae7bf | DERBY-1817: Race condition in network server's thread pool
Instead of always putting new sessions in the run queue when there are
free threads, the network server now compares the number of free
threads and the size of the run queue. This is done to prevent the run
queue from growing to a size greater than the number of free
threads. Also, the server now synchronizes on runQueue until the
session has been added to the queue. This is to prevent two threads
from deciding that there are enough free threads and adding the
session to the run queue, when there in fact only were enough free
threads for one of them. With this patch, I am not able to reproduce
DERBY-1757 on platforms where the failure was easily reproduced
before.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@441802 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/drda/org/apache/derby/impl/drda/ClientThread.java",
"hunks": [
{
"added": [],
"header": "@@ -47,7 +47,6 @@ final class ClientThread extends Thread {",
"removed": [
"\t\t\tSession clientSession = null;"
]
}
]
},
{
"file": "java... |
derby-DERBY-1817-aeb14c38 | DERBY-1817: Race condition in network server's thread pool
Clean-up of NetworkServerControlImpl:
- moves generation of connection number into addSession()
- adds new method removeThread() which can be used instead of
getThreadList().remove()
- removes methods that are no longer used
- makes methods that are only used by NetworkServerControlImpl private
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@442463 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java",
"hunks": [
{
"added": [
"\tprivate void runQueueAdd(Session clientSession)"
],
"header": "@@ -1856,7 +1856,7 @@ public final class NetworkServerControlImpl {",
"removed": [
... |
derby-DERBY-1817-cea6c946 | DERBY-1817: Race condition in network server's thread pool
Reduce the amount of code synchronized on runQueue in
NetworkServerControlImpl.addSession().
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@442462 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java",
"hunks": [
{
"added": [
"\t\t// Check whether there are enough free threads to service all the",
"\t\t// threads in the run queue in addition to the newly added session.",
"\t\tboolean... |
derby-DERBY-1824-22043364 | DERBY-1824: Permission/privlege names in exceptions should be in upper case as keywords, not lower case.
Patch contributed by Jazarine Jamal
Patch file: DERBY1824.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@629024 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/StatementTablePermission.java",
"hunks": [
{
"added": [
"\t\t\treturn \"SELECT\";",
"\t\t\treturn \"UPDATE\";",
"\t\t\treturn \"REFERENCES\";",
"\t\t\treturn \"INSERT\";",
"\t\t\tretur... |
derby-DERBY-1826-a997e8f1 | DERBY-1826: Add JUnit utility methods for database/server shutdown
Patch contributed by Deepa Remesh.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@448900 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/TestConfiguration.java",
"hunks": [
{
"added": [
" return getDefaultConnection(\"create=true\");"
],
"header": "@@ -408,7 +408,7 @@ public class TestConfiguration {",
"removed": [
" ... |
derby-DERBY-1826-f05a2f83 | DERBY-1522
contributed by Deepa Remesh, dremesh@gmail.com
Attaching a patch 'derby1522_v2.diff. It includes a JUnit test for testing the
switch to SQL standard authorization. It tests following:
1. grant/revoke is not available if derby.database.sqlAuthorization property
is not set.
2. grant/revoke is available when derby.database.sqlAuthorization is set to true.
3. Once derby.database.sqlAuthorization is set to true, it cannot be set to any other value.
This patch also modifies DatabasePropertyTestSetup.tearDown method. The tearDown method resets the property values to old values. It will now ignore exceptions when property reset is not supported. I am including this small change in the above patch. (I had opened DERBY-1827 for the issue with tearDown method. ). I am using TestUtil.getConnection method to shutdown the database. I have opened DERBY-1826 to add methods to Derby's JUnit classes for shutdown.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@441584 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/DatabasePropertyTestSetup.java",
"hunks": [
{
"added": [
"import org.apache.derbyTesting.functionTests.util.SQLStateConstants;",
""
],
"header": "@@ -29,6 +29,8 @@ import java.util.Properties;",
"... |
derby-DERBY-1827-f05a2f83 | DERBY-1522
contributed by Deepa Remesh, dremesh@gmail.com
Attaching a patch 'derby1522_v2.diff. It includes a JUnit test for testing the
switch to SQL standard authorization. It tests following:
1. grant/revoke is not available if derby.database.sqlAuthorization property
is not set.
2. grant/revoke is available when derby.database.sqlAuthorization is set to true.
3. Once derby.database.sqlAuthorization is set to true, it cannot be set to any other value.
This patch also modifies DatabasePropertyTestSetup.tearDown method. The tearDown method resets the property values to old values. It will now ignore exceptions when property reset is not supported. I am including this small change in the above patch. (I had opened DERBY-1827 for the issue with tearDown method. ). I am using TestUtil.getConnection method to shutdown the database. I have opened DERBY-1826 to add methods to Derby's JUnit classes for shutdown.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@441584 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/junit/DatabasePropertyTestSetup.java",
"hunks": [
{
"added": [
"import org.apache.derbyTesting.functionTests.util.SQLStateConstants;",
""
],
"header": "@@ -29,6 +29,8 @@ import java.util.Properties;",
"... |
derby-DERBY-183-37a2f5e8 | DERBY-183: Allow unnamed parameters in CREATE FUNCTION
This patch was contributed by James F. Adams (derby@xemaps.com)
The patch does the following:
1) Modifies java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
a) Initializes parameterName to "" in procedureParameterDefinition
and functionParameterDefinition
b) Makes parameterName optional in procedureParameterDefinition
and functionParameterDefinition
2) Modifies java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
to ignore function and procedure parameter names equal to "" when
checking for duplicate parameter names.
Tests have been added to lang/functions.sql and lang/procedure.java.
The parameter name is made optional by surrounding its production with [].
This changes the grammar from:
parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
typeDescriptor = dataTypeDDL()
to:
[ parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) ]
typeDescriptor = dataTypeDDL()
This results in a choice conflict because certain tokens satisfy both
identifier() and dataTypeDDL(). An additional token of lookahead resolves
this conflict. This results in:
[ LOOKAHEAD(2) parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) ]
typeDescriptor = dataTypeDDL()
Expressing this in an alternate form such as:
(
parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
typeDescriptor = dataTypeDDL()
) | typeDescriptor = dataTypeDDL()
still results in a choice conflict so I opted for the more compact form.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@463982 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/catalog/types/RoutineAliasInfo.java",
"hunks": [
{
"added": [
" * Describe a routine (procedure or function) alias."
],
"header": "@@ -34,7 +34,7 @@ import java.io.ObjectOutput;",
"removed": [
" * Describe a r ... |
derby-DERBY-1830-01b5d0b3 | DERBY-1830
missed new file VTITest.java in last commit.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@449116 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1847-41fbd581 | DERBY-1909: ALTER TABLE DROP COLUMN needs to update GRANTed privileges
When ALTER TABLE DROP COLUMN is used to drop a column from a table, it needs to update the GRANTed column privileges on that table.
The core of this proposed patch involves refactoring and reusing the
DERBY-1847 method which knows how to rewrite SYSCOLPERMS rows
to update the COLUMNS column. The DERBY-1847 version of that code
only handled the case of adding a bit to the COLUMNS column; this patch
extends that method to support removing a bit from the COLUMNS
column as well, then calls the method from the AlterTable execution logic.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@503550 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"\t{",
"\t\trewriteSYSCOLPERMSforAlterTable(tableID, tc, null);",
"\t}",
"\t/**",
"\t * Update SYSCOLPERMS due to dropping a column from ... |
derby-DERBY-1847-626d3159 | DERBY-1847
contributed by Mamta Satoor
patch: DERBY1846_V1_diff_AddColumnAndGrantRevoke.txt
To recap the problem, in SQL Authorization mode, when a new column is added to a table, the rows in SYSCOLPERMS for the table in question were not getting updated to incorporate the new column. This caused ASSERT failure when a non-table owner attempted to select the new column.
Some background information on system table involved: SYSCOLPERMS keeps track of column level privileges on a given table. One of the columns in SYSCOLPERMS is "COLUMNS" and it has a bit map to show which columns have the given permission granted on them. When a new column is added to the user table, the "COLUMNS" need to be expanded by one bit and that bit should be initialized to zero since no privileges have been granted on that column at the ALTER TABLE...ADD COLUMN time.
I have fixed this problem by having AlterTableConstantAction.addNewColumnToTable call the new method in DataDictionary called updateSYSCOLPERMSforAddColumnToUserTable. At this point, we know of only the TableDescriptor's uuid which can help us determine all the rows in SYSCOLPERMS for that given table uuid. I get ColPermsDescriptor for each one of those rows and then use the ColPermsDescriptor's uuid to update the "COLUMNS" column so SYSCOLPERMS is aware of the newly added column in user table. This fixes the problem because at the time of SELECT, when we do privilege lookup in SYSCOLPERMS, we have info on the newly added column.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@453352 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"\t/**",
"\t * Need to update SYSCOLPERMS for a given table because a new column has ",
"\t * been added to that table. SYSCOLPERMS has a column called \"COL... |
derby-DERBY-1852-0f0f8ade | DERBY-1852: Fix "modification of access paths" code in TableOperatorNode
so that the final query tree accurately reflects (and generates) the
necessary modified nodes. Patch also adds corresponding test cases
to lang/union.sql and updates master files accordingly.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@524940 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java",
"hunks": [
{
"added": [
"\t\t * have to generate a ProjectRestrictNode. Note: we want to check",
"\t\t * all SetOpNodes that exist in the subtree rooted at this SetOpNode.",
"\t\t * S... |
derby-DERBY-1856-47dd4379 | DERBY-1878
contributed by Sunitha Kambhampati
patch: derby1878.diff.txt
I am attaching the patch (derby1878.diff.txt) to improve some error handling in some of the network server tests.
1.The execCmdDumpResults used by the five tests timeslice.java,maxthreads.java,testij.java,runtimeinfo.java,sysinfo.java suffer from the same problems that was fixed for testProperties.java namely
-- the outputstream for the sub process's is not flushed out
-- there is no timeout handling for the ProcessStreamResult
2.Eliminate duplication of code in these 5 tests for execCmdDumpResults(String[] args) method. The execCmdDumpResults method basically exec's a new process and then waits for the process to dump the results. A new utility class - ExecProcUtil is added with execCmdDumpResults that is generalized to take the necessary input from the tests as well as fixes the issues mentioned in #1. The OutputStream is flushed out by calling bos.flush and System.out.flush and the timeout is added for ProcessStreamResult.
3.Make use of the TimedProcess to kill process if process does not exit within the timeout period.
4.TestConnection.java test has some variation of the execCmdDumpResults and it also adds some testcases into this method. Hence this method in this test is left as is and timeout handling is added.
5.testij.out has been updated. The previous master file was eating away the last line that was written to System.out, but now that the process's streams are flushed properly, the last line in testij.out test which prints out 'End test'
is also seen in the output file.
Also noticed that these tests - like timeslice.java, maxthreads.java all seem to set the properties for the server and then check if the property is set. The functionality of the server when these properties is set is not being tested. It will be good to add tests that test that the functionality itself is working as expected or not. Please note, recently connecting to server with timeslice options discovered some issues with server (see DERBY-1856).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@450508 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/ExecProcUtil.java",
"hunks": [
{
"added": [
"/*",
" ",
" Derby - Class org.apache.derbyTesting.functionTests.util.ExecProcUtil",
" ",
" Licensed to the Apache Software Foundatio... |
derby-DERBY-1858-28c633d8 | DERBY-1858
contributed by Yip Ng
patch: derby1858-trunk-diff02.txt
Fixes problem that DropSchemaNode's bind phase did not add the required schema
privilege for it to check at runtime.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@449869 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.services.sanity.SanityManager;"
],
"header": "@@ -27,6 +27,7 @@ import org.apache.derby.iapi.reference.SQLState;",
... |
derby-DERBY-1861-2bb13aca | DERBY-1861: ASSERT when combining references and expressions in ORDER BY
An ORDER BY clause wihch combines both column references and expressions
causes the sort engine to throw an ASSERT failure in sane builds.
The data structure problems that are exposed by DERBY-1861 both have to do
with the duplicate elimination processing. When the duplicate pulled-up
columns are eliminated from the result column list, the OrderByColumn and
ResultColumn instances may both end up with incorrect values.
The OrderByColumn class contains a field named addedColumnOffset. This
field records the offset of this particular OrderByColumn within the
portion of the result column list which contains pulled-up columns.
Each time a column is pulled up into the result column list, its
addedColumnOffset is set; thus the first pulled-up column has
addedColumnOffset = 0, the second pulled-up column has
addedColumnOffset = 1, etc.
However, later, when duplicate pulled-up result columns are detected
and removed by bind processing, the addedColumnOffset field is not
re-adjusted, and ends up with an invalid value.
The ResultColumn class contains a field named virtualColumnId. For columns
which are not directly from the underlying table, but rather are the result
of expressions that are computed at runtime, the columns are assigned a
virtualColumnId. For reasons similar to those of the addedColumnOffset,
this field also ends up wiht an invalid value when the duplicate
pulled-up columns are detected and removed from the result column list.
I decided that the best thing was to arrange to call each of the
OrderByColumn instances and ResultColumn instances at the point that
the duplicate result column is detected and removed, to give each of
those objects a chance to adjust its addedColumnOffset and
virtualColumnId value to reflect the removed column. Although this change
required a number of small changes, none of them was terribly complicated,
and the effect of the fix is that the data structures are as desired.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@520038 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OrderByColumn.java",
"hunks": [
{
"added": [
"\tprivate OrderByList list;"
],
"header": "@@ -46,6 +46,7 @@ public class OrderByColumn extends OrderedColumn {",
"removed": []
},
{
... |
derby-DERBY-1862-d52f8785 | DERBY-1862 Patch makes a map of column names to column number. The map is populated when the first call to findColumn is made.
Patch contributed by Andreas Korneliussen andreas.korneliussen@sun.com
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@448949 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"hunks": [
{
"added": [
"import org.apache.derby.iapi.util.ReuseFactory;"
],
"header": "@@ -57,6 +57,7 @@ import org.apache.derby.iapi.reference.JDBC20Translation;",
"removed": []
},... |
derby-DERBY-1866-cdd73ccf | DERBY-1866
contributed by Army Brown
patch: d1866_v1.patch
Attaching a first patch for this issue, d1866_v1.patch. In short, the problem was that, when pushing predicates to subqueries beneath UNIONs, the predicates were always being pushed to the *first* table in the subquery's FROM list, regardless of whether or not that was actually the correct table. Thus it was possible to push a predicate down to a base table to which it didn't apply, thereby leading to an assertion failure in sane mode and an index out of bounds exception in insane mode.
For details on how this occurred and what the fix is, please refer to the code comments in the patch. The d1866_v1 patch does the following:
1. Adds logic to ensure scoped predicates are only pushed
to the appropriate base tables.
2. Adds one line to OptimizerImpl to solve the hang that
was occuring for the second query shown in repro.sql.
The problem there was just that one variable was not
being properly reset when beginning a new round of
optimization.
3. Adds some test cases to verify the changes for #1 and
#2.
Note that the patch is mostly just explanatory comments for existing and new logic, plus the test cases.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@450155 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java",
"hunks": [
{
"added": [
"",
"\t\t/* If user specified the optimizer override for a fixed",
"\t\t * join order, then desiredJoinOrderFound could be true",
"\t\t * when we get he... |
derby-DERBY-1876-b408ff8d | DERBY-1876 Change currentRow in EmbedResultSet to be null if not on current row, otherwise be a reference to the current row of the top-level language result set. Avoids an object allocation per-EmbedResultSet that was never used.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@566311 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"hunks": [
{
"added": [],
"header": "@@ -51,13 +51,10 @@ import org.apache.derby.iapi.services.io.StreamStorable;",
"removed": [
"import org.apache.derby.iapi.services.io.LimitReader;",
... |
derby-DERBY-1876-c6012226 | DERBY-1876: Move conversion of query timeout to milliseconds out of
EmbedResultSet's constructor, and get column count without creating a
meta-data object
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@522445 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"hunks": [
{
"added": [
" private final long timeoutMillis;"
],
"header": "@@ -183,7 +183,7 @@ public abstract class EmbedResultSet extends ConnectionChild",
"removed": [
" ... |
derby-DERBY-1876-f512b2fc | DERBY-1879 Save the EmbedResultSetMetaData object and the case-insensitive column name map in the ResultDescription object
and not EmbedResultSet. This means these objects are created once per compiled plan (as needed) and not once per
EmbedResultSet (as needed). This improves the performance by reducing the overhead for simple queries (DERBY-1876).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@450607 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/sql/ResultDescription.java",
"hunks": [
{
"added": [
"\t * copy. The saved JDBC ResultSetMetaData will",
" * not be copied."
],
"header": "@@ -74,7 +74,8 @@ public interface ResultDescription",
"remove... |
derby-DERBY-1878-47dd4379 | DERBY-1878
contributed by Sunitha Kambhampati
patch: derby1878.diff.txt
I am attaching the patch (derby1878.diff.txt) to improve some error handling in some of the network server tests.
1.The execCmdDumpResults used by the five tests timeslice.java,maxthreads.java,testij.java,runtimeinfo.java,sysinfo.java suffer from the same problems that was fixed for testProperties.java namely
-- the outputstream for the sub process's is not flushed out
-- there is no timeout handling for the ProcessStreamResult
2.Eliminate duplication of code in these 5 tests for execCmdDumpResults(String[] args) method. The execCmdDumpResults method basically exec's a new process and then waits for the process to dump the results. A new utility class - ExecProcUtil is added with execCmdDumpResults that is generalized to take the necessary input from the tests as well as fixes the issues mentioned in #1. The OutputStream is flushed out by calling bos.flush and System.out.flush and the timeout is added for ProcessStreamResult.
3.Make use of the TimedProcess to kill process if process does not exit within the timeout period.
4.TestConnection.java test has some variation of the execCmdDumpResults and it also adds some testcases into this method. Hence this method in this test is left as is and timeout handling is added.
5.testij.out has been updated. The previous master file was eating away the last line that was written to System.out, but now that the process's streams are flushed properly, the last line in testij.out test which prints out 'End test'
is also seen in the output file.
Also noticed that these tests - like timeslice.java, maxthreads.java all seem to set the properties for the server and then check if the property is set. The functionality of the server when these properties is set is not being tested. It will be good to add tests that test that the functionality itself is working as expected or not. Please note, recently connecting to server with timeslice options discovered some issues with server (see DERBY-1856).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@450508 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/testing/org/apache/derbyTesting/functionTests/util/ExecProcUtil.java",
"hunks": [
{
"added": [
"/*",
" ",
" Derby - Class org.apache.derbyTesting.functionTests.util.ExecProcUtil",
" ",
" Licensed to the Apache Software Foundatio... |
derby-DERBY-1879-f512b2fc | DERBY-1879 Save the EmbedResultSetMetaData object and the case-insensitive column name map in the ResultDescription object
and not EmbedResultSet. This means these objects are created once per compiled plan (as needed) and not once per
EmbedResultSet (as needed). This improves the performance by reducing the overhead for simple queries (DERBY-1876).
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@450607 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/sql/ResultDescription.java",
"hunks": [
{
"added": [
"\t * copy. The saved JDBC ResultSetMetaData will",
" * not be copied."
],
"header": "@@ -74,7 +74,8 @@ public interface ResultDescription",
"remove... |
derby-DERBY-1894-76812041 | DERBY-1894
contributed by Yip Ng
patch: derby1894-trunk-diff02.txt
The fix is in FromBaseTable's getFromTableByName() method, where it is using
the resolved synonym table name to do the binding for ORDER BY column.
Patch includes additional tests.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@452259 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java",
"hunks": [
{
"added": [
"\t\t\t\t\t\t\t\t\t\t\t origTableName.getFullTableName());"
],
"header": "@@ -2260,7 +2260,7 @@ public class FromBaseTable extends FromTable",
"removed": [... |
derby-DERBY-1909-41fbd581 | DERBY-1909: ALTER TABLE DROP COLUMN needs to update GRANTed privileges
When ALTER TABLE DROP COLUMN is used to drop a column from a table, it needs to update the GRANTed column privileges on that table.
The core of this proposed patch involves refactoring and reusing the
DERBY-1847 method which knows how to rewrite SYSCOLPERMS rows
to update the COLUMNS column. The DERBY-1847 version of that code
only handled the case of adding a bit to the COLUMNS column; this patch
extends that method to support removing a bit from the COLUMNS
column as well, then calls the method from the AlterTable execution logic.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@503550 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java",
"hunks": [
{
"added": [
"\t{",
"\t\trewriteSYSCOLPERMSforAlterTable(tableID, tc, null);",
"\t}",
"\t/**",
"\t * Update SYSCOLPERMS due to dropping a column from ... |
derby-DERBY-1909-ee5857f3 | DERBY-1489: Provide ALTER TABLE DROP COLUMN functionality
This patch provides support for ALTER TABLE t DROP COLUMN c.
The patch modifies the SQL parser so that it supports statements of the form:
ALTER TABLE t DROP [COLUMN] c [CASCADE|RESTRICT]
If you don't specify CASCADE or RESTRICT, the default is CASCADE.
If you specify RESTRICT, then the column drop will be rejected if it would
cause a dependent view, trigger, check constraint, unique constraint,
foreign key constraint, or primary key constraint to become invalid.
Currently, column privileges are not properly adjusted when dropping a
column. This is bug DERBY-1909, and for now we simply reject DROP COLUMN
if it is specified when sqlAuthorization is true. When DERBY-1909 is fixed,
the tests in altertableDropColumn.sql should be merged into altertable.sql,
and altertableDropColumn.sql (and .out) should be removed.
This new feature is currently undocumented. DERBY-1926 tracks the documentation
changes necessary to document this feature.
The execution logic for ALTER TABLE DROP COLUMN is in AlterTableConstantAction,
and was not substantially modified by this change. The primary changes to
that existing code were:
- to hook RESTRICT processing up to the dependency manager so that
dependent view processing was sensitive to whether the user
had specified CASCADE or RESTRICT
- to reread the table descriptor from the catalogs after dropping all the
dependent schema objects and before compressing the table, so that the
proper scheman information was used during the compress.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@453420 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java",
"hunks": [
{
"added": [
"\t\t\tcase DependencyManager.DROP_COLUMN_RESTRICT:"
],
"header": "@@ -908,6 +908,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": []
... |
derby-DERBY-1913-79366f5f | DERBY-1913 storetests/st_reclaim_longcol.java fails intermittently
disabling test2, still machine dependent. test1 covers the original intended
code path to verify that blobs are marked for post commit immediately, rather
than waiting for all rows on a page to be deleted.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1242889 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1913-cf5ac0cc | DERBY-1913 storetests/st_reclaim_longcol.java fails intermittently
The test was counting on being able to control the number of FREE pages,
but the number is very dependent on ability of background thread to run
in a timely manner. Changed the test to check number of allocated pages,
which at least correctly tests that what we think should be background reclaimed
eventually is. Still needs some wait logic which I think will work better
now. I tested against knut's patch to delay the daemon 1 second for every
piece of work and the old test always failed and the new test succeeded.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1242620 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1914-2d14fe72 | DERBY-1914 test lang/wisconsin gives garbage output on zOS
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1355569 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1917-0aceaa9f | DERBY-1917: Clob.position fails with search strings longer than 256 chars
This patch was contributed by V. Narayanan (v.narayanan@sun.com)
The position algorithm proceeds in a chunked fashion, searching for 256
byte chunks of the search string at a time. The chunking algorithm contained
two flaws:
- tmpPatternS = searchStr.substring(patternIndex, 256);
+ tmpPatternS = searchStr.substring(patternIndex , patternIndex + 256);
searchStr.substring(patternIndex , patternIndex + 256); has to actually
return 256 characters starting from patternIndex. This was resulting in
an empty string being returned when the string length exceeded 256.
- tmpPatternS = searchStr;
+ tmpPatternS = searchStr.substring(patternIndex , patternLength);
Assume that the string length is 258 then in the first iteration it
returned 256. In the the second it was returning the whole string instead
of the remaining two characters. Doing a tmpPatternS =
searchStr.substring(patternIndex , patternLength); corrected this problem.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@493262 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedClob.java",
"hunks": [
{
"added": [
"\t* begins at position <code>start</code>. The method uses the following",
"\t* algorithm for the search",
"\t*",
"\t*",
"\t* 1)Is the length of the cur... |
derby-DERBY-1925-5110c0a4 | DERBY-1925 : (Add re-encrytion of database test cases to the upgrade test.)
Merged fix (r452682) from 10.2 branch to trunk.
This patch adds test cases to the upgrade test to test encryption of an
un-encrypted database and re-encryption of encrypted database.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@466279 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1926-ee5857f3 | DERBY-1489: Provide ALTER TABLE DROP COLUMN functionality
This patch provides support for ALTER TABLE t DROP COLUMN c.
The patch modifies the SQL parser so that it supports statements of the form:
ALTER TABLE t DROP [COLUMN] c [CASCADE|RESTRICT]
If you don't specify CASCADE or RESTRICT, the default is CASCADE.
If you specify RESTRICT, then the column drop will be rejected if it would
cause a dependent view, trigger, check constraint, unique constraint,
foreign key constraint, or primary key constraint to become invalid.
Currently, column privileges are not properly adjusted when dropping a
column. This is bug DERBY-1909, and for now we simply reject DROP COLUMN
if it is specified when sqlAuthorization is true. When DERBY-1909 is fixed,
the tests in altertableDropColumn.sql should be merged into altertable.sql,
and altertableDropColumn.sql (and .out) should be removed.
This new feature is currently undocumented. DERBY-1926 tracks the documentation
changes necessary to document this feature.
The execution logic for ALTER TABLE DROP COLUMN is in AlterTableConstantAction,
and was not substantially modified by this change. The primary changes to
that existing code were:
- to hook RESTRICT processing up to the dependency manager so that
dependent view processing was sensitive to whether the user
had specified CASCADE or RESTRICT
- to reread the table descriptor from the catalogs after dropping all the
dependent schema objects and before compressing the table, so that the
proper scheman information was used during the compress.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@453420 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java",
"hunks": [
{
"added": [
"\t\t\tcase DependencyManager.DROP_COLUMN_RESTRICT:"
],
"header": "@@ -908,6 +908,7 @@ public class SPSDescriptor extends TupleDescriptor",
"removed": []
... |
derby-DERBY-1931-6c248652 | DERBY-1931: Derby JAR files should be grouped as a single library in Package Explorer
Contributed by Aaron Tarter
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@581971 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/popup/actions/AddDerbyNature.java",
"hunks": [
{
"added": [
"import java.util.ArrayList;",
"import java.util.List;",
"",
"import org.apache.derby.ui.container.DerbyClasspathContainer;... |
derby-DERBY-1938-a92196cc | DERBY-1938: Add support for setObject(<arg>, null)
Allow calling the two-argument PreparedStatement.setObject method with null
to set a column value in the database to SQL NULL. The recommended way for
maximum portability is to use the three-argument setObject method or the
setNull method.
Patch file: derby-1938-1b-reworked_patch.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@995089 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1939-801c5156 | DERBY-1939
Bug was already fixed in trunk, merging added tests and new sanity
check from 10.1 codeline to trunk.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@454623 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java",
"hunks": [
{
"added": [],
"header": "@@ -18,7 +18,6 @@",
"removed": [
""
]
},
{
"added": [
"import org.apache.derby.iapi.services.sanity.SanityManager;... |
derby-DERBY-1940-d6e7d39f | DERBY-1940: Remove Ease of Development to conform to recent changes to the JDBC4 api.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@453913 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/client/org/apache/derby/client/am/LogicalConnection40.java",
"hunks": [
{
"added": [],
"header": "@@ -22,7 +22,6 @@",
"removed": [
"import java.sql.BaseQuery;"
]
}
]
},
{
"file": "java/client/org/apache/derby/client/net/NetCon... |
derby-DERBY-1942-2c865dd4 | - DERBY-1942 There exists difference between behavior of setNull(Types.TIME) and setTiime(null) - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@464202 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1944-8c22ad03 | DERBY-1944: jdbcapi/ParameterMappingTest.java test does not execute test for setObject(Blob/Clob) in DerbyNetClient.
Made the test execute tests for setObject(Blob) and setObject(Clob).
Patch file: derby-1944-1a.diff
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@674849 13f79535-47bb-0310-9956-ffa450edef68
| [] |
derby-DERBY-1947-10f111c7 | DERBY-1947 OutOfMemoryError after repeated calls to boot and shutdown a database
Committed DERBY-1947-4.diff.
git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@531638 13f79535-47bb-0310-9956-ffa450edef68
| [
{
"file": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"hunks": [
{
"added": [
"\t\tif (!isClosed() &&",
"\t\t\t\t(rootConnection == this) && ",
"\t\t\t\t(!autoCommit && !transactionIsIdle())) {",
"\t\t\tthrow newSQLException(",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.