multi-threading and MyDAC

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
gflip
Posts: 1
Joined: Tue 06 Mar 2007 16:50
Location: Richardson, TX USA

multi-threading and MyDAC

Post by gflip » Tue 06 Mar 2007 16:59

I have a Windows Service application that is heavily multi-threaded.
There are many threads which each insert new rows into the same table. Each thread uses a unique TMyConnection and TMyQuery component. The connection is kept open. Every few minutes each thread inserts a bunch of new rows into the table using an SQL INSERT command. The primary key for the table is an auto-increment BIGINT.
The problem is that every few thousand records I get a database error (in the production environment) when executing the INSERT command.
If I reduce the environment to a single thread, it works fine. Also, when this was using the Borland BDE it worked fine.
Help!

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 07 Mar 2007 09:23

Please simplify your application as much as possible so that the problem is reproduced and send it to me at evgeniyD*crlab*com to demonstrate it. Include script to create table(s).
Also supply us the following information:
- exact version of Delphi, C++ Builder or Kylix;
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.

Post Reply