db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: DERBY 4509 related query
Date Mon, 18 Jan 2010 09:35:32 GMT
Jayaram Subramanian <rsjay1976@gmail.com> writes:

> Hi,
> In the process of converting autoincrement.sql to JUNIT, i encountered the
> following the set of statements
> create table t1 (x int, yyy int generated always as identity (start with  0));
> autocommit off;
> insert into t1 (x) values (1);
> insert into t1 (x) values (2);
> select * from t1;
> -- should see only locks on t1, no locks on system catalogs.
> select * from syscs_diag.lock_table order by tablename, type desc, mode, cnt;
> What is the output to be validated for the query against the
> syscs_diag.lock_table? When i tried running the queries in IJ the
> syscs_diag.lock_table query returned me a recordset with 31 rows...  The
> comment indicates locks on t1 and no locks on system catalogs.. How can i
> distinguish  lock and no lock?

Hi Jayaram,

I think you can check this by going through the result and verify that
all rows have tablename T1. You check no lock on system catalogs by
checking that there is no row with a tablename that equals one of the
system tables, but no explicit check for that is needed when you already
know that all rows have tablename T1.

Knut Anders

View raw message