[
https://issues.apache.org/jira/browse/DERBY-6664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14062583#comment-14062583
]
Knut Anders Hatlen commented on DERBY-6664:
-------------------------------------------
Hi Mike,
Since the upgrade/downgrade logic already invalidates all stored plans, there
should be no need to drop/recreate anything manually. The FKInfo objects are
only ever written to disk as part of a trigger's stored prepared plan, as far
as I can see, so the SPS invalidation should be sufficient.
This problem only affects 10.11, since FKInfo didn't have the schemaName field
in earlier versions. The schemaName field seems to be used by deferrable
constraints only, which is a new feature in 10.11, so this bug probably doesn't
affect any existing applications upgraded to 10.11.
All fields of FKInfo are stored/restored by writeObject()/readObject() after
this fix, so I believe the fix is complete.
All regression tests passed, by the way.
> Schema 'null' does not exist when trigger inserts into table with deferred
> foreign key
> --------------------------------------------------------------------------------------
>
> Key: DERBY-6664
> URL: https://issues.apache.org/jira/browse/DERBY-6664
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.11.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Attachments: d6664-1a.diff
>
>
> If you modify the repro attached to DERBY-6663 so that the foreign key
> constraint TREF is INITIALLY DEFERRED, the final insert statement will fail
> like this:
> {noformat}
> ij> insert into othertable values 1;
> ERROR 42Y07: Schema 'null' does not exist
> {noformat}
> I think the fix will be similar to DERBY-6663. FKInfo needs to store its
> schemaName field.
--
This message was sent by Atlassian JIRA
(v6.2#6252)