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

Replication error in UPDATE statement

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.14
    • None
    • None
    • None

    Description

      Hi,

      With a statement like this:

                          UPDATE fields
                          INNER JOIN
                              (WITH cte (field_id, value) AS (
                                  VALUES (?, ?)
                              ) SELECT * FROM cte)
                              s
                          ON fields.field_id = s.field_id
                          SET
                              fields.value = s.value
                          WHERE fields.record_id = ?
      

      Where `field_id` is a binary(16) value (UUID).

      We get a replication error on a slave:

      Read Replica Replication Error - SQLError: 1366, reason: Error 'Incorrect string value: '\xBC\xC0\x00\x921J...' for column ``.`(temporary)`.`field_id` at row 1' on query...
      

      When using MIXED or STATEMENT binlog format. ROW format works fine.
      Also, MariaDB uses actual values as column names for `VALUES` temporary table (this this query we're renaming them by using `WITH cte (field_id, value)`). Could this lead to a problem if value isn't utf-8 or too large?

      Attachments

        Activity

          People

            Unassigned Unassigned
            Tubanov Stepan
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.