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

Wrong warnings on 2-nd execution of PS for query with GROUP_CONCAT

    XMLWordPrintable

Details

    Description

      Wrong message on second execution of prepare statement for GROUP_CONCAT() function with optimizer_switch='outer_join_with_cache=off' (with 'outer_join_with_cache=on' messages are correct ) and left join:

      SET optimizer_switch='outer_join_with_cache=off';
       
      set group_concat_max_len=5;
      create table t1 (a int, b varchar(20));
      create table t2 (a int, c varchar(20));
      insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
      insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
       
      prepare stmt1 from "select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a";
       
      execute stmt1;
      execute stmt1;
       
      deallocate prepare stmt1;
       
      drop table t1, t2;
      set group_concat_max_len=default;
      

      Actual result:

      execute stmt1;
      group_concat(t1.b,t2.c)
      aaaaa
      bbbbb
      Warnings:
      Warning	1260	Row 1 was cut by GROUP_CONCAT()
      Warning	1260	Row 2 was cut by GROUP_CONCAT()
      execute stmt1;
      group_concat(t1.b,t2.c)
      aaaaa
      bbbbb
      Warnings:
      Warning	1260	Row 3 was cut by GROUP_CONCAT()
      Warning	1260	Row 4 was cut by GROUP_CONCAT()
      deallocate prepare stmt1;
      

      Expected result:

      execute stmt1;
      group_concat(t1.b,t2.c)
      aaaaa
      bbbbb
      Warnings:
      Warning	1260	Row 1 was cut by GROUP_CONCAT()
      Warning	1260	Row 2 was cut by GROUP_CONCAT()
      execute stmt1;
      group_concat(t1.b,t2.c)
      aaaaa
      bbbbb
      Warnings:
      Warning	1260	Row 1 was cut by GROUP_CONCAT()
      Warning	1260	Row 2 was cut by GROUP_CONCAT()
      deallocate prepare stmt1;
      

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.