db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: [jira] Created: (DERBY-365) inplace compress on synonym throws an assert failure. (may be it should not be allowed).
Date Wed, 15 Jun 2005 15:31:07 GMT
I just tried this on the trunk and am not seeing the ASSERT.  I am 
getting a table not exists error, which is the same as the error you
get if you try a drop table on the synonym name.  The new system 
procedure seems to act the same as the existing procedure.

Anyone know if a recent fix has gone into trunk which is not in the 10.1
release which would affect this?  I know there have been no changes in
the inplace compress table code for this.

ij version 10.2
CONNECTION0* -  jdbc:derby:wombat
* = current connection
ij> drop table t1;
0 rows inserted/updated/deleted
ij> drop synonym s1;
0 rows inserted/updated/deleted
ij> create table t1(a int );
0 rows inserted/updated/deleted
ij> insert into t1 values (1);
1 row inserted/updated/deleted
ij> insert into s1 values (2);
ERROR 42X05: Table 'S1' does not exist.
ij> select * from s1;
ERROR 42X05: Table 'S1' does not exist.
ij> create synonym s1 for t1;
0 rows inserted/updated/deleted
ij> drop table s1;
ERROR 42Y55: 'DROP TABLE' cannot be performed on 'S1' because it does 
not exist.

ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP' , 'S1' , 1 , 1, 1) ;
ERROR 42X05: Table 'APP.S1' does not exist.
ij> call SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP' , 'S1' , 1) ;
ERROR 38000: The exception 'SQL Exception: 'ALTER TABLE' cannot be 
performed on
'APP.S1' because it does not exist.' was thrown while evaluating an 
expression.
ERROR 42Y55: 'ALTER TABLE' cannot be performed on 'APP.S1' because it 
does not e
xist.


Suresh Thalamati (JIRA) wrote:
> inplace compress on synonym throws an assert failure.  (may  be it  should not be allowed).

> --------------------------------------------------------------------------------------------
> 
>          Key: DERBY-365
>          URL: http://issues.apache.org/jira/browse/DERBY-365
>      Project: Derby
>         Type: Bug
>   Components: SQL  
>     Versions: 10.1.0.0    
>     Reporter: Suresh Thalamati
>     Priority: Minor
> 
> 
> I think in place compress option  should not  be allowed on synonyms,  currenly  engine
throws assert on debug build, will throw NPE on  insane build. 
> 
> repro:
> ij version 10.1
> ij> connect 'jdbc:derby:wombat;create=true';
> ij> create table t1(a int ) ;
> 0 rows inserted/updated/deleted
> ij> create synonym s1 for t1 ;
> 0 rows inserted/updated/deleted
> ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP' , 'S1' ,  1 , 1, 1) ;
> ERROR 38000: The exception 'org.apache.derby.iapi.services.sanity.AssertFailure:
>  ASSERT FAILED cd is expected to be non-null for S1' was thrown while evaluating
>  an expression.
> ERROR XJ001: Java exception: 'ASSERT FAILED cd is expected to be non-null for S1
> : org.apache.derby.iapi.services.sanity.AssertFailure'.
> ij>
> 
> 
> stack::
> org.apache.derby.iapi.services.sanity.AssertFailure: ASSERT FAILED cd is expecte
> d to be non-null for T1
>         at org.apache.derby.iapi.services.sanity.SanityManager.THROWASSERT(Sanit
> yManager.java:150)
>         at org.apache.derby.iapi.sql.dictionary.TableDescriptor.getHeapConglomer
> ateId(TableDescriptor.java:340)
>         at org.apache.derby.iapi.db.OnlineCompress.defragmentRows(OnlineCompress
> .java:228)
>         at org.apache.derby.iapi.db.OnlineCompress.compressTable(OnlineCompress.
> java:154)
>         at org.apache.derby.catalog.SystemProcedures.SYSCS_INPLACE_COMPRESS_TABL
> E(SystemProcedures.java:745)
>         at org.apache.derby.exe.acf81e0010x0104x7d99xc315x0000001688d81.g0(Unkno
> wn Source)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMe
> thod.java:45)
>         at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallSta
> tementResultSet.java:67)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPre
> paredStatement.java:366)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedState
> ment.java:1108)
>         at org.apache.derby.impl.jdbcI th.EmbedStatement.execute(EmbedStatement.java
> :517)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java
> :475)
>         at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:299)
>         at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:433)
>         at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:310)
>         at org.apache.derby.impl.tools.ij.Main.go(Main.java:203)
>         at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169)
>         at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
>         at org.apache.derby.tools.ij.main(ij.java:60)
> ============= end nested exception, level (1) ===========
> 
> 
> 
> 


Mime
View raw message