OPTIMIZE TABLE on a sequence causes ER_BINLOG_UNSAFE_STATEMENT warning ("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"), even with binlog_format set to mixed or row.
--source include/have_log_bin.inc
|
--source include/have_binlog_format_mixed_or_row.inc
|
CREATE SEQUENCE s;
|
OPTIMIZE TABLE s;
|
|
# Cleanup
|
DROP SEQUENCE s;
|
10.3 f130adbf
|
OPTIMIZE TABLE s;
|
Table Op Msg_type Msg_text
|
test.s optimize note The storage engine for the table doesn't support optimize
|
Warnings:
|
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave
|
2021-01-18 18:38:18 5 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave Statement: OPTIMIZE TABLE s
|