Re: Oracle IntregrityError and get_or_create test case -- MySQL also

2008-08-25 Thread Matt Boersma
On Aug 25, 10:51 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > I just noticed that the MySQL backend also fails on this get_or_create > test.  It is returning an OperationalError instead of an IntegrityError. > Looks like MySQL returns errno 1364 (ER_NO_DEFAULT_FOR_FIELD) in this case > but this

Re: Oracle IntregrityError and get_or_create test case

2008-08-25 Thread Malcolm Tredinnick
On Sat, 2008-08-23 at 08:07 -0700, Matt Boersma wrote: [...] > However, I grep'ed the Django source and found two cases where we > catch IntegrityError specifically. cx_Oracle probably misbehaves > there currently, but I'm not sure how common these code paths are and > what errors could result.

Re: Oracle IntregrityError and get_or_create test case -- MySQL also

2008-08-25 Thread Karen Tracey
On Mon, Aug 25, 2008 at 12:12 PM, Malcolm Tredinnick < [EMAIL PROTECTED]> wrote: > On Mon, 2008-08-25 at 08:47 -0700, Matt Boersma wrote: > > I can wrap the execute() and executemany() calls in oracle\base.py in > > a try/except that re-raises this specific error as an IntegrityError: > > > >

Re: Oracle IntregrityError and get_or_create test case

2008-08-25 Thread Malcolm Tredinnick
Hey Matt, On Mon, 2008-08-25 at 08:47 -0700, Matt Boersma wrote: > Hi Malcolm, > > I can wrap the execute() and executemany() calls in oracle\base.py in > a try/except that re-raises this specific error as an IntegrityError: > > try: > return Database.Cursor.execute(self, qu

Re: Oracle IntregrityError and get_or_create test case

2008-08-25 Thread Matt Boersma
Hi Malcolm, I can wrap the execute() and executemany() calls in oracle\base.py in a try/except that re-raises this specific error as an IntegrityError: try: return Database.Cursor.execute(self, query, self._param_generator(params)) except DatabaseError, e:

Re: Oracle IntregrityError and get_or_create test case

2008-08-23 Thread Matt Boersma
On Aug 22, 5:56 pm, Justin Bronn <[EMAIL PROTECTED]> wrote: > FYI, r8471 fixed my problems and all Oracle GeoDjango tests pass > again.  Thanks. That's good news, Justin--thanks for verifying! (I have access to 9i and 10g servers--not just XE--but spatial isn't licensed for any of them so I had

Re: Oracle IntregrityError and get_or_create test case

2008-08-22 Thread Justin Bronn
Matt, FYI, r8471 fixed my problems and all Oracle GeoDjango tests pass again. Thanks. -Justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-d