[MonetDB-users] 'on delete cascade' constraint over mapi fails

Sander Kruseman kruseman at xs4all.nl
Tue Oct 30 22:28:18 CET 2007


Romulo,

I can confirm your results when setting up the tables from mclient. But 
I still get the failure when setting up the tables over JDBC and then 
delete the parent record from mclient.

(Not that this is my intended way of working. I just stubled upon this, 
developing my mapi client code and using the JDBC terminal for import of 
SQL scripts.)

Sander

Romulo Goncalves wrote:
> Sander Kruseman wrote:
>> Hi Romulo,
>>
>> Thanks for your response. I downloaded the latest Windows installer 
>> today, and installed on XP.
> Me too and everything works fine. I used the SQL client (which is the 
> mclient -lsql) from the start menu to execute the queries on the 
> Mserver5 with SQL module loaded (also from the start menu).
> 
> I did a select after the delete and both tables are empty.
> 
> You need to find a solution to simulate this in my machine if not I am 
> not able to help you.
> 
> Regards,
> Romulo
>> # MonetDB server v5.2.0, based on kernel v1.20.0
>> ...
>> # MonetDB/SQL module v2.20.0 loaded
>>
>> Good to hear that apparently this has been fixed in the CVS trunk.
>>
>> Regards,
>> Sander
>>
>> Romulo Goncalves wrote:
>>> Sander Kruseman wrote:
>>>> Consider the following setup:
>>>>
>>>> CREATE TABLE parent (key int PRIMARY KEY);
>>>> CREATE TABLE child (parent_key int REFERENCES parent (key) ON DELETE 
>>>> CASCADE);
>>>>
>>>> INSERT INTO parent VALUES (1);
>>>> INSERT INTO child VALUES (1);
>>>>
>>>> Issuing from the JDBC terminal: DELETE FROM parent WHERE key = 1;
>>>> properly results in deletion of both records.
>>>>
>>>> However, when issued over mapi, either from my custom C++ code or from 
>>>> the provided Monet SQL client console, the same statement only deletes 
>>>> the row from 'parent', ignoring the cascading constraint.
>>> I just used my mclient to execute the queries on my MonetDB5 (5.21 
>>> current cvs branch) with the SQL module loaded and it works.
>>>
>>> Which version are you using and platform?
>>>
>>> Regards,
>>> Romulo
>>>> Kind regards,
>>>> Sander Kruseman
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by: Splunk Inc.
>>>> Still grepping through log files to find problems?  Stop.
>>>> Now Search log events and configuration files using AJAX and a browser.
>>>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>>>> _______________________________________________
>>>> MonetDB-users mailing list
>>>> MonetDB-users at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems?  Stop.
>>> Now Search log events and configuration files using AJAX and a browser.
>>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>>> _______________________________________________
>>> MonetDB-users mailing list
>>> MonetDB-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> MonetDB-users mailing list
>> MonetDB-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/monetdb-users
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> MonetDB-users mailing list
> MonetDB-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-users




More information about the users-list mailing list