Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3158

Failover/switchover modifies event character set and collation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 2.4.11
    • 2.4.15, 2.5.7
    • mariadbmon
    • None
    • MXS-SPRINT-121

    Description

      Hi,

      our database is completely in UTF8MB4. Commit below force "SET NAMES latin1" after connection to backend servers.

      https://github.com/mariadb-corporation/MaxScale/commit/6c9249131ffe9feeea2874d0baff36d85d40c2f4

      Due to this change, in case of failover/switchover are executed ALTER EVENT queries and MariaDB change charset of these events from utf8mb4 to latin1. After that, our events doesn't work due to Illegal mix of charset/collation errors.

      CREATE/ALTER EVENT, unfortunately take charset & collation from client connection.

      Possible proper way to handle this would be execute "SET NAMES %charset%; SET connection_collation %collation%".

      Variable %charset% can be loaded from @@global.character_set_database or @@global.character_set_server.

      Variable %collation% can be loaded from @@global.collation_database or select @@global.collation_server.

      Or, this charset and collation would be changeable by some optional variables in maxscale.cnf?

      We tried to add "SET NAMES utf8mb4; SET collation_connection = utf8mb_czech_ci;" into our promotion/demotion SQL files, but these commands are executed after ALTER EVENTS, so it's too late to handle that case.

      Attachments

        Activity

          People

            esa.korhonen Esa Korhonen
            jan.reges Ján Regeš
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.