[Zope-dev] mysqldbda bloats zodb

Adam GROSZER agroszer at gmail.com
Mon May 5 12:57:24 EDT 2008


Hello,

I'm digging again around rdb and friends.

It seems now that mysqldbda bloats zodb in
    def _connection_factory(self):
        """Create a MySQLdb DBI connection based on the DSN"""
        ...
        self.__stringConverter = MySQLStringConverter(self.getEncoding())
        return connection
on almost every request of us. That causes plenty of conflict errors I
guess. But strangely we end up with
ConnectionStateError: Shouldn't load state for 0x24 when the connection is closed
(0x24 is the MySQLdbAdapter instance)

So, I would move the assignment of __stringConverter to setEncoding
where it belongs. (Change it only when the encoding changes).
This seems to solve the above errors.

Any objections?

-- 
Best regards,
 Adam GROSZER                          mailto:agroszer at gmail.com
--
Quote of the day:
The work will wait while you show the child the rainbow, but the rainbow won't wait while you do the work. 
- Patricia Clafford 



More information about the Zope-Dev mailing list