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

main.subselect, main.subselect_no_exists_to_in often fails on CI with ER_SUBQUERY_NO_1_ROW

Details

    Description

      Often failed on kvm-fulltest2 (e.g https://buildbot.mariadb.net/buildbot/builders/kvm-fulltest2/builds/43965/steps/mtr_opttrace/logs/stdio)
      on amd64-ubuntu-2004-fulltest, in appveyor build)

      Cross-reference link lists 100 failures within 3 weeks. https://buildbot.mariadb.net/ci/reports/cross_reference#branch=&revision=&platform=&fail_name=main.subselect&fail_variant=&fail_info_full=ER_SUBQUERY_NO_1_ROW&typ=&info=&dt=&limit=100&fail_info_short=

      The error is new, first recent occurrence, according to cross-reference was on Oct 11 2023 on kvm-fulltest2 here

      main.subselect_no_exists_to_in started to fail earler , first recent occurence 2023-09-22

      main.subselect                           w1 [ fail ]
              Test ended at 2023-11-20 06:30:11
       
      CURRENT_TEST: main.subselect
      /mnt/buildbot/build/mariadb-10.11.7/client//mariadb-test: Error on delete of '/mnt/buildbot/build/mariadb-10.11.7/mysql-test/var/1/tmp/subselect.out.file.1' (Errcode: 2 "No such file or directory")
      mysqltest: At line 6003: query 'Select 
      (Select Sum(`TestCase`.Revenue) From mysql.slow_log E           
      Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
      ) As `ControlRev`
      From 
      (Select  3 as Revenue, 4 as TemplateID) As `TestCase` 
      Group By  TestCase.Revenue, TestCase.TemplateID' failed: ER_SUBQUERY_NO_1_ROW (1242): Subquery returns more than 1 row
      ::::
      
      

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            So the reason for the error is more than 2 rows are in the slow_log table.

            Is this too simplistic?

            diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result
            index 32652244353..f122719bca8 100644
            --- a/mysql-test/main/subselect.result
            +++ b/mysql-test/main/subselect.result
            @@ -7163,7 +7163,7 @@ drop table t1;
             #
             Select 
             (Select Sum(`TestCase`.Revenue) From mysql.slow_log E           
            -Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
            +Where TestCase.TemplateID not in (Select max(1) from mysql.slow_log where 2=2)
             ) As `ControlRev`
             From 
             (Select  3 as Revenue, 4 as TemplateID) As `TestCase` 
            

            danblack Daniel Black added a comment - So the reason for the error is more than 2 rows are in the slow_log table. Is this too simplistic? diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result index 32652244353..f122719bca8 100644 --- a/mysql-test/main/subselect.result +++ b/mysql-test/main/subselect.result @@ -7163,7 +7163,7 @@ drop table t1; # Select (Select Sum(`TestCase`.Revenue) From mysql.slow_log E -Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +Where TestCase.TemplateID not in (Select max(1) from mysql.slow_log where 2=2) ) As `ControlRev` From (Select 3 as Revenue, 4 as TemplateID) As `TestCase`
            danblack Daniel Black added a comment -

            Rex, can I get a review on https://github.com/MariaDB/server/pull/2883 please.

            danblack Daniel Black added a comment - Rex, can I get a review on https://github.com/MariaDB/server/pull/2883 please.
            Johnston Rex Johnston added a comment - - edited
            Johnston Rex Johnston added a comment - - edited https://github.com/MariaDB/server/pull/2883 Looks good to me!

            Confirmation: This https://github.com/MariaDB/server/pull/2883 was applied in Debian in https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/f7554dac59e002768847e686d58b3bad8efd7a9c and uploaded with MariaDB 1:10.11.6-2. Based on autopkgtest results at https://ci.debian.net/packages/m/mariadb/ all the new 1:10.11.6-2 CI runs are passing.

            otto Otto Kekäläinen added a comment - Confirmation: This https://github.com/MariaDB/server/pull/2883 was applied in Debian in https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/f7554dac59e002768847e686d58b3bad8efd7a9c and uploaded with MariaDB 1:10.11.6-2. Based on autopkgtest results at https://ci.debian.net/packages/m/mariadb/ all the new 1:10.11.6-2 CI runs are passing.

            People

              danblack Daniel Black
              wlad Vladislav Vaintroub
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.