Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16285

OPTIMIZE TABLE on sequence causes unexpected ER_BINLOG_UNSAFE_STATEMENT warning

    XMLWordPrintable

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.