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

Galera replication does not preserve the character set and collation associated with views, etc.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11, 11.8, 12.0.2
    • None
    • Galera
    • None

    Description

      When a CREATE VIEW statement is executed, the current connection character set and collation are saved as part of the view definition.

      When a CREATE VIEW statement is replicated in a Galera cluster (using default wsrep_osu_method=TOI), this information does not seem to be replicated. Instead, on the nodes to which the DDL operation was transmitted by replication, the view appears to end up saving the server default character set and collation with the view.

      This results in the schema being out of sync between nodes.

      To reproduce:

      • Using any simple Galera cluster, e.g. a trivial 3 node empty one
      • Check the server character set and collation - e.g. SELECT @@character_set_server, @@collation_server
      • Connect to any one node, ensure you are using a character set and collation other than that checked above, e.g. SET NAMES latin1 COLLATE latin1_bin, then create a trivial view CREATE VIEW foobar AS SELECT 1
      • Execute SHOW CREATE VIEW foobar on each node (or alternatively SELECT * FROM information_schema.views WHERE table_name = 'foobar') and observe discrepancy in the reported character set and collation.

      Attachments

        Activity

          People

            Unassigned Unassigned
            maxb Max Bowsher
            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.