[MDEV-15571] Wrong results with big_tables=1 and CTE Created: 2018-03-15  Updated: 2018-12-21  Resolved: 2018-04-17

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - CTE
Affects Version/s: 10.2
Fix Version/s: 10.2.15

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-15447 Import CTE tests from MySQL 8 Stalled

 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'



 Comments   
Comment by Igor Babaev [ 2018-04-17 ]

The cause of this bug was the same as for the bug mdev-15575.

Generated at Thu Feb 08 08:22:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.