现象
tokudb显示正常关闭
2016-10-18 14:22:19 144471 [Note] /opt/udb/program/mysql/percona-5.6.21/bin/mysqld: Normal shutdown
.....
.....
2016-10-18 14:22:23 144471 [Note] Shutting down plugin 'mysql_old_password'
2016-10-18 14:22:23 144471 [Note] Shutting down plugin 'mysql_native_password'
2016-10-18 14:22:23 144471 [Note] Shutting down plugin 'binlog'
2016-10-18 14:22:23 144471 [Note] /opt/udb/program/mysql/percona-5.6.21/bin/mysqld: Shutdown complete
但是启动失败
Tue Oct 18 14:22:25 2016 TokuFT recovery done
2016-10-18 14:22:25 201862 [Note] Found 1 prepared transaction(s) in TokuDB
2016-10-18 14:22:25 201862 [ERROR] Found 1 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover
switch to commit or rollback pending transactions.
2016-10-18 14:22:25 201862 [ERROR] Aborting
故障原因
应该是bug
解决方法
按照错误提示来弄
mysqld启动时添加
--tc-heuristic-recover=COMMIT或者--tc-heuristic-recover=ROLLBACK
执行完成后,去掉该参数再启动一次即可。