Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 MySQL(尤其是 InnoDB)中,有什么方法可以知道哪些表受到 CASCADE UPDATES/DELETES 或常规触发器的影响(更新/删除的行)?
mysql> SHOW CREATE TABLE tablename;
mysql> USE dbname; mysql> show triggers;
据我所知,没有内置的解决方案。如果您想知道哪些触发器已被触发,您必须从触发器本身调用您自己的日志记录函数。至于级联的 UPDATE/DELETE,它们不会触发触发器,因此没有深入挖掘 binlog 我不知道您如何知道哪些行已被更新或删除。