I'm trying to upgrade mysql version from 5.6 to 8.0
Some legacy SQL statements contain user defined variables.
my problem is that the result of below query is diffrent between two versions. (it's summary of problem)
SELECT @t
FROM ( SELECT @t:=0 ) T
WHERE @t IS NOT NULL
In the case of version 5.6,
0 is displayed on the result table.
But, on version 8.0 there is no row in the result table.
It look like @t is still NULL(@t is not defined) in the WHERE clause.
I wonder why @t is not defined and assigned in the sub-query in the FROM clause.
Does anyone know the reason?