You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2006/08/02 01:40:24 UTC
svn commit: r427795 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16:
closed.out dcl.out releaseCompileLocks.out
Author: davidvc
Date: Tue Aug 1 16:40:24 2006
New Revision: 427795
URL: http://svn.apache.org/viewvc?rev=427795&view=rev
Log:
Fixed eol-style on these master files
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out (contents, props changed)
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/dcl.out (props changed)
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out (contents, props changed)
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out?rev=427795&r1=427794&r2=427795&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out Tue Aug 1 16:40:24 2006
@@ -1,31 +1,31 @@
-Test closed starting
-Test case for Derby-62 - serialization error with SQLException
-'DROP TABLE' cannot be performed on 'APP.DERBY62_DAIN_SUNDSTROM' because it does not exist.
-ERROR XJ012: 'Statement' already closed.
-ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
-ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
-ERROR 08003: No current connection.
-ERROR 08003: No current connection.
-ERROR 08003: No current connection.
-ERROR 08003: No current connection.
-ERROR 08003: No current connection.
-ERROR 08003: No current connection.
-ERROR 08003: No current connection.
-Test database shutdown ...
-SQL Exception: Database 'wombat' shutdown.
-Caused by: SQL Exception: Database 'wombat' shutdown.
- ... 13 more
-CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
-LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
-ERROR 08006: Database 'wombat' shutdown.
-Shutdown test completed.
-Test system shutdown ...
-SQL Exception: Database 'wombat' shutdown.
-Caused by: SQL Exception: Database 'wombat' shutdown.
- ... 13 more
-CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
-LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
-ERROR XJ015: Derby system shutdown.
-Shutdown test completed.
-PASS
-Test closed finished
+Test closed starting
+Test case for Derby-62 - serialization error with SQLException
+'DROP TABLE' cannot be performed on 'APP.DERBY62_DAIN_SUNDSTROM' because it does not exist.
+ERROR XJ012: 'Statement' already closed.
+ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
+ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
+ERROR 08003: No current connection.
+ERROR 08003: No current connection.
+ERROR 08003: No current connection.
+ERROR 08003: No current connection.
+ERROR 08003: No current connection.
+ERROR 08003: No current connection.
+ERROR 08003: No current connection.
+Test database shutdown ...
+SQL Exception: Database 'wombat' shutdown.
+Caused by: SQL Exception: Database 'wombat' shutdown.
+ ... 13 more
+CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
+LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
+ERROR 08006: Database 'wombat' shutdown.
+Shutdown test completed.
+Test system shutdown ...
+SQL Exception: Database 'wombat' shutdown.
+Caused by: SQL Exception: Database 'wombat' shutdown.
+ ... 13 more
+CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
+LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
+ERROR XJ015: Derby system shutdown.
+Shutdown test completed.
+PASS
+Test closed finished
Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/dcl.out
------------------------------------------------------------------------------
svn:eol-style = native
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out?rev=427795&r1=427794&r2=427795&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out Tue Aug 1 16:40:24 2006
@@ -1,213 +1,213 @@
-ij> autocommit off;
-ij> -- move static initializer tests to front, hoping to avoid class garbage
--- collection in jdk18. Sometimes the static initializer in the
--- DMLInStaticInitializer and InsertInStaticInitializer classes gets called
--- twice in jdk118 - causing a diff. This can happen if for some reason the
--- JVM decides to garbage collect the class between references to the class
--- in the course of executing the query.
--- static initializers.
-create table t1 (s int);
-0 rows inserted/updated/deleted
-ij> commit;
-ij> create function dmlstatic() returns INT
-parameter style java language java
-external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.DMLInStaticInitializer.getANumber'
-no sql;
-0 rows inserted/updated/deleted
-ij> create function insertstatic() returns INT
-parameter style java language java
-external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.InsertInStaticInitializer.getANumber'
-no sql;
-0 rows inserted/updated/deleted
-ij> commit;
-ij> -- the static initializer in DMLInStaticInitializer will select from t1
--- the DML will be executed within a nested query-- however all locks
--- on system tables which the static initializer gets should be released.
-select
-(dmlstatic())
-from sys.systables where tablename = 'SYSCONGLOMERATES';
-1
------------
-Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
-SQL Exception: The external routine is not allowed to execute SQL statements.
-Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
- ... 30 more
-1
-ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
-order by 1;
-TYPE |MODE|TABLENAME |LOCKNAME |STATE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> commit;
-ij> drop table t1;
-0 rows inserted/updated/deleted
-ij> create table t1 (s int);
-0 rows inserted/updated/deleted
-ij> commit;
-ij> select
-(insertstatic())
-from sys.systables where tablename = 'SYSCONGLOMERATES';
-1
------------
-Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
-SQL Exception: The external routine is not allowed to execute SQL statements.
-Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
- ... 30 more
-1
-ij> -- only two locks!
-select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
-order by 1;
-TYPE |MODE|TABLENAME |LOCKNAME |STATE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> -- verify that the row went into t1.
-select * from t1;
-S
------------
-ij> drop table t1;
-0 rows inserted/updated/deleted
-ij> commit;
-ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
-order by 1;
-TYPE |MODE|TABLENAME |LOCKNAME |STATE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> commit;
-ij> -- some really simple tests to start off.
-create table test_tab (x int);
-0 rows inserted/updated/deleted
-ij> insert into test_tab values (1);
-1 row inserted/updated/deleted
-ij> commit;
-ij> -- earlier we would get a bunch of locks on the system catalogs
--- when trying to resolve the method alias.
-select count(*) from syscs_diag.lock_table;
-1
------------
-0
-ij> -- select from a system catalog.
-select count(*) from sys.sysviews;
-1
------------
-0
-ij> -- look ma, no locks.
-select count(*) from syscs_diag.lock_table;
-1
------------
-0
-ij> insert into test_tab values (2);
-1 row inserted/updated/deleted
-ij> -- only see locks on test_tab, none on system catalogs
---
-select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
-order by 1;
-TYPE |MODE|TABLENAME |LOCKNAME |STATE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ROW |X |TEST_TAB |(1,8) |GRANT
-TABLE|IX |TEST_TAB |Tablelock |GRANT
-ij> -- bugid 3214, atlas case: 962505
--- selecting from a table would hold locks which would disallow creating
--- another table.
-drop table t1;
-ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist.
-ij> create table t1 (x int);
-0 rows inserted/updated/deleted
-ij> commit;
-ij> select * from t1;
-X
------------
-ij> connect 'wombat' as conn1;
-ij(CONN1)> -- this should not time out waiting for locks.
-create table t2 (x int);
-0 rows inserted/updated/deleted
-ij(CONN1)> drop table t2;
-0 rows inserted/updated/deleted
-ij(CONN1)> set connection connection0;
-ij(CONNECTION0)> disconnect conn1;
-ij> commit;
-ij> show connections;
-CONNECTION0* - jdbc:derby:wombat
-* = current connection
-ij> -- create table again to force scanning system catalogs.
-drop table test_tab;
-0 rows inserted/updated/deleted
-ij> create table test_tab (x int);
-0 rows inserted/updated/deleted
-ij> insert into test_tab values (1);
-1 row inserted/updated/deleted
-ij> commit;
-ij> -- prepare a statement-- no locks.
-prepare cursor1 as 'update test_tab set x=2 where x=?';
-ij> select count(*) from syscs_diag.lock_table;
-1
------------
-0
-ij> -- now execute it-- should see locks on test_tab
-execute cursor1 using 'values (1)';
-1 row inserted/updated/deleted
-ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
-order by 1;
-TYPE |MODE|TABLENAME |LOCKNAME |STATE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ROW |X |TEST_TAB |(1,7) |GRANT
-TABLE|IX |TEST_TAB |Tablelock |GRANT
-ij> commit;
-ij> -- problem with backing index scans.
-create table t (c1 int not null primary key, c2 int references t);
-0 rows inserted/updated/deleted
-ij> insert into t values (1,1);
-1 row inserted/updated/deleted
-ij> insert into t values (2,1);
-1 row inserted/updated/deleted
-ij> commit;
-ij> prepare ps as 'select * from t where c1 = ? and c2 = ?';
-ij> -- no locks, no locks at all.
-select * from syscs_diag.lock_table;
-XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> -- clear DataDictionary cache
-create table x(c1 int);
-0 rows inserted/updated/deleted
-ij> drop table x;
-0 rows inserted/updated/deleted
-ij> commit;
-ij> -- try inserting into the table; no locks on system catalogs.
-prepare pi as 'insert into t values (3,2)';
-ij> select * from syscs_diag.lock_table;
-XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> commit;
-ij> -- clear DataDictionary cache
-create table x(c1 int);
-0 rows inserted/updated/deleted
-ij> drop table x;
-0 rows inserted/updated/deleted
-ij> commit;
-ij> -- try updating the table; no locks on system catalogs.
-prepare p1 as 'update t set c2 = c1, c1 = c2';
-ij> select * from syscs_diag.lock_table;
-XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> commit;
-ij> -- clear DataDictionary cache
-create table x(c1 int);
-0 rows inserted/updated/deleted
-ij> drop table x;
-0 rows inserted/updated/deleted
-ij> commit;
-ij> -- try deleting from the table; no locks on system catalogs.
-prepare p1 as 'delete from t';
-ij> select * from syscs_diag.lock_table;
-XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> commit;
-ij> -- create some triggers.
-create trigger update_of_t after update on t for each row mode db2sql values 2;
-0 rows inserted/updated/deleted
-ij> create trigger insert_of_t after insert on t for each row mode db2sql values 3;
-0 rows inserted/updated/deleted
-ij> commit;
-ij> -- t has (1,1) (2,1) (3,2)
-prepare pu as 'update t set c2=2 where c1=2';
-ij> select * from syscs_diag.lock_table;
-XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-ij> commit;
-ij>
+ij> autocommit off;
+ij> -- move static initializer tests to front, hoping to avoid class garbage
+-- collection in jdk18. Sometimes the static initializer in the
+-- DMLInStaticInitializer and InsertInStaticInitializer classes gets called
+-- twice in jdk118 - causing a diff. This can happen if for some reason the
+-- JVM decides to garbage collect the class between references to the class
+-- in the course of executing the query.
+-- static initializers.
+create table t1 (s int);
+0 rows inserted/updated/deleted
+ij> commit;
+ij> create function dmlstatic() returns INT
+parameter style java language java
+external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.DMLInStaticInitializer.getANumber'
+no sql;
+0 rows inserted/updated/deleted
+ij> create function insertstatic() returns INT
+parameter style java language java
+external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.InsertInStaticInitializer.getANumber'
+no sql;
+0 rows inserted/updated/deleted
+ij> commit;
+ij> -- the static initializer in DMLInStaticInitializer will select from t1
+-- the DML will be executed within a nested query-- however all locks
+-- on system tables which the static initializer gets should be released.
+select
+(dmlstatic())
+from sys.systables where tablename = 'SYSCONGLOMERATES';
+1
+-----------
+Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
+SQL Exception: The external routine is not allowed to execute SQL statements.
+Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
+ ... 30 more
+1
+ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
+order by 1;
+TYPE |MODE|TABLENAME |LOCKNAME |STATE
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> commit;
+ij> drop table t1;
+0 rows inserted/updated/deleted
+ij> create table t1 (s int);
+0 rows inserted/updated/deleted
+ij> commit;
+ij> select
+(insertstatic())
+from sys.systables where tablename = 'SYSCONGLOMERATES';
+1
+-----------
+Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
+SQL Exception: The external routine is not allowed to execute SQL statements.
+Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
+ ... 30 more
+1
+ij> -- only two locks!
+select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
+order by 1;
+TYPE |MODE|TABLENAME |LOCKNAME |STATE
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> -- verify that the row went into t1.
+select * from t1;
+S
+-----------
+ij> drop table t1;
+0 rows inserted/updated/deleted
+ij> commit;
+ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
+order by 1;
+TYPE |MODE|TABLENAME |LOCKNAME |STATE
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> commit;
+ij> -- some really simple tests to start off.
+create table test_tab (x int);
+0 rows inserted/updated/deleted
+ij> insert into test_tab values (1);
+1 row inserted/updated/deleted
+ij> commit;
+ij> -- earlier we would get a bunch of locks on the system catalogs
+-- when trying to resolve the method alias.
+select count(*) from syscs_diag.lock_table;
+1
+-----------
+0
+ij> -- select from a system catalog.
+select count(*) from sys.sysviews;
+1
+-----------
+0
+ij> -- look ma, no locks.
+select count(*) from syscs_diag.lock_table;
+1
+-----------
+0
+ij> insert into test_tab values (2);
+1 row inserted/updated/deleted
+ij> -- only see locks on test_tab, none on system catalogs
+--
+select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
+order by 1;
+TYPE |MODE|TABLENAME |LOCKNAME |STATE
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ROW |X |TEST_TAB |(1,8) |GRANT
+TABLE|IX |TEST_TAB |Tablelock |GRANT
+ij> -- bugid 3214, atlas case: 962505
+-- selecting from a table would hold locks which would disallow creating
+-- another table.
+drop table t1;
+ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist.
+ij> create table t1 (x int);
+0 rows inserted/updated/deleted
+ij> commit;
+ij> select * from t1;
+X
+-----------
+ij> connect 'wombat' as conn1;
+ij(CONN1)> -- this should not time out waiting for locks.
+create table t2 (x int);
+0 rows inserted/updated/deleted
+ij(CONN1)> drop table t2;
+0 rows inserted/updated/deleted
+ij(CONN1)> set connection connection0;
+ij(CONNECTION0)> disconnect conn1;
+ij> commit;
+ij> show connections;
+CONNECTION0* - jdbc:derby:wombat
+* = current connection
+ij> -- create table again to force scanning system catalogs.
+drop table test_tab;
+0 rows inserted/updated/deleted
+ij> create table test_tab (x int);
+0 rows inserted/updated/deleted
+ij> insert into test_tab values (1);
+1 row inserted/updated/deleted
+ij> commit;
+ij> -- prepare a statement-- no locks.
+prepare cursor1 as 'update test_tab set x=2 where x=?';
+ij> select count(*) from syscs_diag.lock_table;
+1
+-----------
+0
+ij> -- now execute it-- should see locks on test_tab
+execute cursor1 using 'values (1)';
+1 row inserted/updated/deleted
+ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
+order by 1;
+TYPE |MODE|TABLENAME |LOCKNAME |STATE
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ROW |X |TEST_TAB |(1,7) |GRANT
+TABLE|IX |TEST_TAB |Tablelock |GRANT
+ij> commit;
+ij> -- problem with backing index scans.
+create table t (c1 int not null primary key, c2 int references t);
+0 rows inserted/updated/deleted
+ij> insert into t values (1,1);
+1 row inserted/updated/deleted
+ij> insert into t values (2,1);
+1 row inserted/updated/deleted
+ij> commit;
+ij> prepare ps as 'select * from t where c1 = ? and c2 = ?';
+ij> -- no locks, no locks at all.
+select * from syscs_diag.lock_table;
+XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> -- clear DataDictionary cache
+create table x(c1 int);
+0 rows inserted/updated/deleted
+ij> drop table x;
+0 rows inserted/updated/deleted
+ij> commit;
+ij> -- try inserting into the table; no locks on system catalogs.
+prepare pi as 'insert into t values (3,2)';
+ij> select * from syscs_diag.lock_table;
+XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> commit;
+ij> -- clear DataDictionary cache
+create table x(c1 int);
+0 rows inserted/updated/deleted
+ij> drop table x;
+0 rows inserted/updated/deleted
+ij> commit;
+ij> -- try updating the table; no locks on system catalogs.
+prepare p1 as 'update t set c2 = c1, c1 = c2';
+ij> select * from syscs_diag.lock_table;
+XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> commit;
+ij> -- clear DataDictionary cache
+create table x(c1 int);
+0 rows inserted/updated/deleted
+ij> drop table x;
+0 rows inserted/updated/deleted
+ij> commit;
+ij> -- try deleting from the table; no locks on system catalogs.
+prepare p1 as 'delete from t';
+ij> select * from syscs_diag.lock_table;
+XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> commit;
+ij> -- create some triggers.
+create trigger update_of_t after update on t for each row mode db2sql values 2;
+0 rows inserted/updated/deleted
+ij> create trigger insert_of_t after insert on t for each row mode db2sql values 3;
+0 rows inserted/updated/deleted
+ij> commit;
+ij> -- t has (1,1) (2,1) (3,2)
+prepare pu as 'update t set c2=2 where c1=2';
+ij> select * from syscs_diag.lock_table;
+XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ij> commit;
+ij>
Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out
------------------------------------------------------------------------------
svn:eol-style = native
Re: Huh? Changing eol-style causes the entire file to be changed?
Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
David Van Couvering wrote:
> Your explanation makes sense. It looks like the original files were
> committed on a Windows platform. I made the eol-style change on Linux.
> So that caused subversion to convert all the files.
>
> I did not run unix2dos on the files.
Perhaps I had to run dos2unix because I modified the file, which would
have added Unix line endings. And maybe svn complained because the file
was now a muddle of line endings, which it couldn't deal with but
dos2unix happily fixed.
-jean
> Thanks,
>
> David
>
> Jean T. Anderson wrote:
>
>> David Van Couvering wrote:
>>
>>> This commit message is very disconcerting. I specifically removed my
>>> patch-specific versions of these output files, did an svn update,
>>> changed the *eol-style property only* and did an svn diff to make sure
>>> that the only thing that was modified was the eol-style property, which
>>> svn diff very confidently reported to me as the only change.
>>>
>>> Yet, when I committed, each file is modified globally to use UNIX
>>> instead of Windows carriage-returns.
>>>
>>> Can someone who knows svn better than I explain what happened?
>>
>>
>> I have also been caught off guard and disarmed -- and it has made me
>> careful to not mix content changes and eol-style changes in one
>> commit. :-)
>>
>> And I don't have a complete explanation, but here's some tidbits I have
>> observed.
>>
>> For svn to be able to commit on your particular platform with eol-style
>> set to native, the file must be in the format of that platform. For
>> example, if on my linux machine I edit a file that has DOS line-endings,
>> I have found I can't just set the eol-style property; I get an error
>> back from svn when I try to commit the changes. I run 'unix2dos' on that
>> file, which does change all the line endings. So I try to do that
>> conversion and eol-style setting first, then modify the content and
>> commit that.
>>
>> It's possible that I could avoid the file conversion using a Windows
>> machine to set eol-style to native.
>>
>> Did you happen to do a 'dos2unix' or 'unix2dos' on the files for which
>> you set the property?
>>
>> -jean
>>
>>
Re: Huh? Changing eol-style causes the entire file to be changed?
Posted by David Van Couvering <Da...@Sun.COM>.
Your explanation makes sense. It looks like the original files were
committed on a Windows platform. I made the eol-style change on Linux.
So that caused subversion to convert all the files.
I did not run unix2dos on the files.
Thanks,
David
Jean T. Anderson wrote:
> David Van Couvering wrote:
>> This commit message is very disconcerting. I specifically removed my
>> patch-specific versions of these output files, did an svn update,
>> changed the *eol-style property only* and did an svn diff to make sure
>> that the only thing that was modified was the eol-style property, which
>> svn diff very confidently reported to me as the only change.
>>
>> Yet, when I committed, each file is modified globally to use UNIX
>> instead of Windows carriage-returns.
>>
>> Can someone who knows svn better than I explain what happened?
>
> I have also been caught off guard and disarmed -- and it has made me
> careful to not mix content changes and eol-style changes in one commit. :-)
>
> And I don't have a complete explanation, but here's some tidbits I have
> observed.
>
> For svn to be able to commit on your particular platform with eol-style
> set to native, the file must be in the format of that platform. For
> example, if on my linux machine I edit a file that has DOS line-endings,
> I have found I can't just set the eol-style property; I get an error
> back from svn when I try to commit the changes. I run 'unix2dos' on that
> file, which does change all the line endings. So I try to do that
> conversion and eol-style setting first, then modify the content and
> commit that.
>
> It's possible that I could avoid the file conversion using a Windows
> machine to set eol-style to native.
>
> Did you happen to do a 'dos2unix' or 'unix2dos' on the files for which
> you set the property?
>
> -jean
>
>
Re: Huh? Changing eol-style causes the entire file to be changed?
Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
David Van Couvering wrote:
> This commit message is very disconcerting. I specifically removed my
> patch-specific versions of these output files, did an svn update,
> changed the *eol-style property only* and did an svn diff to make sure
> that the only thing that was modified was the eol-style property, which
> svn diff very confidently reported to me as the only change.
>
> Yet, when I committed, each file is modified globally to use UNIX
> instead of Windows carriage-returns.
>
> Can someone who knows svn better than I explain what happened?
I have also been caught off guard and disarmed -- and it has made me
careful to not mix content changes and eol-style changes in one commit. :-)
And I don't have a complete explanation, but here's some tidbits I have
observed.
For svn to be able to commit on your particular platform with eol-style
set to native, the file must be in the format of that platform. For
example, if on my linux machine I edit a file that has DOS line-endings,
I have found I can't just set the eol-style property; I get an error
back from svn when I try to commit the changes. I run 'unix2dos' on that
file, which does change all the line endings. So I try to do that
conversion and eol-style setting first, then modify the content and
commit that.
It's possible that I could avoid the file conversion using a Windows
machine to set eol-style to native.
Did you happen to do a 'dos2unix' or 'unix2dos' on the files for which
you set the property?
-jean
Huh? Changing eol-style causes the entire file to be changed?
Posted by David Van Couvering <Da...@Sun.COM>.
This commit message is very disconcerting. I specifically removed my
patch-specific versions of these output files, did an svn update,
changed the *eol-style property only* and did an svn diff to make sure
that the only thing that was modified was the eol-style property, which
svn diff very confidently reported to me as the only change.
Yet, when I committed, each file is modified globally to use UNIX
instead of Windows carriage-returns.
Can someone who knows svn better than I explain what happened?
Thanks!
David
davidvc@apache.org wrote:
> Author: davidvc
> Date: Tue Aug 1 16:40:24 2006
> New Revision: 427795
>
> URL: http://svn.apache.org/viewvc?rev=427795&view=rev
> Log:
> Fixed eol-style on these master files
>
> Modified:
> db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out (contents, props changed)
> db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/dcl.out (props changed)
> db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out (contents, props changed)
>
> Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out
> URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out?rev=427795&r1=427794&r2=427795&view=diff
> ==============================================================================
> --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out (original)
> +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out Tue Aug 1 16:40:24 2006
> @@ -1,31 +1,31 @@
> -Test closed starting
> -Test case for Derby-62 - serialization error with SQLException
> -'DROP TABLE' cannot be performed on 'APP.DERBY62_DAIN_SUNDSTROM' because it does not exist.
> -ERROR XJ012: 'Statement' already closed.
> -ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
> -ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
> -ERROR 08003: No current connection.
> -ERROR 08003: No current connection.
> -ERROR 08003: No current connection.
> -ERROR 08003: No current connection.
> -ERROR 08003: No current connection.
> -ERROR 08003: No current connection.
> -ERROR 08003: No current connection.
> -Test database shutdown ...
> -SQL Exception: Database 'wombat' shutdown.
> -Caused by: SQL Exception: Database 'wombat' shutdown.
> - ... 13 more
> -CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
> -LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
> -ERROR 08006: Database 'wombat' shutdown.
> -Shutdown test completed.
> -Test system shutdown ...
> -SQL Exception: Database 'wombat' shutdown.
> -Caused by: SQL Exception: Database 'wombat' shutdown.
> - ... 13 more
> -CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
> -LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
> -ERROR XJ015: Derby system shutdown.
> -Shutdown test completed.
> -PASS
> -Test closed finished
> +Test closed starting
> +Test case for Derby-62 - serialization error with SQLException
> +'DROP TABLE' cannot be performed on 'APP.DERBY62_DAIN_SUNDSTROM' because it does not exist.
> +ERROR XJ012: 'Statement' already closed.
> +ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
> +ERROR XCL16: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
> +ERROR 08003: No current connection.
> +ERROR 08003: No current connection.
> +ERROR 08003: No current connection.
> +ERROR 08003: No current connection.
> +ERROR 08003: No current connection.
> +ERROR 08003: No current connection.
> +ERROR 08003: No current connection.
> +Test database shutdown ...
> +SQL Exception: Database 'wombat' shutdown.
> +Caused by: SQL Exception: Database 'wombat' shutdown.
> + ... 13 more
> +CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
> +LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
> +ERROR 08006: Database 'wombat' shutdown.
> +Shutdown test completed.
> +Test system shutdown ...
> +SQL Exception: Database 'wombat' shutdown.
> +Caused by: SQL Exception: Database 'wombat' shutdown.
> + ... 13 more
> +CALL sleep(10000) - 38000, 38000 -- InterruptedException, XJ001 -- InterruptedException
> +LOCK TABLE CLOSED.LOCKME IN EXCLUSIVE MODE - 08006, 08006 -- Database 'wombat' shutdown.
> +ERROR XJ015: Derby system shutdown.
> +Shutdown test completed.
> +PASS
> +Test closed finished
>
> Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/dcl.out
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
> Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out
> URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out?rev=427795&r1=427794&r2=427795&view=diff
> ==============================================================================
> --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out (original)
> +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out Tue Aug 1 16:40:24 2006
> @@ -1,213 +1,213 @@
> -ij> autocommit off;
> -ij> -- move static initializer tests to front, hoping to avoid class garbage
> --- collection in jdk18. Sometimes the static initializer in the
> --- DMLInStaticInitializer and InsertInStaticInitializer classes gets called
> --- twice in jdk118 - causing a diff. This can happen if for some reason the
> --- JVM decides to garbage collect the class between references to the class
> --- in the course of executing the query.
> --- static initializers.
> -create table t1 (s int);
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> create function dmlstatic() returns INT
> -parameter style java language java
> -external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.DMLInStaticInitializer.getANumber'
> -no sql;
> -0 rows inserted/updated/deleted
> -ij> create function insertstatic() returns INT
> -parameter style java language java
> -external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.InsertInStaticInitializer.getANumber'
> -no sql;
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> -- the static initializer in DMLInStaticInitializer will select from t1
> --- the DML will be executed within a nested query-- however all locks
> --- on system tables which the static initializer gets should be released.
> -select
> -(dmlstatic())
> -from sys.systables where tablename = 'SYSCONGLOMERATES';
> -1
> ------------
> -Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
> -SQL Exception: The external routine is not allowed to execute SQL statements.
> -Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
> - ... 30 more
> -1
> -ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> -order by 1;
> -TYPE |MODE|TABLENAME |LOCKNAME |STATE
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> commit;
> -ij> drop table t1;
> -0 rows inserted/updated/deleted
> -ij> create table t1 (s int);
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> select
> -(insertstatic())
> -from sys.systables where tablename = 'SYSCONGLOMERATES';
> -1
> ------------
> -Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
> -SQL Exception: The external routine is not allowed to execute SQL statements.
> -Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
> - ... 30 more
> -1
> -ij> -- only two locks!
> -select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> -order by 1;
> -TYPE |MODE|TABLENAME |LOCKNAME |STATE
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> -- verify that the row went into t1.
> -select * from t1;
> -S
> ------------
> -ij> drop table t1;
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> -order by 1;
> -TYPE |MODE|TABLENAME |LOCKNAME |STATE
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> commit;
> -ij> -- some really simple tests to start off.
> -create table test_tab (x int);
> -0 rows inserted/updated/deleted
> -ij> insert into test_tab values (1);
> -1 row inserted/updated/deleted
> -ij> commit;
> -ij> -- earlier we would get a bunch of locks on the system catalogs
> --- when trying to resolve the method alias.
> -select count(*) from syscs_diag.lock_table;
> -1
> ------------
> -0
> -ij> -- select from a system catalog.
> -select count(*) from sys.sysviews;
> -1
> ------------
> -0
> -ij> -- look ma, no locks.
> -select count(*) from syscs_diag.lock_table;
> -1
> ------------
> -0
> -ij> insert into test_tab values (2);
> -1 row inserted/updated/deleted
> -ij> -- only see locks on test_tab, none on system catalogs
> ---
> -select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> -order by 1;
> -TYPE |MODE|TABLENAME |LOCKNAME |STATE
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ROW |X |TEST_TAB |(1,8) |GRANT
> -TABLE|IX |TEST_TAB |Tablelock |GRANT
> -ij> -- bugid 3214, atlas case: 962505
> --- selecting from a table would hold locks which would disallow creating
> --- another table.
> -drop table t1;
> -ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist.
> -ij> create table t1 (x int);
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> select * from t1;
> -X
> ------------
> -ij> connect 'wombat' as conn1;
> -ij(CONN1)> -- this should not time out waiting for locks.
> -create table t2 (x int);
> -0 rows inserted/updated/deleted
> -ij(CONN1)> drop table t2;
> -0 rows inserted/updated/deleted
> -ij(CONN1)> set connection connection0;
> -ij(CONNECTION0)> disconnect conn1;
> -ij> commit;
> -ij> show connections;
> -CONNECTION0* - jdbc:derby:wombat
> -* = current connection
> -ij> -- create table again to force scanning system catalogs.
> -drop table test_tab;
> -0 rows inserted/updated/deleted
> -ij> create table test_tab (x int);
> -0 rows inserted/updated/deleted
> -ij> insert into test_tab values (1);
> -1 row inserted/updated/deleted
> -ij> commit;
> -ij> -- prepare a statement-- no locks.
> -prepare cursor1 as 'update test_tab set x=2 where x=?';
> -ij> select count(*) from syscs_diag.lock_table;
> -1
> ------------
> -0
> -ij> -- now execute it-- should see locks on test_tab
> -execute cursor1 using 'values (1)';
> -1 row inserted/updated/deleted
> -ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> -order by 1;
> -TYPE |MODE|TABLENAME |LOCKNAME |STATE
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ROW |X |TEST_TAB |(1,7) |GRANT
> -TABLE|IX |TEST_TAB |Tablelock |GRANT
> -ij> commit;
> -ij> -- problem with backing index scans.
> -create table t (c1 int not null primary key, c2 int references t);
> -0 rows inserted/updated/deleted
> -ij> insert into t values (1,1);
> -1 row inserted/updated/deleted
> -ij> insert into t values (2,1);
> -1 row inserted/updated/deleted
> -ij> commit;
> -ij> prepare ps as 'select * from t where c1 = ? and c2 = ?';
> -ij> -- no locks, no locks at all.
> -select * from syscs_diag.lock_table;
> -XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> -- clear DataDictionary cache
> -create table x(c1 int);
> -0 rows inserted/updated/deleted
> -ij> drop table x;
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> -- try inserting into the table; no locks on system catalogs.
> -prepare pi as 'insert into t values (3,2)';
> -ij> select * from syscs_diag.lock_table;
> -XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> commit;
> -ij> -- clear DataDictionary cache
> -create table x(c1 int);
> -0 rows inserted/updated/deleted
> -ij> drop table x;
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> -- try updating the table; no locks on system catalogs.
> -prepare p1 as 'update t set c2 = c1, c1 = c2';
> -ij> select * from syscs_diag.lock_table;
> -XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> commit;
> -ij> -- clear DataDictionary cache
> -create table x(c1 int);
> -0 rows inserted/updated/deleted
> -ij> drop table x;
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> -- try deleting from the table; no locks on system catalogs.
> -prepare p1 as 'delete from t';
> -ij> select * from syscs_diag.lock_table;
> -XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> commit;
> -ij> -- create some triggers.
> -create trigger update_of_t after update on t for each row mode db2sql values 2;
> -0 rows inserted/updated/deleted
> -ij> create trigger insert_of_t after insert on t for each row mode db2sql values 3;
> -0 rows inserted/updated/deleted
> -ij> commit;
> -ij> -- t has (1,1) (2,1) (3,2)
> -prepare pu as 'update t set c2=2 where c1=2';
> -ij> select * from syscs_diag.lock_table;
> -XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> -ij> commit;
> -ij>
> +ij> autocommit off;
> +ij> -- move static initializer tests to front, hoping to avoid class garbage
> +-- collection in jdk18. Sometimes the static initializer in the
> +-- DMLInStaticInitializer and InsertInStaticInitializer classes gets called
> +-- twice in jdk118 - causing a diff. This can happen if for some reason the
> +-- JVM decides to garbage collect the class between references to the class
> +-- in the course of executing the query.
> +-- static initializers.
> +create table t1 (s int);
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> create function dmlstatic() returns INT
> +parameter style java language java
> +external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.DMLInStaticInitializer.getANumber'
> +no sql;
> +0 rows inserted/updated/deleted
> +ij> create function insertstatic() returns INT
> +parameter style java language java
> +external name 'org.apache.derbyTesting.functionTests.util.StaticInitializers.InsertInStaticInitializer.getANumber'
> +no sql;
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> -- the static initializer in DMLInStaticInitializer will select from t1
> +-- the DML will be executed within a nested query-- however all locks
> +-- on system tables which the static initializer gets should be released.
> +select
> +(dmlstatic())
> +from sys.systables where tablename = 'SYSCONGLOMERATES';
> +1
> +-----------
> +Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
> +SQL Exception: The external routine is not allowed to execute SQL statements.
> +Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
> + ... 30 more
> +1
> +ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> +order by 1;
> +TYPE |MODE|TABLENAME |LOCKNAME |STATE
> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> commit;
> +ij> drop table t1;
> +0 rows inserted/updated/deleted
> +ij> create table t1 (s int);
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> select
> +(insertstatic())
> +from sys.systables where tablename = 'SYSCONGLOMERATES';
> +1
> +-----------
> +Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
> +SQL Exception: The external routine is not allowed to execute SQL statements.
> +Caused by: SQL Exception: The external routine is not allowed to execute SQL statements.
> + ... 30 more
> +1
> +ij> -- only two locks!
> +select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> +order by 1;
> +TYPE |MODE|TABLENAME |LOCKNAME |STATE
> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> -- verify that the row went into t1.
> +select * from t1;
> +S
> +-----------
> +ij> drop table t1;
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> +order by 1;
> +TYPE |MODE|TABLENAME |LOCKNAME |STATE
> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> commit;
> +ij> -- some really simple tests to start off.
> +create table test_tab (x int);
> +0 rows inserted/updated/deleted
> +ij> insert into test_tab values (1);
> +1 row inserted/updated/deleted
> +ij> commit;
> +ij> -- earlier we would get a bunch of locks on the system catalogs
> +-- when trying to resolve the method alias.
> +select count(*) from syscs_diag.lock_table;
> +1
> +-----------
> +0
> +ij> -- select from a system catalog.
> +select count(*) from sys.sysviews;
> +1
> +-----------
> +0
> +ij> -- look ma, no locks.
> +select count(*) from syscs_diag.lock_table;
> +1
> +-----------
> +0
> +ij> insert into test_tab values (2);
> +1 row inserted/updated/deleted
> +ij> -- only see locks on test_tab, none on system catalogs
> +--
> +select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> +order by 1;
> +TYPE |MODE|TABLENAME |LOCKNAME |STATE
> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ROW |X |TEST_TAB |(1,8) |GRANT
> +TABLE|IX |TEST_TAB |Tablelock |GRANT
> +ij> -- bugid 3214, atlas case: 962505
> +-- selecting from a table would hold locks which would disallow creating
> +-- another table.
> +drop table t1;
> +ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist.
> +ij> create table t1 (x int);
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> select * from t1;
> +X
> +-----------
> +ij> connect 'wombat' as conn1;
> +ij(CONN1)> -- this should not time out waiting for locks.
> +create table t2 (x int);
> +0 rows inserted/updated/deleted
> +ij(CONN1)> drop table t2;
> +0 rows inserted/updated/deleted
> +ij(CONN1)> set connection connection0;
> +ij(CONNECTION0)> disconnect conn1;
> +ij> commit;
> +ij> show connections;
> +CONNECTION0* - jdbc:derby:wombat
> +* = current connection
> +ij> -- create table again to force scanning system catalogs.
> +drop table test_tab;
> +0 rows inserted/updated/deleted
> +ij> create table test_tab (x int);
> +0 rows inserted/updated/deleted
> +ij> insert into test_tab values (1);
> +1 row inserted/updated/deleted
> +ij> commit;
> +ij> -- prepare a statement-- no locks.
> +prepare cursor1 as 'update test_tab set x=2 where x=?';
> +ij> select count(*) from syscs_diag.lock_table;
> +1
> +-----------
> +0
> +ij> -- now execute it-- should see locks on test_tab
> +execute cursor1 using 'values (1)';
> +1 row inserted/updated/deleted
> +ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
> +order by 1;
> +TYPE |MODE|TABLENAME |LOCKNAME |STATE
> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ROW |X |TEST_TAB |(1,7) |GRANT
> +TABLE|IX |TEST_TAB |Tablelock |GRANT
> +ij> commit;
> +ij> -- problem with backing index scans.
> +create table t (c1 int not null primary key, c2 int references t);
> +0 rows inserted/updated/deleted
> +ij> insert into t values (1,1);
> +1 row inserted/updated/deleted
> +ij> insert into t values (2,1);
> +1 row inserted/updated/deleted
> +ij> commit;
> +ij> prepare ps as 'select * from t where c1 = ? and c2 = ?';
> +ij> -- no locks, no locks at all.
> +select * from syscs_diag.lock_table;
> +XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> -- clear DataDictionary cache
> +create table x(c1 int);
> +0 rows inserted/updated/deleted
> +ij> drop table x;
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> -- try inserting into the table; no locks on system catalogs.
> +prepare pi as 'insert into t values (3,2)';
> +ij> select * from syscs_diag.lock_table;
> +XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> commit;
> +ij> -- clear DataDictionary cache
> +create table x(c1 int);
> +0 rows inserted/updated/deleted
> +ij> drop table x;
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> -- try updating the table; no locks on system catalogs.
> +prepare p1 as 'update t set c2 = c1, c1 = c2';
> +ij> select * from syscs_diag.lock_table;
> +XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> commit;
> +ij> -- clear DataDictionary cache
> +create table x(c1 int);
> +0 rows inserted/updated/deleted
> +ij> drop table x;
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> -- try deleting from the table; no locks on system catalogs.
> +prepare p1 as 'delete from t';
> +ij> select * from syscs_diag.lock_table;
> +XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> commit;
> +ij> -- create some triggers.
> +create trigger update_of_t after update on t for each row mode db2sql values 2;
> +0 rows inserted/updated/deleted
> +ij> create trigger insert_of_t after insert on t for each row mode db2sql values 3;
> +0 rows inserted/updated/deleted
> +ij> commit;
> +ij> -- t has (1,1) (2,1) (3,2)
> +prepare pu as 'update t set c2=2 where c1=2';
> +ij> select * from syscs_diag.lock_table;
> +XID |TYPE |MODE|TABLENAME |LOCKNAME |STATE|TABLETYPE|LOCK&|INDEXNAME
> +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> +ij> commit;
> +ij>
>
> Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/releaseCompileLocks.out
> ------------------------------------------------------------------------------
> svn:eol-style = native
>
>