From 612850782d6d8bbe44d2b153a045b9a8afc624ef Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Mon, 16 Apr 2018 08:55:15 -0700 Subject: 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. --- mysql-test/r/cte_recursive.result | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/cte_recursive.result b/mysql-test/r/cte_recursive.result index 55cd30ff236..01443bb6494 100644 --- a/mysql-test/r/cte_recursive.result +++ b/mysql-test/r/cte_recursive.result @@ -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; -- cgit v1.2.1