时间:2021-07-01 10:21:17 帮助过:22人阅读
根据bin log分析管理员被莫名删除问题
============== 根据bin log 分析管理员被莫名删除问题
# at 88572251
#120907 7:45:34 server id 1 end_log_pos 88572346 Query thread_id=32426664 exec_time=0 error_code=0
SET TIMESTAMP=1346975134/*!*/;
DELETE FROM admin WHERE id=62
/*!*/;
# at 88572346
#120907 7:45:34 server id 1 end_log_pos 88572418 Query thread_id=32426664 exec_time=0 error_code=0
SET TIMESTAMP=1346975134/*!*/;
COMMIT
/*!*/;
# at 88572418
#120907 7:45:34 server id 1 end_log_pos 88572489 Query thread_id=32426664 exec_time=0 error_code=0
SET TIMESTAMP=1346975134/*!*/;
BEGIN
/*!*/;
# at 88572489
#120907 7:45:34 server id 1 end_log_pos 88572591 Query thread_id=32426664 exec_time=0 error_code=0
SET TIMESTAMP=1346975134/*!*/;
DELETE FROM corp_db WHERE corp_id=62
/*!*/;
# at 88572591
#120907 7:45:34 server id 1 end_log_pos 88572618 Xid = 132059217
COMMIT/*!*/;
# at 88572618
#120907 7:45:34 server id 1 end_log_pos 88572689 Query thread_id=32426664 exec_time=0 error_code=0
SET TIMESTAMP=1346975134/*!*/;
BEGIN
/*!*/;
可以看到DELETE FROM admin WHERE id=62的上下文的sql操作,DELETE FROM corp_db WHERE corp_id=62
应该是删除公司的时候引起了DELETE FROM admin 的代码上的bug.
bitsCN.com