Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Implement a BACKGROUND command.
BACKGROUND <sql statement>;
|
Ideally, it should allow compound statements too.
Also we need a command to wait for all background commands to complete.
Some write-only queries (insert, update, delete) could be run in the background (from a client point-of-view), but MariaDB (client) currently provides no API for this. Could such an API be added?
At first the client could spawn a worker thread and run the queries there (on a separate connection), but when protocol support becomes available a separate connection might no longer be necessary.
An ordering flag would probably be required as queries could either be run out-of-order, in-order with other background queries or in-order with all other queries.
The initial design could be emulated in application code, but the ideal design can not.
I'm aware of the async client features, but this is something different.