MySQL non-blocking queries

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
a.alekizoglou
Posts: 32
Joined: Fri 22 Sep 2006 08:32

MySQL non-blocking queries

Post by a.alekizoglou » Tue 06 Mar 2012 15:17

Hi,

Does the new version of MyDAC support non-blocking queries? Or maybe UNIDAC?

AndreyZ

Post by AndreyZ » Wed 07 Mar 2012 12:49

Hello,

For the time being, MyDAC doesn't support executing non-blocking queries. You can leave your suggestion at our UserVoice page ( http://devart.uservoice.com/forums/1046 ... components ), and if there are many votes for your suggestion, we will implement it.

a.alekizoglou
Posts: 32
Joined: Fri 22 Sep 2006 08:32

MySQL non-blocking queries

Post by a.alekizoglou » Wed 07 Mar 2012 23:38

So, if I would like to implement some thread-safe queries using a connection pool implementation.

Is there a safe way to check whether a connection is already in use?

Suppose I have a MyQuery connected to a MyConnection. I issue a time-consuming MyQuery.Execute in thread. In another thread I want to issue another .Execute but somehow I have to check if the Connection is used or not.

AndreyZ

Post by AndreyZ » Mon 12 Mar 2012 09:57

The right way to work in a multithreaded application is to have connection (the TMyConnection component) in each thread. In this case, your application will be threadsafe. You can have infinite amount of queries running through one connection in one thread, but you must not run several queries from several threads through one connection. We already have a suggestion about the property that shows that a connection is already in use. You can vote for it at http://devart.uservoice.com/forums/1046 ... -that-show

Post Reply