Summary: | dev-db/mysql - INTO OUTFILE should support writing to named pipes | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Hanno Zysik (geki) <h.mth> |
Component: | [OLD] Server | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | Keywords: | PATCH |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://bugs.mysql.com/bug.php?id=44835 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | mysql select ... into fifo |
Description
Hanno Zysik (geki)
2014-11-16 20:05:18 UTC
Why would Gentoo need to implement this when upstream does not? well, my use-case is not resolved as-is. ;) and I quite do not care about upstream. I am just a user that wants to get it done. wrt my use-case: how can a process receive a notification about table updates? where updates may come multiple times in a second. so, mysql offers triggers which one can install that executes commands for each row that changes. to get that information out of the scope of mysql, it has the command 'select ... into outfile' to send it into a file. mysql only allows to write to non-existent non-timestamped files(yes, for a good reason - but only by default). i.e.: outfile = 'CONCAT('/path/to/file_', SYSDATE() + 0)' fails. so, what to do if the trigger executes multiple times in a second? the process for whatever reason cannot react and delete the file before the next trigger executes. the whole update command fails - not just the trigger. so, why not rip that superfluous harddisk access layer and use POSIX named pipes instead? data is kept in memory and update commands cannot fail for such a ... reason. well, again, this is just a recond for others that may have a need for this and I hope others find this when they search for it. geki: No, we're not going to add a new feature like this. If you really need it: a) go and test out the percona ebuilds in the mysql overlay b) convince upstream oracle mysql and/or mariadb to accept this patch. But I think the approach you're taking to the problem, you should probably be using some publish/subscribe mechanism outside of MySQL. never said that you should. I use my patch successful. does what it should. and yes, I use a publish/subscribe mechanism. though, with that trigger feature to have my processes do what they should and not entangle with too many tasks. being able to start and stop the processes as I please. |