[Gambas-user] MySQL stored procedures execution problem

lanthonioz leandro_anthonioz at ...43...
Tue Jun 5 15:10:23 CEST 2007


Hi Benoit, I make a mistake in an earlier post (sorry!). Error "Commands out
of sync; you can't
run this command now" still occurs. I was test code in two different places. 
Both machines has very similar MySQL version (5.0.24 and 5.0.26). But I
discover that
error "Lost connection to MySQL server during query" occurs in MySQL 5.0.24
and error
"Commands out of sync; you can't run this command now" occurs in MySQL
5.0.26. I discover that first error (connection losted) was a MySQL C API
bug fixed in MySQL 5.0.25 (see http://bugs.mysql.com/bug.php?id=15752). Now,
I upgrade to MySQL 5.0.41 both machines and recompile gb.db.mysql, but error
"Commands out of sync" still occurs from Gambas. This error occurs whenever
I execute for second time a stored procedure that retrieves data. No error
occurs with stored procedures that not returns any data. Elapsed time
between both executions doesn't produce any difference. Both machines have
Gambas 1.9.49, subversion revision 404 (may 30). Following your suggestion,
I put DB.Debug=True in my code, copy console output in mysql command line
client and execute it. No error occurs from MySQL command line. However, I
can avoid this error in Gambas closing and reopening connection before call
a stored procedure. Therefore, is not a "critical" error and maybe is caused
by a MySQL C API bug too. Don't worry about this. Thank you very much.



Benoit Minisini wrote:
> 
> On jeudi 31 mai 2007, Leandro Anthonioz Blanc wrote:
>> Hi Benoit, thanks for you reply. I update to "HEAD" Gambas project
>> version
>> from subversion repository and recompile it. Error "Query failed:
>> Commands
>> out of sync; you can't run this command now" does not occurs anymore.
>> However, if I execute same stored procedure several times rapidly, now
>> appears error "Query failed: Lost connection to MySQL server during
>> query".
>> I mean, if i execute the stored procedure dozens of times but waiting at
>> least one second between every execution, no error occurs (never). But,
>> if
>> I execute the stored procedure rapidly (without pause), this error raise
>> inmediately. I test this several times and the behaviour is consistent.
>> Thank you very much.
>>
> 
> Can you use DB.Debug = TRUE to see what SQL commands are sent to the mysql 
> client library? This way, you will be able to see if by sending the same 
> commands rapidly by hand with the 'mysql' command, you get the same error.
> 
> Regards,
> 
> -- 
> Benoit Minisini
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: http://www.nabble.com/MySQL-stored-procedures-execution-problem-tf3834541.html#a10969111
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list