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

json_merge() concatenates instead of merging

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2.4
    • Component/s: JSON
    • Labels:

      Description

      I am not sure where to refer what "json merge" means formally, but looking in several places makes me think that current 10.2 behavior is incorrect :

      MariaDB [test]> select json_merge('{"a":"b"}', '{"a":"c"}') ;
      | {"a":"b", "a":"c"}                   |
      

      While both http://tools.knowledgewalls.com/onlinejsonmerger and MySQL 5.7 show:

      mysql > select json_merge('{"a":"b"}', '{"a":"c"}') ;
      | {"a": ["b", "c"]}                    |
      

        Attachments

          Activity

            People

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            anikitin Andrii Nikitin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration