Closed sam26880 closed 5 years ago
You're able to catch raw events by using:
new MySQLEvents({ ... })
.on(MySQLEvents.EVENTS.BINLOG, (event) => {
doSomething(event);
});
Check if those raw events have the info you're looking for.
I think you misunderstood me. I'm not talking about the raw events. I'm talking about the raw SQL. Does the event have the actual SQL that caused that INSERT, UPDATE or DELETE event?
I don't remember, but if it has, it's on the raw binlog events. Sorry, but you'll have to check it :/
Is it resolved?
I know that there's a new setting available as of MySQL 5.6.2 called binlog_rows_query_log_events which logs the raw SQL to the binlog.
Is there a way to get that value?
The reason why I need this is because the existing package lets me know that some event occurred. Such as INSERT, UPDATE or DELETE. However, it doesn't tell me what the 'WHERE' condition that was used in cases of UPDATE or DELETE.
It'd be good to get the raw sql in that case to know exactly which query was executed.