LibMySQL.dll and Lost connections during Query

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 16 Feb 2005 08:52

CommandTimeout parameter specifies how much time to wait for a result of the query execution and doesn't influence on break of inactive connection. These connections are broken by the server. You can read details about it in MySQL Reference Manual.

swept

Post by swept » Tue 22 Feb 2005 12:15

I have the same problem. Before I connected to MySQL with BDEODBC and everything was fine. But when I've converted my project to MyDAC, I get this error very often. In some cases the error doesn't appear every time and there are situations when it appears always. For example, there is a query where about 25-30 tables joined each to other, if the select command doesn't contain "straight_join" then MySQL optimizer thinks slow even if all tables in select are empty. But using MyODBC I didn't get "lost connection". Why?

P.S. Sorry for bad english...

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 22 Feb 2005 13:43

Please describe the situation more detailed:

1. What is the exact MyDAC version that you use?
2. Do you use compression (MyConnection.Options.Compress)?
3. How much time does it take to execute the query?
4. Does it help increasing CommandTimeout?
5. Does it help setting MyConnection.Options.Direct := False?

Guest

Post by Guest » Tue 22 Feb 2005 14:06

1. 3.50 (latest)
2. No compression
3. 3-10 seconds
4. i'm at short vacation now, will try tomorrow
5. Direct = True

swept

Post by swept » Tue 22 Feb 2005 15:44

I'll try to create a sample project with this error at the end of this week.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 25 Feb 2005 16:14

Please try latest MyDAC build (3.50.0.17)

Guest

Post by Guest » Fri 11 Mar 2005 09:26

Where I should send a test project?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 11 Mar 2005 16:04

At first, check that you use MyDAC 3.50.0.17. Then check a value of server variable max_allowed_packet. This value must be rather larger than length of the query and its parameters.

If it doesn't help please send your request to mydac support email address.

Post Reply