[Zope-dev] Serious bug with gadfly transactions?

Martijn Pieters mj@antraciet.nl
Wed, 28 Jul 1999 14:17:42 +0200


At 13:55 28/07/99 , Paul Everitt wrote:

>Yes.  Jim was able to fix it but I don't remember what he did.
>
>Also, the Browse tab on Gadfly connections is broken.
>
>The longer answer...this happened to me yesterday on my Win98 laptop.
>It worked fine on Jim's Win95 laptop and Ken's Win98 laptop.  So it's a
>rather odd situation.
>
>Point is, file it as a bug and note that I also had the same experience.
>
>--Paul

Okidoki.

The solution seems quite simple. Just add _begin, _abort and _finish 
methods to db.py that handle the transactions:

*** db.py       1999/07/22 16:10:23     1.9
--- db.py       1999/07/28 12:13:11
***************
*** 204,206 ****
--- 204,215 ----
                   })
           return items, result

+     def _begin(self):
+         pass
+
+     def _abort(self):
+         self.db.abort()
+
+     def _finish(self):
+         self.db.commit()
+

Watch it: This is my first stab at transaction coding... YMMV. But, it 
works for me, and the browse tab also works.

I'll post this to the Collector then, shall I?

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------