WordPressのデータを扱っているMySQLのエラーログを確認していたら見慣れないWarningがありました。
# tail -f /var/lib/mysql/*err 130529 12:22:26 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_feed_mod_57bc725ad6568758915363af670fd8bc', '1369797746', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) 130529 12:22:26 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_timeout_dash_de3249c4736ad3bd2cd29147c4a0d43e', '1369840946', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`) 130529 12:22:26 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_dash_de3249c4736ad3bd2cd29147c4a0d43e', '<h4>人気上位</h4>\n<h5><a href=\'http://wordpress.org/plugins/facebook/\'>Facebook</a></h5> <span>(<a href=\'plugin-install.php?tab=plugin-information&plugin=facebook&_wpnonce=0c777d14e5&TB_iframe=true&width=600&height=800\' class=\'thickbox\' title=\'Facebook\'>インストール</a>)</span>\n<p>Add Facebook social plugins and the ability to publish new posts to a Facebook Timeline or Facebook Page. Official Facebook plugin.</p>\n<h4>最新のプラグイン</h4>\n<h5><a href=\'http://wordpress.org/plugins/ppm-testimonial/\'>PPM Testimonial</a></h5> <span>(<a href=\'plugin-install.php?tab=plugin-information&plugin=ppm-testimonial&_wpnonce=93cd144こんな感じでわーっと出てますね。
MySQLのBINLOG_FORMATが良くないのかな?
現在のフォーマットを確認します。
mysql> SHOW GLOBAL VARIABLES like 'binlog_format'; +---------------+-----------+ | Variable_name | Value | +---------------+-----------+ | binlog_format | STATEMENT | +---------------+-----------+ 1 row in set (0.00 sec)
STATEMENTですね。
これを、MIXEDにしてみました。
mysql> SET GLOBAL binlog_format = 'MIXED';
# vi /etc/my.cnf binlog_format=mixedこれでしばらく様子見です。
追伸:MySQLのWarning出なくなりました。