Paul,
my test is failing, and I bet it is a dbapi/dbMySQL problem with
quoting/escaping parameters. I would like to look a the MySQL server log, so I
need to run it on my local server. dont suppose you have the sql to create the
user/db/whatever for this:
con = dabo.db.dConnection(DbType="MySQL", User="dabo_unittest",
password="T30T35DB4K30Z45I67N60", Database="dabo_unittest",
Here is what is erroring:
def getDBs(self,user):
"""Get the list of DBs the given user has access to.
Unlike getTables and other getXs,
this behaves more like a cursor by using .execute's
self._records = dDataSet(_records) instead of returning it
"""
tempCursor = self._connection.cursor()
rows = tempCursor.execute("""select distinct table_schema
from information_schema.SCHEMA_PRIVILEGES
where GRANTEE like %(user)s
""", {'user':"'"+user+"'@%"} )
# rs = tempCursor.fetchall()
return rows
File "/usr/lib/python2.5/site-packages/dabo/db/dBackend.py", line 172, in
getDBs
""", {'user':"'"+user+"'@%"} )
OperationalError: near "%": syntax error
>>> user='foo'
>>>
>>> {'user':"'"+user+"'@%"}
{'user': "'foo'@%"}
>>> {'user':"'"+user+"'@%"}['user']
"'foo'@%"
Carl K
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]