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

Server crash when using JSON<=>VARCHAR

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5.25, 11.4.3, 11.5.2, 11.6.0, 11.7.0
    • N/A
    • JSON
    • None

    Description

      I noticed a crash on every version of MariaDB when running something similar to the following:

      create table tst(val json);
      insert into tst values('{}');
      select t.val<=>json_extract('[]','$') from tst t;
      

      Though it can be reproduced also by running just this

      select '[]'<=>json_extract('[]','$')
      

      The problem being the comparison of JSON and VARCHAR with the <=> operator.

      I suppose the problem is that even though MariaDB accepts the token json as data type, it desugars to longtext, but internally, there is still a distinct type for json data.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cbeikov Christian Beikov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.