Bugs item #2920022, was opened at 2009-12-23 13:55
Message generated for change (Comment added) made by sjoerd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2920022&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Mapi
Group: Clients "candidate"
>Status: Closed
>Resolution: Rejected
Priority: 5
Private: No
Submitted By: Mark Bucciarelli (mbucc)
Assigned to: Nobody/Anonymous (nobody)
Summary: Foreign key violation error message gives wrong record

Initial Comment:
When inserting 187,317 records with mclient
(in auto-commit mode), I hit seven foreign 
key violations.

In each case, the error message output by
mclient was off by thousands of records.

For example, the output below suggested that 
the error occured on db_viewer id 30891.  In
actual fact, it happened on record 33,742.

These offsets ranged from 2,851 to 4,427 
records.

MAPI  = dja...@localhost:50000
QUERY =
        INSERT INTO "db_viewer" VALUES(30888,1759,1880,'2009-11-03 
14:57:45','2009-11-13 21:20:18+00:00',0,2,NULL,NULL,0,NULL,NULL,0,NULL,NULL);
        INSERT INTO "db_viewer" VALUES(30889,19630,6970,'2009-11-03 
14:57:58+00:00','2009-11-03 
14:57:58+00:00',0,1,NULL,NULL,0,NULL,NULL,0,NULL,NULL);
        INSERT INTO "db_viewer" VALUES(30890,41946,6971,'2009-11-03 
14:58:14','2009-11-22 16:20:01+00:00',0,3,NULL,NULL,0,NULL,NULL,0,NULL,NULL);
        INSERT INTO "db_viewer" VALUES(30891,4447,321,'2009-11-03 
14:58:22','2009-11-18 15:22:56+00:
ERROR = !SQLException:assert:INSERT INTO: FOREIGN KEY constraint 
'db_viewer.db_viewer_lastUserAgent_id_fkey' violated

gcc 4.3.3
32bit i386
ubuntu 9.04


----------------------------------------------------------------------

>Comment By: Sjoerd Mullender (sjoerd)
Date: 2009-12-23 14:20

Message:
mclient sends quite large buffers to the server, and the server then find
an error with one of the queries in that buffer and tells mclient that it
found an error.  There is a shortcoming in the protocol that the server
doesn't tell mclient which query in the buffer caused the error, so mclient
doesn't know that.  All mclient can do is tell you that somewhere in the
buffer it sent there was an error (and what the error message that it did
get from the server was).  Since the buffers are fairly large, mclient only
remembers part of the buffer it sent, so it tells you basically, somewhere
in the buffer that start with this string there was an error.

So, I'm afraid this is expected behavior.

It is a feature request to fix this behavior
(https://sourceforge.net/tracker/?func=detail&aid=2871572&group_id=56967&atid=482471).

The main reason we haven't fixed this yet is that the server would have to
remember the query it is executing.  This would be a fair bit of work, and
at least until now, we've always had other priorities.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2920022&group_id=56967

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to