This worked in 10.2 and 10.3 but has syntax error in 10.4. I couldn't find any documentation of the change.
with data as (select 1 as id)
select id into @myid from data;
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from data' at line 1