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

JSON returns incorrect result when character_set_database is set to certain character sets

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
    • 10.11, 11.0, 11.1
    • JSON
    • None

    Description

      Testcase

      11.2.0-dbg>SET character_set_database=ucs2;
      Query OK, 0 rows affected (0.000 sec)
       
      11.2.0-dbg>SET CHARACTER SET DEFAULT;
      Query OK, 0 rows affected (0.000 sec)
       
      11.2.0-dbg>SELECT JSON_OVERLAPS('{"A": 1, "B": {"C":2}}', '{"A": 2, "B": {"C":2}}') AS is_overlap;
      +------------+
      | is_overlap |
      +------------+
      |          0 |
      +------------+
      1 row in set (0.000 sec)
       
      11.2.0-dbg>
      

      Expected result

      11.2.0-dbg>SELECT JSON_OVERLAPS('{"A": 1, "B": {"C":2}}', '{"A": 2, "B": {"C":2}}') AS is_overlap;
      +------------+
      | is_overlap |
      +------------+
      |          1 |
      +------------+
      1 row in set (0.000 sec)
       
      11.2.0-dbg>
      

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.