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

incorrect nest_level value with INTERSECT

Details

    Description

      If put such assert which shoud be true several tests in the test suite which use INTERSECT will fail:

      diff --git a/sql/sql_base.cc b/sql/sql_base.cc
      index 2b06cf27d9b..93ed007300a 100644
      --- a/sql/sql_base.cc
      +++ b/sql/sql_base.cc
      @@ -7503,6 +7503,10 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array,
       
         thd->column_usage= column_usage;
         DBUG_PRINT("info", ("thd->column_usage: %d", thd->column_usage));
      +  DBUG_ASSERT(thd->lex->current_select->nest_level >= 0);
      +  DBUG_ASSERT(thd->lex->current_select->master_unit()->first_select()
      +                ->nest_level ==
      +              thd->lex->current_select->nest_level);
         if (allow_sum_func)
           thd->lex->allow_sum_func.set_bit(thd->lex->current_select->nest_level);
         thd->where= THD::DEFAULT_WHERE;
      

      Attachments

        Activity

          sanja Oleksandr Byelkin created issue -
          sanja Oleksandr Byelkin made changes -
          Field Original Value New Value
          sanja Oleksandr Byelkin made changes -
          Assignee Oleksandr Byelkin [ sanja ] Alexey Botchkov [ holyfoot ]
          holyfoot Alexey Botchkov made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          holyfoot Alexey Botchkov made changes -
          Assignee Alexey Botchkov [ holyfoot ] Oleksandr Byelkin [ sanja ]
          sanja Oleksandr Byelkin made changes -
          Fix Version/s 10.3.32 [ 26029 ]
          Fix Version/s 10.3 [ 22126 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          sanja Oleksandr Byelkin made changes -
          Labels not-10.2 not-10.4 not-10.5 not-10.6 not-10.7
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 124284 ] MariaDB v4 [ 159582 ]

          People

            sanja Oleksandr Byelkin
            sanja Oleksandr Byelkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.