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

JSON_ARRAYAGG() returns garbage because of off-by-one error

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      set session group_concat_max_len = 9;
      create temporary table t (c varchar(20) character set latin1);
      insert into t values ('ab'), ('cd'), ('ef');
      select json_arrayagg(c order by c) from t;
      drop temporary table t;
      

      Reported by Lukas Kupczyk

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h
                  1h

                  Git Integration

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