|
From: <no...@so...> - 2001-09-05 17:12:46
|
Bugs item #406355, was opened at 2001-03-06 08:24 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=109028&aid=406355&group_id=9028 Category: Core Engine Group: Initial Bug Status: Open Resolution: None Priority: 5 Submitted By: Roman Novoseloff (romannovoseloff) Assigned to: Nobody/Anonymous (nobody) Summary: Deletion from referenced tables in SP Initial Comment: Deletion from referenced tables in SP does'nt raise exception. For example: 8<--- begin script SET SQL DIALECT 3; CREATE DATABASE 'c:\test.gdb' USER 'SYSDBA' PASSWORD '******' PAGE_SIZE 1024; CREATE TABLE "Table1" ( "id" INTEGER NOT NULL, "foreign_id" INTEGER); CREATE TABLE "Table2" ( "id" INTEGER NOT NULL); INSERT INTO "Table2" ("id") VALUES (1); INSERT INTO "Table2" ("id") VALUES (2); INSERT INTO "Table1" ("id", "foreign_id") VALUES (1, 1); COMMIT WORK; ALTER TABLE "Table1" ADD CONSTRAINT PK_TABLE1 PRIMARY KEY ("id"); ALTER TABLE "Table2" ADD CONSTRAINT PK_TABLE2 PRIMARY KEY ("id"); ALTER TABLE "Table1" ADD CONSTRAINT FK_TABLE1 FOREIGN KEY ("foreign_id") REFERENCES "Table2" ("id"); SET TERM ^ ; CREATE PROCEDURE CLEAR_TABLES AS begin delete from "Table2"; suspend; end ^ SET TERM ; ^ 8<--- end script Executing procedure CLEAR_TABLES silent, and no records deleted as result execution. ---------------------------------------------------------------------- Comment By: Ivan Prenosil (prenosil) Date: 2001-09-05 10:12 Message: Logged In: YES user_id=89535 When executing this procedure in ISQL I got ===== Statement failed, SQLCODE = -530 violation of FOREIGN KEY constraint "FK_TABLE1" on table "Table1" ===== which is expected behaviour. I do not see any bug. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=109028&aid=406355&group_id=9028 |