I have exactly the same issue.
Call a procedure once and works.
Call another procedure again, returns None and from this point on, simple
db(..).select() are broken.
Its definetly a DAL issue since using mysql connector does works well.
This is an example:
Download mysql connectors
Ive solved it by creating a function as:
def callproc(name, args):
cur = db._adapter.cursor
cur.callproc(name, args)
if hasattr(cur, "stored_results"):
for r in cur.stored_results():
return r.fetchall()
else:
return cur.fetchall()
Im not sure if its
For now I'm just using a mysqldb.connect(options) object directly with a
cursor to call my SP, bypassing the web2py DAL completely. Of course this
means I have to create a new DB connection for every SP call, and I'm
thinking performance wise this might be worse off than just not using an SP
This still seems to be an issue for me running
2.9.5-stable+timestamp.2014.03.16.02.35.39.
I tried both mysqldb and the default pymysql driver. I want to use a stored
procedure to run a lengthy query that is run quite often by my application.
This behavior should be easily reproducable using a
Pretty desperate on this one- brought everything to a screeching halt. We
need to be able to call more than one stored procedure per request. Anybody
got any ideas?
On Monday, August 27, 2012 10:37:45 AM UTC-4, Yarin wrote:
Once I call a stored procedure through the DAL, any subsequent calls
Just a thought - does db.commit() help?
Rgds, D
On Monday, August 27, 2012 3:37:45 PM UTC+1, Yarin wrote:
Once we call a stored procedure through the DAL, any subsequent DAL calls
are returning None results.
*Basic stored procedure:*
BEGIN
SELECT * FROM people;
END
*Works:*
def
Villas- Thanks but no it doesn't- tried that..
On Monday, August 27, 2012 1:53:32 PM UTC-4, villas wrote:
Just a thought - does db.commit() help?
Rgds, D
On Monday, August 27, 2012 3:37:45 PM UTC+1, Yarin wrote:
Once we call a stored procedure through the DAL, any subsequent DAL calls
I do not think this is a DAL issue. This looks database issue or a driver
issue. Web2py does not do another else but pass your SQL to the driver and
fetch responses.
Is this SQLITE? In any case, I suggest you try the native driver APIs.
On Monday, 27 August 2012 09:37:45 UTC-5, Yarin wrote:
This is MySQL using the default driver, whatever that is. I'm going to test
on other drivers/dbs and will report back..
On Monday, August 27, 2012 3:03:15 PM UTC-4, Massimo Di Pierro wrote:
I do not think this is a DAL issue. This looks database issue or a driver
issue. Web2py does not do
Try use mysqldb too. The default pymysql has some problems. We even have to
monkeypatch it for security.
Massimo
On Monday, 27 August 2012 14:20:00 UTC-5, Yarin wrote:
This is MySQL using the default driver, whatever that is. I'm going to
test on other drivers/dbs and will report back..
This is an issue with
pymsql: http://code.google.com/p/pymysql/issues/detail?id=72,
https://github.com/petehunt/PyMySQL/blob/master/pymysql/cursors.py
Running against pymysql's api directly, I can execute sproc calls on on two
different connections, but not on the same connection.
So...
-
The existing adapter should work with mysqldb. Try:
import mysqldb
from gluon.dal import MySQLAdapter
MySQLAdapter.driver = mysqldb
db=DAL('mysql://')
Anthony
On Monday, August 27, 2012 4:37:42 PM UTC-4, Yarin wrote:
This is an issue with pymsql:
Thanks Anthony- ill give it a try
On Monday, August 27, 2012 4:58:01 PM UTC-4, Anthony wrote:
The existing adapter should work with mysqldb. Try:
import mysqldb
from gluon.dal import MySQLAdapter
MySQLAdapter.driver = mysqldb
db=DAL('mysql://')
Anthony
On Monday, August 27, 2012
13 matches
Mail list logo