Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.5.0
Description
With the following SQL queries, mysql gets stuck in MariaDB-server but not in MySQL-server and the CPU is occupied 100 %.
CREATE TEMPORARY TABLE v0 ( v1 INT UNIQUE ) ; |
WITH RECURSIVE v0 ( v1 ) AS ( SELECT -128 UNION SELECT v1 + 33 FROM v0 ) SELECT 'x' , -1 , 54703121.000000 FROM v0 AS v3 , v0 AS v2 ,v0 NATURAL JOIN v0 AS v5 NATURAL JOIN v0 AS v4 ; |
Do you expect v0 inside the CTE definition to refer to the temporary table? If so, why do you expect that, is it somehow specified by standard?
I think what it's actually doing is this (no table creation is required):
So, it runs until max_recursive_iterations is exceeded, which is 4294967295 by default in MariaDB.
Which version of MySQL did you try and what does it return? 8.0.18 crashes for me while trying to execute it (a debug build, at least).