Hi,
Thanks a lot for the great test case! Yes this is a bug. The problem
is actually 'rename table'. I found an even simpler test case:
create table test(id int, parent int references test(id) on delete cascade);
insert into test values(0, 0);
alter table test rename to test2;
delete from test2;
This will be fixed in the next release of course.
Regards,
Thomas
On Fri, Oct 10, 2008 at 6:34 PM, Jacek <[EMAIL PROTECTED]> wrote:
>
> I found this code:
>
> stmt.executeUpdate("create table master (id identity)");
> stmt.executeUpdate("create table detail (id identity,
> master_id bigint"
> +", constraint detail_master_fk foreign key (master_id)
> references master (id) on delete cascade)");
>
> stmt.executeUpdate("alter table detail alter column master_id
> bigint");
>
> stmt.executeUpdate("insert into master values (0)");
> stmt.executeUpdate("insert into detail values (0,0)");
> stmt.executeUpdate("delete from master where id=0");
>
> throwing an exception:
>
> Table TEMP_TABLE_2_0 not found; SQL statement:
> DELETE FROM PUBLIC.TEMP_TABLE_2_0 WHERE MASTER_ID=? [42102-79]
>
> The snippet works if you remove the alter statement.
> This is strange because the alter statement does not in fact change
> anything.
> Is it a bug?
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---