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

"With recursive" clause buggy or 1001 rows limited

    XMLWordPrintable

Details

    Description

      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 9
      Server version: 10.6.8-MariaDB-1:10.6.8+maria~focal mariadb.org binary distribution
       
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> with
          ->    recursive Table1 as (
          ->       select
          ->          1 as id
          ->       union all
          ->       select
          ->          A.id + 1 as id
          ->       from
          ->          Table1 A
          ->       where
          ->          A.id < 155
          ->    )
          -> select
          ->     count(*)
          -> from
          ->     Table1;
      +----------+
      | count(*) |
      +----------+
      |      155 |
      +----------+
      1 row in set (0.000 sec)
       
      MariaDB [(none)]> with
          ->    recursive Table1 as (
          ->       select
          ->          1 as id
          ->       union all
          ->       select
          ->          A.id + 1 as id
          ->       from
          ->          Table1 A
          ->       where
          ->          A.id < 40000
          ->    )
          -> select
          ->     count(*)
          -> from
          ->     Table1;
      +----------+
      | count(*) |
      +----------+
      |     1001 |
      +----------+
      1 row in set (0.002 sec)
       
      MariaDB [(none)]> 
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            albert_hastings Albert Hastings
            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.