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

DATE -> DATETIME replication conversion not working, even in ALL_NON_LOSSY mode

Details

    Description

      When having a DATE column on the master, a DATETIME column on the slave, and binlog_format=ROW, inserting into the table fails on the salve with:

      Last_SQL_Error: Column 1 of table 'test.t1' cannot be converted from type 'date' to type 'datetime'

      even with slave_type_conversions=ALL_NON_LOSSY, even though a conversion from a DATE to a DATETIME should be a lossles operation.

      In the MySQL 5.6 manual this conversion is listed as "not supported before 5.5.3". In the 5.7 and 5.8 versions of the manual this paragraph has been removed, but still DATE and DATETIME are missing from the list of supported operations.

      Our own documentation doesn't seem to mention supported conversion types at all.

      https://dev.mysql.com/doc/refman/5.6/en/replication-features-differing-tables.html

      Attachments

        Issue Links

          Activity

            hholzgra Hartmut Holzgraefe created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Status Open [ 1 ] Confirmed [ 10101 ]

            Reproducible easily, I'll leave it to Elkin to decide whether it needs to be fixed, or documented, or both.

            elenst Elena Stepanova added a comment - Reproducible easily, I'll leave it to Elkin to decide whether it needs to be fixed, or documented, or both.
            elenst Elena Stepanova made changes -
            Component/s Documentation [ 10903 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Affects Version/s 5.5 [ 15800 ]
            Affects Version/s 10.0 [ 16000 ]
            Affects Version/s 10.1 [ 16100 ]
            Affects Version/s 10.2 [ 14601 ]
            Affects Version/s 10.3 [ 22126 ]
            Assignee Andrei Elkin [ elkin ]
            Labels upstream
            Elkin Andrei Elkin made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            Elkin Andrei Elkin added a comment -

            Hello, Alexander!

            The latest patch is ready for your review and is available in the commit list as well as
            on bb-10.2-andrei.

            Cheers,

            Andrei

            Elkin Andrei Elkin added a comment - Hello, Alexander! The latest patch is ready for your review and is available in the commit list as well as on bb-10.2-andrei. Cheers, Andrei
            Elkin Andrei Elkin made changes -
            Assignee Andrei Elkin [ elkin ] Alexander Barkov [ bar ]
            Status In Progress [ 3 ] In Review [ 10002 ]

            Hi Andrei,

            The patch
            https://github.com/mariadb/server/commit/9fa03e5295366f66499037e7aaeab342c9ea3887
            looks generally find for me.

            Please consider reusing these files for new tests:

            • mysql-test/suite/rpl/include/type_conversions.test
            • mysql-test/suite/rpl/include/rpl_typeconv.inc
            • mysql-test/suite/rpl/t/rpl_typeconv.test
            bar Alexander Barkov added a comment - Hi Andrei, The patch https://github.com/mariadb/server/commit/9fa03e5295366f66499037e7aaeab342c9ea3887 looks generally find for me. Please consider reusing these files for new tests: mysql-test/suite/rpl/include/type_conversions.test mysql-test/suite/rpl/include/rpl_typeconv.inc mysql-test/suite/rpl/t/rpl_typeconv.test
            Elkin Andrei Elkin added a comment -

            Alexander, the testing part is improved per your request. A new patch 0d5b469fc32 is available for double-checking (bb-10.2-andrei and commit-list). Thanks for checking! Andrei.

            Elkin Andrei Elkin added a comment - Alexander, the testing part is improved per your request. A new patch 0d5b469fc32 is available for double-checking (bb-10.2-andrei and commit-list). Thanks for checking! Andrei.

            Andrei,

            Looks very good for me. Ok to push.
            Thanks for addressing proposed suggestions.

            bar Alexander Barkov added a comment - Andrei, Looks very good for me. Ok to push. Thanks for addressing proposed suggestions.
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Andrei Elkin [ elkin ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            Elkin Andrei Elkin made changes -
            Elkin Andrei Elkin added a comment -

            Patch 2308b9afec5 is pushed to 10.2.

            Elkin Andrei Elkin added a comment - Patch 2308b9afec5 is pushed to 10.2.
            Elkin Andrei Elkin made changes -
            Fix Version/s 10.2.19 [ 23207 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            hholzgra Hartmut Holzgraefe made changes -
            hholzgra Hartmut Holzgraefe made changes -
            Fix Version/s 10.3.11 [ 23141 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 89158 ] MariaDB v4 [ 154874 ]
            alice Alice Sherepa made changes -
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 196237

            People

              Elkin Andrei Elkin
              hholzgra Hartmut Holzgraefe
              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.