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

spider group by handler wrong result on order by aggregate alias

Details

    Attachments

      Issue Links

        Activity

          elenst Elena Stepanova added a comment - - edited

          spider/bugfix.mdev_29008                 w1 [ fail ]
                  Test ended at 2022-09-12 07:51:41
           
          CURRENT_TEST: spider/bugfix.mdev_29008
          --- /usr/share/mysql-test/plugin/spider/spider/bugfix/r/mdev_29008.result	2022-09-12 06:53:40.000000000 +0000
          +++ /dev/shm/var/1/log/mdev_29008.reject	2022-09-12 07:51:39.743322459 +0000
          @@ -24,8 +24,8 @@
           ) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
           SELECT MIN(t2.a) AS f1, t1.b AS f2 FROM tbl_a AS t1 JOIN tbl_a AS t2 GROUP BY f2 ORDER BY f1, f2;
           f1	f2
          -1	2
           1	4
          +1	2
           connection master_1;
           DROP DATABASE IF EXISTS auto_test_local;
           connection child2_1;
           
          mysqltest: Result content mismatch
          

          It looks like the failure happens exclusively on non-x86_64 builders – x86, ppc64le, aarch64.

          elenst Elena Stepanova added a comment - - edited spider/bugfix.mdev_29008 w1 [ fail ] Test ended at 2022-09-12 07:51:41   CURRENT_TEST: spider/bugfix.mdev_29008 --- /usr/share/mysql-test/plugin/spider/spider/bugfix/r/mdev_29008.result 2022-09-12 06:53:40.000000000 +0000 +++ /dev/shm/var/1/log/mdev_29008.reject 2022-09-12 07:51:39.743322459 +0000 @@ -24,8 +24,8 @@ ) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT= 'table "tbl_a", srv "s_2_1"' ; SELECT MIN (t2.a) AS f1, t1.b AS f2 FROM tbl_a AS t1 JOIN tbl_a AS t2 GROUP BY f2 ORDER BY f1, f2; f1 f2 -1 2 1 4 +1 2 connection master_1; DROP DATABASE IF EXISTS auto_test_local; connection child2_1;   mysqltest: Result content mismatch It looks like the failure happens exclusively on non-x86_64 builders – x86, ppc64le, aarch64.

          fails the same way on x86_64 under --rr. The generated query is

          select min(t1.`a`) `f1`,t0.`b` `b` from `auto_test_remote`.`tbl_a` t0 join `auto_test_remote`.`tbl_a` t1 group by t0.`b` order by `f1`,t1.`b`
          

          note that the second element in the order by is incorrect

          serg Sergei Golubchik added a comment - fails the same way on x86_64 under --rr . The generated query is select min (t1.`a`) `f1`,t0.`b` `b` from `auto_test_remote`.`tbl_a` t0 join `auto_test_remote`.`tbl_a` t1 group by t0.`b` order by `f1`,t1.`b` note that the second element in the order by is incorrect

          serg Thank you for your patch. 8f9ac48 looks good to me. I'm pushing it to 10.3+.

          nayuta-yanagisawa Nayuta Yanagisawa (Inactive) added a comment - serg Thank you for your patch. 8f9ac48 looks good to me. I'm pushing it to 10.3+.

          People

            nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
            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.