dynamobi/dynamobi — Issue #730: [FRG-141] table created via jdbc internal query in a udx produces lock error when queried
Author: dynamobi-build
Created: 2011-12-30 03:45:43+00:00
State: closed
Labels: FRG, UDF

[reporter="elin", created="Mon, 5 Jun 2006 17:03:25 -0500 (GMT-05:00)"]

To reproduce:

create schema ct;

set schema 'ct';

set path 'ct';

create table t1 (cola int, colb varchar(20));

insert into t1 values (1, 'one'), (2, 'two');

create function create_table_as_select(schema_name varchar(65535), table_name varchar(65535), c cursor)

returns table(errors varchar(65535))

language java

parameter style system defined java

modifies sql data

external name 'class com.lucidera.luciddb.test.udr.CreateTableAsSelectUdx.execute';

select * from table(

create_table_as_select(

'CT',

'MYTABLE',

cursor(select * from t1)

));

-- this produces the error:

select * from ct.mytable order by 1;

Stack trace:

Error: Failed to acquire lock on LOCALDB.CT.MYTABLE (state=,code=0)

net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: Failed to acquire lock on LOCALDB.CT.MYTABLE

at net.sf.farrago.resource.FarragoResource$_Def0.ex(FarragoResource.java:1352)

at com.lucidera.farrago.LucidDbTxnMgr.acquireLock(LucidDbTxnMgr.java:118)

at com.lucidera.farrago.LucidDbTxnMgr.accessTable(LucidDbTxnMgr.java:90)

at net.sf.farrago.db.FarragoDbNullTxnMgr.accessTablePrivate(FarragoDbNullTxnMgr.java:130)

at net.sf.farrago.db.FarragoDbNullTxnMgr.accessTables(FarragoDbNullTxnMgr.java:115)

at net.sf.farrago.db.FarragoDbStmtContextBase.accessTables(FarragoDbStmtContextBase.java:264)

at net.sf.farrago.db.FarragoDbStmtContext.execute(FarragoDbStmtContext.java:209)

at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:107)

at sqlline.SqlLine$Commands.execute(Ljava.lang.String;Z)Z(Unknown Source)

at sqlline.SqlLine$Commands.sql(Ljava.lang.String;)Z(Unknown Source)

at sqlline.SqlLine.dispatch(Ljava.lang.String;)Z(Unknown Source)

at sqlline.SqlLine.begin([Ljava.lang.String;Ljava.io.InputStream;)V(Unknown Source)

at sqlline.SqlLine.mainWithInputRedirection([Ljava.lang.String;Ljava.io.InputStream;)V(Unknown Source)

at sqlline.SqlLine.main([Ljava.lang.String;)V(Unknown Source)