Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > MySQL > Statement may not be safe to log in statement form


Автор: Rodman 8.11.2012, 16:51
Дароф

Сайт юзает запрос типа:

Код

UPDATE table SET foo = 'bar' WHERE pkey = n


где pkey - primary key, и n целочисленная константа.
Все запросы пишутся в бинарный лог. И лог показывает предупреждение
Код

Statement may not be safe to log in statement format.


Как можно модернизировать запрос, чтобы он не выдавал предупреждение?

Спасибо

Автор: Akina 8.11.2012, 20:12
Цитата

With statement-based replication, there may be issues with replicating nondeterministic statements. In deciding whether or not a given statement is safe for statement-based replication, MySQL determines whether it can guarantee that the statement can be replicated using statement-based logging. If MySQL cannot make this guarantee, it marks the statement as potentially unreliable and issues the warning, Statement may not be safe to log in statement format. 

Самый простой выход имхо - сменить режим бин-лога (на смешанный?).

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)