Page 1 of 1

Stored Procedured and "Lost Connection during query...&

Posted: 13.05.2009, 22:47
by cokotech
Hello!

I've two Problems....

1. I use Stored Procedures with resultsets on mysql 5.1. All of them works fine but with one Problem. If the Resultset of the first calles Procedure is bigger than 88 Lines (in the case of this Procedure) the NEXT call will give me a "Lost Connection during query". After an automatic reconnect it works until the next "bigger" result. I tried increasing the thread_stack as explained in an other forum and the packet_size but without any positive result.

2. I've many libmysql.dll's on my pc. How can i check which file the zeoslib is using and what version it is? Is it possible to tell zeoslib that it should use a specified lib?

Sorry for my bad english!


Bye Sven!

Posted: 13.05.2009, 23:09
by cokotech
Hello!

Now it use a new version of libymysql.dll (but nevertheless i wan't to know how i could specify the dll) with the next bigger Problem.
The Code is the same, but now with an Error "Commands out of sync" after any query.


Bye SVen

Posted: 13.05.2009, 23:22
by mdaems
The version of the mysql dll can be checked using the ZConnection.ClientVersionStr function. (or ClientVersion if you want an integer result)

For the moment there's no way to specify randomly what dll to use. When enabling strict dll loading you can however force that the name of the dll contains the version number (eg. libmysql50.dll)

For the future we're reworking the Plainloader classes in a way that should even allow users to load multiple dll's using the same (base)protocol. See for the recent changes in SVN testing branch.
If you can help us doing this trick, please let me know. I'm quite limited in zeoslib development time if I want to keep up with applying patches and forum work.

Finally for the stored procs stuff : Seems more like a mysql bug to me. Probably an error in the client, unless some server thread handling your connection falls dead causing the library to see itself disconnected during query processing.

Mark

Posted: 13.05.2009, 23:31
by cokotech
Hello!

Thanks for your reply.
Yes i think also that it is a mysql lib Problem. But do you know what the reason for the "out of sync" Problem could be?
I wan't to get out if it is an library Problem, but now i have anoter Problem :-)


Bye Sven!

Posted: 14.05.2009, 00:00
by mdaems
Yes, that out of sync thing may be because zeoslib doesn't handle multiple resultsets very well. Are you trying to do that with Zeoslib components or using the dbc interface directly? The components are not fit at all for this. Using zdbc you may be able to read all returned data.

Mark

Posted: 14.05.2009, 08:28
by cokotech
Hello

I have a Function that makes the queries and checks for error (and tries it 10 times... ) with a code like this:

form1.ZQuery1.sql.clear;
form1.ZQuery1.Sql.Add ('CALL ......');
form1.zquery1.open;
While NOT form1.ZQuery1.Eof do
BEGIN
.....
END;

I wondered because it works with the error in bigger results with an older version of libmysql and with the "command out of sync" with a newer....


Bye Sven!

Posted: 15.05.2009, 19:41
by cokotech
Hello!


No ideas?

I tried the current Version 5.1.34 with the same Problem (out of sync)!


Bye Sven!

Posted: 15.05.2009, 23:07
by cokotech
Ok, after looking arround i think the Problem of both error messages is the same. Because of the functionality of getting more than one resultset mysql waits for a "next result" command. But i don't use more than one resultset. There must be a easy way to "close" the called stored procedure in order to open the next one. I found some older threads, but the tipps are for older versions and i'am a little confused because i'm not a good programmer....



Bye Sven!