<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jun 3, 2014, at 6:31 AM, Franz Schwartau <<a href="mailto:franz@electromail.org">franz@electromail.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi!<br><br>I'm trying to extend ppolicy (<a href="http://bimbo.fjfi.cvut.cz/ppolicy">http://bimbo.fjfi.cvut.cz/ppolicy</a>) a bit. ppolicy uses the twisted framework. On CentOS 6.5 version 8.2.0 of twisted is installed.<br></blockquote><div><br></div><div>I should note that Twisted 8.2.0 is 6 years old at this point, so if you can't upgrade Twisted there might not be much we can do for you :).</div><br><blockquote type="cite">I wrote a separate module called LookupSessionDB:<br><br><a href="http://pastebin.com/u4TMNhpd">http://pastebin.com/u4TMNhpd</a><br><br>It looks up some values from a database table. It does some efforts to handle reconnect properly.<br><br>If called a second time and more the SELECT statement returns no rows (line 138) if "conn.commit()" is missing in line 125. If "conn.commit()" is called after obtaining a database connection "rows = cursor.fetchall()" (line 138) returns the expected results.<br><br>The module inserting the records calls "conn.commit()" after INSERT. If I execute the same SELECT statement in a separate mysql client the results are displayed.<br><br>This is quite confusing. Any idea what's going on?<br></blockquote><br></div><div>Can you simplify this question somewhat?  There's a lot of SQL in here, it's missing a required dependency ("Base") and I suspect that this is really a MySQL question and not a Twisted question.  It would be helpful if you could provide a complete schema so we could run your code, in the style of <a href="http://sscce.org/">http://sscce.org/</a>.</div><div><br></div><div>-glyph</div></body></html>