Following up on New features I’d like to see in MySQL 5.8, here are statements I would like to see in MySQL 5.8:
- ENABLE EVENTS;
When promoting a slave to master, I want to be able to enable all those events that are in SLAVESIDE_DISABLED state. Today I script an iteration over the events an constructing the ALTER EVENT…ENABLE statement one by one. Just activate those! - SKIP GTID TRANSACTION;
I have a transaction on slave that I want to skip, and there’s GTID. The sequence ofSTOP SLAVE; SET GTID_NEXT="..."; BEGIN; COMMIT; SET GTID_NEXT="AUTOMATIC"; START SLAVE;
is just something I don’t want to do. To compute the GTID_NEXT; to open a transaction; to use session variables; this may seem straightforward to import the above from a shell script, but calculating the next GTID is not entirely trivial; issuing the above from your programming language makes for a weird “all these have to be in the same session AND you’re going to do a transaction meanwhile”. With golang it’s actually a problem.
Make it simple for me. I’m willing to do the STOP/START SLAVE. - BINLOG ENTRY ‘<arbitrary text>’;
Very selfishly, I want to be able to inject a comment into the binary log, of arbitrary text. I want this comment to appear in SBR format, as if it were a DDL.
My selfish reason: injection of Pseudo-GTID. But I can see various other use cases, such as application level injection of app-logic checkpointing; chef/glu injection of “code deployed at this time”; application injection of “daily audit done to this point”. This is too cool and too easy to skip. - SHOW RELAY LOGS;
Similar to SHOW BINARY LOGS; - PURGE RELAY LOGS TO ‘…’;
Similar to PURGE BINARY LOGS TO ‘…’;
It’s time relay logs stopped being 2nd class citizens. - SHOW NONBLOCKING [GLOBAL|SESSION] STATUS;
Issue a SHOW GLOBAL|SESSION STATUS query that only shows those variables for which it does not need to block. i.e. this is a safe, fast “show me everything you’ve got that I won’t need to pay for”.
Yes, yes, statements are also features, I know.
More great feedback. Thank you Shlomi!