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

Wrong results with big_tables=1 and CTE

    XMLWordPrintable

    Details

      Description

      Expected result -error 1690 (22003): BIGINT value is out of range in '`qn`.`a` * 2000' in both cases:

      MariaDB [test]> SET big_tables=1;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> with recursive qn as (select 1 as a from dual union all select a*2000 from qn where a<10000000000000000000) select * from qn;
      +------+
      | a    |
      +------+
      |    1 |
      | 2000 |
      +------+
      2 rows in set (0.02 sec)
       
      MariaDB [test]> SET big_tables=0;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> with recursive qn as (select 1 as a from dual union all select a*2000 from qn where a<10000000000000000000) select * from qn;
      ERROR 1690 (22003): BIGINT value is out of range in '`qn`.`a` * 2000'
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              igor Igor Babaev
              Reporter:
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: