Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
problem with (self-referential) on delete cascade
From: Dejan Paunovic (pdejanlab200.imp.bg.ac.yu)
Date: Thu Oct 07 2004 - 06:26:21 CDT
I'm using MaxDB (brand new version) on Windows XP.
I have two tables that represent nodes and leaves in a tree (NODE and LEAF).
Table NODE has a foreign key (parent_id) that references the primary key
(id) of the same table and table LEAF has a foreign key
(parent_id) that references the primary key (id) in the table NODE.
Both foreign keys have ON DELETE CASCADE rules (so that when a node is
deleted all of its children are also deleted).
If I have this kind of situation:
1) node1 <-- node2
and try to delete node1 I get this error:
"General error;-8 POS(1) Execution failed, parse again".
But if I have situation like this:
2) node1 <-- node2 <-- leaf1
and try to delete node1, it works fine.
This is happening when I'm deleting from SQL Studio and also from my java
program (using jdbc).
Can someone, please, tell me why the first delete can't be executed?
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb