mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
MDEV-15571 Wrong results with big_tables=1 and CTE
The cause of this bug was the same as for the bug mdev-15575. Fixed by the patch for the latter.
This commit is contained in:
parent
224f7af911
commit
612850782d
2 changed files with 30 additions and 0 deletions
|
@ -3080,3 +3080,16 @@ a
|
|||
129
|
||||
130
|
||||
set big_tables=default;
|
||||
#
|
||||
# MDEV-1571: Setting user variable in recursive CTE
|
||||
#
|
||||
set big_tables=1;
|
||||
with recursive qn as
|
||||
(
|
||||
select 1 as a from dual
|
||||
union all
|
||||
select a*2000 from qn where a<10000000000000000000
|
||||
)
|
||||
select * from qn;
|
||||
ERROR 22003: BIGINT value is out of range in '`qn`.`a` * 2000'
|
||||
set big_tables=default;
|
||||
|
|
|
@ -2109,3 +2109,20 @@ with recursive qn as
|
|||
select * from qn;
|
||||
|
||||
set big_tables=default;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-1571: Setting user variable in recursive CTE
|
||||
--echo #
|
||||
|
||||
set big_tables=1;
|
||||
|
||||
--error ER_DATA_OUT_OF_RANGE
|
||||
with recursive qn as
|
||||
(
|
||||
select 1 as a from dual
|
||||
union all
|
||||
select a*2000 from qn where a<10000000000000000000
|
||||
)
|
||||
select * from qn;
|
||||
|
||||
set big_tables=default;
|
||||
|
|
Loading…
Add table
Reference in a new issue