MySQLMonitor seems to ignore all TMyConnections after the first

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
QBD Dev
Posts: 1
Joined: Fri 15 Jun 2007 04:35
Location: Brisbane, Queensland, Australia

MySQLMonitor seems to ignore all TMyConnections after the first

Post by QBD Dev » Mon 13 Aug 2007 01:40

I am in the process of dividing some tasks into multiple threads. Each thread is creating its own TMyConnection and TMySQLMonitor. The idea is that each thread would maintain a separate log with TMySQLMonitor contributing the SQL that gets run.

However, all the SQL statements go the log of the first thread that is started. Is there a way to get the code to send the messages from each thread to the appropriate monitor?

The version, according to the connection editor, is 4.40.0.19.

In the meantime I have a work-around using the GetCurrentThreadId function.

Regards,

Mark Patterson
QBD

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

Post by Antaeus » Tue 14 Aug 2007 06:26

This is a designed behaviour of the TMySQLMonitor component. Actually only one internal engine of this component is created within an application even if you create more than one TMySQLMonitor component. There is no possibility to associate TMySQLMonitor with TMyConnection. The approach you have chosen looks like an appropriate solution.

Post Reply