"ERROR: Can not prepare request: null" on deletion

Bug #1154926 reported by Alvin Peng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stado
Fix Committed
Undecided
Unassigned

Bug Description

create table USER(
USER_ID varchar2(32) not null,
USER_NAME varchar2(32) not null);

alter table USER add constraint PK_USER primary key(USER_ID);

create table ACTION_RECORD(
ACTION_ID varchar2(32) not null,
USER_ID varchar2(32) not null);

alter table ACTION_RECORD add constraint PK_ACTION primary key(ACTION_ID);
alter table ACTION_RECORD add constraint FK_USER foreign key(USER_ID) references USER(USER_ID);

test2rep=> delete from user where user_id=1;
ERROR: Can not prepare request: null

=========
In SqlModifyTable.java:

public void prepare() throws Exception {
...
            tempTable = createTempTableMetadata(getTargetTable(),
                    getColumnsInvolved());
            dataSource = prepareDataSource(targetTable, tempTable);
            for (IConstraintChecker validator : validators) {
                validator.setTempTable(tempTable);
                validator.prepare();
            }
...
}

The tempTable is null, so validator.prepare(); throws the exception.

Related branches

Changed in stado:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.