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

OPTIMIZE on a sequence causes unexpected ER_BINLOG_UNSAFE_STATEMENT warning

    XMLWordPrintable

Details

    Description

      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
      

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.