On Sun, Mar 15, 2015 at 10:44 AM, Suhas Patil <[email protected]> wrote:
> Andrew, > > Thank you very much for your offer of help. I have managed to solve the > problem after spending a day(almost). The problem is a result of multiple > conditions coming together to cause failures in the following way. > > The web.py framework depends upon default value of atime being set by > Mysql and hence not all the database calls that create or update session > variable have atime as field, update call has it but insert does not. > python2.7/site-packages/web/session.py has this code: > self.db.insert(self.table, False, session_id=key, data=pickled ) > whereas update has this: > self.db.update(self.table, where="session_id=$key", atime=now, > vars=locals()) > > I use Mysql 5.5 which does not support default value for atime on datetime > field but supports for timestamp field. The instructions for web.py are for > 5.6 and above(apparently) and hence I could not set default value for atime > and ignored the instructions. > > I added all this to github and proposed a fix as well. > https://github.com/webpy/webpy/issues/323 > and made a fix as : > > https://github.com/webpy/webpy/commit/dcc6173c5d882a5242007ed36e4fe862e8390243 > and pull request as : > https://github.com/webpy/webpy/pull/324 > > As to why things worked in some cases is still a mystery to me but I don't > have time to solve that one as I have a fix now. > Thanks Suhas. I've merged your pull request. Anand -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/webpy. For more options, visit https://groups.google.com/d/optout.
