概述
#!/bin/bash
table_name="test_update"### DELETE DML2 rows inbinlog
delete=2### UPDATE DML3 rows inbinlog
update=3### How many columnsforthis rollback table
table_columns=`wc -l ./table.cnf | awk ‘{print $1}‘`
### Format binlog
#/usr/bin/awk ‘{$1="";print > "/export/scripts/rollback_autoSQL/bin.log";close("/export/scripts/rollback_autoSQL/bin.log")}‘ /export/scripts/rollback_autoSQL/mysql-bin.txtcat ./mysql-bin.txt | awk ‘{$1="";print>"./bin.log"}‘#echo | awk ‘{$1="";print}‘ ./mysql-bin.txt > ./bin.log
### CountforDML
dml_delete_count=`cat ./bin.log | grep DELETE | wc -l `
dml_update_count=`cat ./bin.log | grep UPDATE | wc -l `echo -e "