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

Document effects of secure_timestamp=YES for replication

    XMLWordPrintable

Details

    Description

      From the description of secure_timestamp variable in the KB it's easy to assume that secure_timestamp=YES is the safest of values. It is worth mentioning that while YES is more secure from the perspective of protection against system versioning history tampering, for which it was introduced, it's fatal for replication and cannot be used on replication slaves, which is why there is the separate REPLICATION value. With secure_timestamp=YES any scenario when a value based on the timestamp is inserted in the statement mode can lead to discrepancy between master and slave and eventual replication abort.

      Description: Restricts direct setting of a session timestamp. Possible levels are:
      YES - timestamp cannot deviate from the system clock
      REPLICATION - replication thread can adjust timestamp to match the master's
      SUPER - a user with this privilege and a replication thread can adjust timestamp
      NO - historical behavior, anyone can modify session timestamp

      --source include/have_innodb.inc
      --source include/have_binlog_format_mixed.inc
      --source include/master-slave.inc
       
      --let $rpl_server_number= 2
      --let $rpl_server_parameters= --secure-timestamp=YES
      --source include/rpl_restart_server.inc
       
      --connection master
      CREATE TABLE t (a DATETIME(6), b INT) ENGINE=InnoDB;
      INSERT INTO t VALUES (NOW(6),1);
       
      --connection slave
      START SLAVE;
       
      --connection master
      UPDATE IGNORE t SET b = 2;
       
      --sync_slave_with_master
       
      --connection master
      DROP TABLE t;
      --source include/rpl_end.inc
      

      10.4 87a5d16911bb94d383480fdd49e20876ed1400f2

      Last_SQL_Error	Could not execute Update_rows_v1 event on table test.t; Can't find record in 't', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000001, end_log_pos 0
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.