[MDEV-16285] OPTIMIZE TABLE on sequence causes unexpected ER_BINLOG_UNSAFE_STATEMENT warning Created: 2018-05-24  Updated: 2021-01-20  Resolved: 2021-01-20

Status: Closed
Project: MariaDB Server
Component/s: Admin statements, Replication, Sequences
Affects Version/s: 10.3
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-24617 OPTIMIZE on a sequence causes unexpec... Closed

 Description   

10.3 6686dfcbbf7

MariaDB [test]> CREATE SEQUENCE t1;
Query OK, 0 rows affected (0.20 sec)
 
MariaDB [test]> OPTIMIZE TABLE t1;
+---------+----------+----------+-----------------------------------------------------------+
| Table   | Op       | Msg_type | Msg_text                                                  |
+---------+----------+----------+-----------------------------------------------------------+
| test.t1 | optimize | note     | The storage engine for the table doesn't support optimize |
+---------+----------+----------+-----------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)
 
MariaDB [test]> show warnings;
+-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message                                                                                                                                                                                                 |
+-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 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 |
+-------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
 
MariaDB [test]> select @@binlog_format;
+-----------------+
| @@binlog_format |
+-----------------+
| MIXED           |
+-----------------+
1 row in set (0.00 sec)

It doesn't make much sense to OPTIMIZE a sequence, but still, the warning is obviously weird and misplaced.


Generated at Thu Feb 08 08:27:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.