Solution found:
db._adapter.cursor.callproc(..)
res = db._adapter.cursor.nextset()
while res != None:
print result
res = db._adapter.cursor.nextset()
In a nutshell you have data waiting to be fetched and DAL skrews it up..
2015. november 21., szombat 18:32:14 UTC+1 időpontban Dániel Finta
Hi!
Just want to ask how long this still takes to fix? We like to use stored
procedures for MySQL queries. After an executesql( "CALL... everything
gives this error - even commit() and rollback(). This only happens if the
procedure wants to give back a result. I have tried to fetch it manually
Hi Massimo,
I think this is a real problem.
In a web2py shell you can do:
rows = db.executesql(select * from charts)
but you cannot do:
rows = db.executesql(select * from charts; select * from charts;)
it raises the error above.
I think the problem is related to multiple resultsets. That
True. For now you need to separate calls to db.executesql if you have
multiple queries.
On Friday, 25 January 2013 11:54:18 UTC-6, AngeloC wrote:
Hi Massimo,
I think this is a real problem.
In a web2py shell you can do:
rows = db.executesql(select * from charts)
but you cannot do:
Is this issue still open? If so, can you open a ticket about it?
Massimo
On Monday, 24 September 2012 14:38:14 UTC-5, Yarin wrote:
db.py:
db.define_table('mytable',Field('myfield','string'))
sproc:
DELIMITER //
CREATE PROCEDURE TestSproc()
BEGIN
SELECT COUNT(*) FROM mytable;
Done: http://code.google.com/p/web2py/issues/detail?id=1037
On Thursday, September 27, 2012 4:33:37 PM UTC-4, Massimo Di Pierro wrote:
Is this issue still open? If so, can you open a ticket about it?
Massimo
On Monday, 24 September 2012 14:38:14 UTC-5, Yarin wrote:
db.py:
can you show us some of your code. This may be a concurrency issues. I
cannot thing anything we change that would affect the behavior.
On Sunday, 23 September 2012 22:43:28 UTC-5, Yarin wrote:
After upgrading to web2py 2.0, we can no longer use the DAL or mysql
adapters to make MySQL stored
me neither (regarding web2py changes), however, I found this
*Compatibility note:* It appears that the mere act of executing the CALL
statement produces an empty result set, which appears after any result sets
which might be generated by the stored procedure. Thus, you will always
need to use
db.py:
db.define_table('mytable',Field('myfield','string'))
sproc:
DELIMITER //
CREATE PROCEDURE TestSproc()
BEGIN
SELECT COUNT(*) FROM mytable;
END //
DELIMITER;
tests.py
NOTE: Tests 1-3 will fail every time in wsgi/linux environments.
From the web2py command line, they will work once,
9 matches
Mail list logo