[Zope-DB] MySQLDA: server_capabilities

brianc at temple.edu brianc at temple.edu
Thu Oct 21 15:30:41 EDT 2004


Dear All: 
 
Ran into this error while trying to install ZMySQLDA. 
 
Error Type: AttributeError 
Error Value: server_capabilities 
 
Looked into it and found peculiar behavior by the python 
module MySQLdb. 
 
zope at mysusebox:/usr/lib/python/site-packages/MySQLdb> grep 
-r server_capabilities * 
connections.py:        self._transactional = 
self.server_capabilities & CLIENT.TRANSACTIONS 
Binary file connections.pyc matches 
zope at mysusebox:/usr/lib/python/site-packages/MySQLdb> python 
Python 2.3+ (#1, Jan  7 2004, 09:17:35) 
[GCC 3.3.1 (SuSE Linux)] on linux2 
Type "help", "copyright", "credits" or "license" for more 
information. 
>>> import MySQLdb 
>>> 
MySQLdb.connect(user='XXX',passwd='XXX',db='XXX').server_capabilities 
41516 
>>> import _mysql 
>>> 
_mysql.connect(user='XXX',passwd='XXX',db='XXX').server_capabilities 
Traceback (most recent call last): 
  File "<stdin>", line 1, in ? 
AttributeError: server_capabilities 
>>> 
 
Now I understand that MySQLdb is the wrapper and thus should 
have more attributes, but I don't see where this 
server_capabilities attribute gets set since MySQLdb calls 
_mysql to do it's connection.  
 
Theoretically I can hack my Zope problem to make it use the 
MySQLdb connection instead of _mysql but would prefer not 
to. 
 
Zope 2.7.2 
SuSe 9.0 
MySQL 4.1.5 
MySQLdb and _mysql 0.9.2 
ZMySQLDA 2.0.8 
 
Thanks in advance. 
-Brian 
 
PS: I forget how to enable traceback on the Zope error 
pages, anyone have a quick link? Thanks. 


More information about the Zope-DB mailing list