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

mysqlbinlog --verbose shows incorrect values for timestamps >= 2^31 if binlog was created with mysql56_temporal_format=off

Details

    Description

      --source include/have_binlog_format_row.inc
       
      set @format.save= @@mysql56_temporal_format;
      set global mysql56_temporal_format= off;
       
      create table t (a timestamp);
      insert into t values (from_unixtime(power(2,31)));
       
      --let $datadir= `select @@datadir`
      flush binary logs;
      --exec $MYSQL_BINLOG --verbose $datadir/master-bin.000001
       
      drop table t;
      set global mysql56_temporal_format= @format.save;
      

      bb-11.3-timestamp fd6689da3fffc4d57d8ebde5f8776aefa8cdb8a4

      ### INSERT INTO `test`.`t`
      ### SET
      ###   @1=-2147483648
      

      Attachments

        Issue Links

          Activity

            I'm not setting it as a feature blocker, because mysqlbinlog doesn't work correctly with mysql56_temporal_format=off anyway (e.g. MDEV-32929).

            elenst Elena Stepanova added a comment - I'm not setting it as a feature blocker, because mysqlbinlog doesn't work correctly with mysql56_temporal_format=off anyway (e.g. MDEV-32929 ).
            monty Michael Widenius added a comment - - edited

            The problem here is similar to other cases with binary logging that we do not send the slave the environment in which the table was created, like engine, mysql56_temporal_format and other parameters that affects create table and alter table.
            MDEV-14760 is supposed to fix this one

            monty Michael Widenius added a comment - - edited The problem here is similar to other cases with binary logging that we do not send the slave the environment in which the table was created, like engine, mysql56_temporal_format and other parameters that affects create table and alter table. MDEV-14760 is supposed to fix this one

            Two ways to fix it independent of MDEV-14760:

            1) Store things in the binary log always in 'mysql56_temporal_format' and ensure that if the slave has this off, it will do the conversion.
            2) Have a flag in the binary log for the table event where we have a bit if this variable is off. In this case we have of course to convert things if needed on the slave side if the timestamp type does not match.

            monty Michael Widenius added a comment - Two ways to fix it independent of MDEV-14760 : 1) Store things in the binary log always in 'mysql56_temporal_format' and ensure that if the slave has this off, it will do the conversion. 2) Have a flag in the binary log for the table event where we have a bit if this variable is off. In this case we have of course to convert things if needed on the slave side if the timestamp type does not match.

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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