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

Mariadb 10.0.38 datetime representation in binlog

    XMLWordPrintable

Details

    Description

      HI.

      I'm trying to connect kafka connector to my existing database and it reports problem when I try to insert/delete/update rows:

      org.apache.kafka.connect.errors.ConnectException: Invalid value for MonthOfYear (valid values 1 - 12): 75
          at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)
          at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:197)
          at io.debezium.connector.mysql.BinlogReader$ReaderThreadLifecycleListener.onEventDeserializationFailure(BinlogReader.java:992)
          at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:935)
          at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:580)
          at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:825)
          at java.lang.Thread.run(Thread.java:748)
      

      I use datetime field in my table:

      datetime(6)
      

      This is my sample insert:

      INSERT INTO `xxx` VALUES ('2019-10-18 14:45:40.000000');
      

      When I select this record I get proper value:

      select time from xxx where time='2019-10-18 14:45:40.000000';
      +----------------------------+
      | time                       |
      +----------------------------+
      | 2019-10-18 14:45:40.000000 |
      +----------------------------+
      1 row in set (0.00 sec)
      

      But the problem is that this filed has strange value in binlog file:

      mysqlbinlog -vv mysqld-bin.000004
       
      ### INSERT INTO `yyy`.`xxx`
      ### SET
      ###   @1=5775995-95-28 11:23:85 /* DATETIME meta=0 nullable=0 is_null=0 */
      

      This is my configuration file:

      [mysqld]
      server-id         = 223344
      log_bin           = mysql-bin
      expire_logs_days  = 1
      binlog_format     = row
      

      In new version of mariadb I don't have this problem. Unfortunately version 10.0.38 is our production version and I can't migrate to newer version for now.

      Do you know how to fix this problem without upgrading mariadb?

      Thanks

      Attachments

        Activity

          People

            serg Sergei Golubchik
            davis166 Dawid Szymaniuk-Paryż
            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.