MySQL server gone away after call to dll

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
hstijnen
Junior Boarder
Junior Boarder
Posts: 32
Joined: 11.04.2012, 08:49

MySQL server gone away after call to dll

Post by hstijnen »

Hi,

I've a program with connection to some Mysql server. This program calls a stand alone dll. In the dll again a connection is created to the same Mysql server, and afterwards deleted. The dll gives the correct result.

After return in the calling program, when for the first time there is some call to the server, I get the error "MySQL server has gone away".

What can be at hand? Is the architectur with a dll that connects to the same server not allowed? Has anyone a suggestion what to do?

Regards, Henk
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

hstijnen,

Hmm that happens if the MySQL connect handle was released. Which means the dll connection disposes the same handle the calling applikation uses too!?

You use two different ZConnection.. What happens if one of them contains TZConnection.LibraryLocation := 'libmysql.dll? Here i force Zeos to clone the PlainDriver, which normaly has no dependencies to the connection handles. Are you sure you really have two ZConnection?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
hstijnen
Junior Boarder
Junior Boarder
Posts: 32
Joined: 11.04.2012, 08:49

Post by hstijnen »

I'm very sure. I have two different cbproj's.

For this moment I've solved it by copying the code I need into my prog. and no more call to dll
Locked