Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-30 Thread Dan Pascu
On Saturday 30 December 2006 12:00, Markus Gritsch wrote: > By reading Andy Dustmans (creator and maintainer of MySQLdb) reply at > http://sourceforge.net/forum/forum.php?thread_id=1639447&forum_id=70461 > it is quite unlikely that a readily available patch, which would > implement this, will be ap

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-30 Thread Markus Gritsch
On 12/30/06, Markus Gritsch <[EMAIL PROTECTED]> wrote: Wouldn't it be possible to do a reconnect at SQLObject-level? Just FYI: I made a small hack to my local SQLObject which solves the reconnect problem for me without recompiling MySQLdb. The patch is attached, but as already said, it's just

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-30 Thread Oleg Broytmann
On Sat, Dec 30, 2006 at 07:52:00AM +0200, Dan Pascu wrote: > >I applied it verbatim, revisions 2166-2168. Thank you! > > What changed your mind about moving the exception raising to the else > clause? 1. The code is hard to test, so I'd better apply it in exact form trusting the original

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-30 Thread Markus Gritsch
On 12/29/06, Dan Pascu <[EMAIL PROTECTED]> wrote: > Else you can patch your python-mysqldb module to set this flag, or you can > complain to the python-mysqldb authors to find a solution for allowing > this reconnect flag to be set if needed. By reading Andy Dustmans (creator and maintainer of My

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-29 Thread Dan Pascu
On Friday 29 December 2006 17:20, Oleg Broytmann wrote: > On Fri, Dec 29, 2006 at 09:45:35AM +0200, Dan Pascu wrote: > > Attached is a patch that fixes this in a better way. It still allows > > reconnects if the database connection was lost because of a server > > restart or the connection being cl

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-29 Thread Markus Gritsch
On 12/29/06, Dan Pascu <[EMAIL PROTECTED]> wrote: > Your problem is that you use a 5.0.x (or newer server) and it no longer > permits autoreconnecting by default. The client must set a reconnect flag > when making the connection to signal that it desires this behavior and > the python mysqldb modu

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-29 Thread Oleg Broytmann
On Fri, Dec 29, 2006 at 09:45:35AM +0200, Dan Pascu wrote: > Attached is a patch that fixes this in a better way. It still allows > reconnects if the database connection was lost because of a server > restart or the connection being closed because it was idle too long, but > will allow the appli

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-29 Thread Dan Pascu
On Friday 29 December 2006 10:02, Oleg Broytmann wrote: > > +for c in range(0, 3): > > try: > > if self.need_unicode: > > # For MysqlDB 1.2.1 and later, we go > > @@ -88,7 +100,9 @@ > > else: > > return

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-29 Thread Oleg Broytmann
On Fri, Dec 29, 2006 at 09:45:35AM +0200, Dan Pascu wrote: > Trying to reconnect forever or for long periods of time is a bad thing. Agree. > Attached is a patch that fixes this in a better way. It still allows > reconnects if the database connection was lost because of a server > restart o

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Dan Pascu
On Thursday 28 December 2006 20:58, Oleg Broytmann wrote: > On Thu, Dec 28, 2006 at 07:50:23PM +0100, Markus Gritsch wrote: > > Well, this would not solve the problem intoduced with SQLObject 0.8. > > An Error 2006 occurres in the following scenario using SQLObject 0.7: > > * My application is runn

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Dan Pascu
On Thursday 28 December 2006 20:50, Markus Gritsch wrote: > Well, this would not solve the problem intoduced with SQLObject 0.8. > An Error 2006 occurres in the following scenario using SQLObject 0.7: > * My application is running, being connected to the MySQL database. > * The MySQL service is sto

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Dan Pascu
On Thursday 28 December 2006 20:36, Oleg Broytmann wrote: > On Thu, Dec 28, 2006 at 06:56:08PM +0100, Markus Gritsch wrote: > > Since there was no comment on the e-mail below, I resend it in case > > it got lost. > >Sorry for the silence. I have got it the first time. Just don't have > time to

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Oleg Broytmann
On Thu, Dec 28, 2006 at 08:01:06PM +0100, Markus Gritsch wrote: > On 12/28/06, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > > So the solution for now, I think, would be to stop testing for the > >error 2006 and raise an error. > > Yes, this would be the solution with the smallest effort. It

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Oleg Broytmann
On Thu, Dec 28, 2006 at 08:01:06PM +0100, Markus Gritsch wrote: > On 12/28/06, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > So the solution for now, I think, would be to stop testing for the > >error 2006 and raise an error. > > Yes, this would be the solution with the smallest effort. It wou

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Markus Gritsch
On 12/28/06, Oleg Broytmann <[EMAIL PROTECTED]> wrote: >So the solution for now, I think, would be to stop testing for the > error 2006 and raise an error. Yes, this would be the solution with the smallest effort. It would result in the same code as in SQLObject 0.7. As already mentioned i

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Oleg Broytmann
On Thu, Dec 28, 2006 at 07:50:23PM +0100, Markus Gritsch wrote: > Well, this would not solve the problem intoduced with SQLObject 0.8. > An Error 2006 occurres in the following scenario using SQLObject 0.7: > * My application is running, being connected to the MySQL database. > * The MySQL service

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Ian Bicking
Markus Gritsch wrote: > On 12/28/06, Oleg Broytmann <[EMAIL PROTECTED]> wrote: >> On Thu, Dec 28, 2006 at 06:56:08PM +0100, Markus Gritsch wrote: >>> Since there was no comment on the e-mail below, I resend it in case it got >>> lost. >>Sorry for the silence. I have got it the first time. Just

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Markus Gritsch
On 12/28/06, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Thu, Dec 28, 2006 at 06:56:08PM +0100, Markus Gritsch wrote: > > Since there was no comment on the e-mail below, I resend it in case it got > > lost. > >Sorry for the silence. I have got it the first time. Just don't have > time to wor

Re: [SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Oleg Broytmann
On Thu, Dec 28, 2006 at 06:56:08PM +0100, Markus Gritsch wrote: > Since there was no comment on the e-mail below, I resend it in case it got > lost. Sorry for the silence. I have got it the first time. Just don't have time to work on it. There are other patches to test; I am working on the pat

[SQLObject] Fwd: Regression in SQLObject 0.8.0b1

2006-12-28 Thread Markus Gritsch
Since there was no comment on the e-mail below, I resend it in case it got lost. Hi, With SQLObject 0.8.0b1 my program hangs indefinitely with 100% CPU usage if the MySQL server has been gone (Error code 2006) while still holding the connection in SQLObject and performing a request afterwar