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

JSON_UNQUOTE collation changed from 10.6 to 10.11

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.11, 11.4, 11.8
    • 10.11
    • None
    • None
    • Q4/2026 Server Maintenance

    Description

      On 10.6 JSON_UNQUOTE returns the same collation as JSON_EXTRACT:

      SELECT COLLATION((JSON_EXTRACT('{"a":"Test"}','$.a'))) AS result; 
      +--------------------+
      | result             |
      +--------------------+
      | utf8mb3_general_ci |
      +--------------------+
       
      SELECT COLLATION(JSON_UNQUOTE(JSON_EXTRACT('{"a":"Test"}','$.a'))) AS result; 
      +--------------------+
      | result             |
      +--------------------+
      | utf8mb3_general_ci |
      +--------------------+
      

      But from 10.11 on it returns utf8mb4_bin instead, regardless of default character set and collation settings:

      SELECT COLLATION((JSON_EXTRACT('{"a":"BOND"}','$.a'))) AS result; 
       
      +--------------------+
      | result             |
      +--------------------+
      | utf8mb3_general_ci |
      +--------------------+
       
      SELECT COLLATION(JSON_UNQUOTE(JSON_EXTRACT('{"a":"Test"}','$.a'))) AS result; 
      +--------------+
      | result       |
      +--------------+
      | utf8mb4_bin  |
      +--------------+
      

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              hholzgra Hartmut Holzgraefe
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Time Spent - 0.5d Remaining Estimate - 5d
                  5d
                  Logged:
                  Time Spent - 0.5d Remaining Estimate - 5d
                  0.5d

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.