[MDEV-6094] Background Queries Created: 2014-04-14 Updated: 2015-11-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Olaf van der Spek | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Description |
|
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? |
| Comments |
| Comment by Elena Stepanova [ 2014-04-14 ] |
|
Please check out non-blocking client library – is it what you are looking for? |
| Comment by Olaf van der Spek [ 2014-04-14 ] |
|
No, as I wrote: "I'm aware of the async client features, but this is something different." |
| Comment by Sergei Golubchik [ 2014-04-14 ] |
|
This is basically INSERT DELAYED, isn't it? But also for DELETE and UPDATE. And with cleaner internal implementation (currently there are engines that do not support INSERT DELAYED — which means to me that it doesn't look like a normal connection thread, and it needs to be fixed). |
| Comment by Olaf van der Spek [ 2014-04-14 ] |
|
It's INSERT DELAYED on steroids, but it shouldn't be limited to insert, delete or update, it should be even faster as you don't have to wait for the query being send and it allows for an initial but very useful client-side-only implementation. |
| Comment by Federico Razzoli [ 2014-09-26 ] |
|
I have a suggestion. Instead of implementing this in the client lib, it could be implemented in the server. So stored procedures could do something like: EXECUTE IN BACKGROUND <some_sql>; I hope this is possible. |
| Comment by Sergei Golubchik [ 2014-10-10 ] |
|
f_razzoli, yes, this should be easy. It's pretty much the same as an EVENT with ON COMPLETION NOT PRESERVE. |
| Comment by Federico Razzoli [ 2014-10-13 ] |
|
Thanks. CREATE EVENT could be an alternative too, except that it doesn't work inside stored procedures |