Handling of safe and unsafe statements-opracowanie

Nasza ocena:

3
Wyświetleń: 301
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Handling of safe and unsafe statements-opracowanie - strona 1

Fragment notatki:

Handling of safe and unsafe statements. A statement is treated differently depending on whether
the statement is considered safe, and with respect to the binary logging format (that is, the current
value of binlog_format [2047]).
• No distinction is made in the treatment of safe and unsafe statements when the binary logging mode
is ROW.
• If the binary logging format is MIXED, statements flagged as unsafe are logged using the row-based
format; statements regarded as safe are logged using the statement-based format.
• If the binary logging format is STATEMENT, statements flagged as being unsafe generate a warning
to this effect. (Safe statements are logged normally.)
Each statement flagged as unsafe generates a warning. Formerly, in cases where a great many
such statements were executed on the master, this could lead to very large error log files, sometimes
even filling up an entire disk unexpectedly. To guard against this, MySQL 5.6.7 introduced a
warning suppression mechanism, which behaves as follows: Whenever the 50 most recent
ER_BINLOG_UNSAFE_STATEMENT [4232] warnings have been generated more than 50 times in any
50-second period, warning suppression is enabled. When activated, this causes such warnings not to
be written to the error log; instead, for each 50 warnings of this type, a note The last warning was
repeated N times in last S seconds is written to the error log. This continues as long as the
50 most recent such warnings were issued in 50 seconds or less; once the rate has decreased below
this threshold, the warnings are once again logged normally. Warning suppression has no effect on
how the safety of statements for statement-based logging is determined, nor on how warnings are sent
to the client (MySQL clients still receive one warning for each such statement).
For more information, see Section 16.1.2, “Replication Formats”.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz