It seems to me, the following does not work:
File: CompatMysqldb
class Connection:
(...)
self.__transactional =
self.__conn.server_capabilities & CLIENT.TRANSACTIONS
Using: self.test = self._conn
showed up test being '_mysql.connection'
while: dir( _mysql.connection ) knows about
server_capabilities dir( self.test ) does not ...
so accessing: self.test.server_capabilities
will result in the following error: Attribute Error:
server_capabilities
on the other hand: hurz =
_mysql.connection.server_capabilities
seems to return anything but a value:
hurz returns:
member 'server_capabilities' of '_mysql.connection'
objects
... after all "CompatMysqldb" seems to work only, if I
replace:
self.__conn.server_capabilities & CLIENT.TRANSACTIONS
by e.g. 1 (I really doubt this is a solution ;-)
I checked "_mysqlmodule.c" and found the
server_capabilities within:
static PyObject * _mysql_ConnectionObject_getattr(
_mysql_ConnectionObject self, char name)
... this looks allright, although the attribute
server_capabilities is not available - this seems like a
bug to me?!?
Logged In: YES
user_id=360037
P.S.:
python version: 2.3.4
mysql version: 4.0.20a
os: windows xp prof.
ComparMysqldb: 0.9.2 or 1.0.0 (same result)
Logged In: YES
user_id=71372
You probably shouldn't use CompatMysqldb except for some
very special cases.
Logged In: YES
user_id=71372
I'll look at this if I have time, but I'll probably remove
CompatMysqldb from the 1.1.x series. This module was only
created to provide a more compatible interface for people
who used the old Mysqldb module, and since MySQLdb has been
out for about 5 years, it's probably no longer needed.
Logged In: YES
user_id=71372
Removing module from 1.1.x series.