The order is unreliable and is subject to change on different query evaluation plans.
However, I found a reliable hack around this. Please consider my presentation Programmatic Queries: Things you can Code with MySQL. In particular see slides 10 - 15.
The trick presented utilizes the known order of evaluation in a
CASE clause, as follows:
WHEN (@c3 := @c1 + @c2) IS NULL THEN NULL
WHEN (@c1 := @c2) IS NULL THEN NULL
WHEN (@c2 := @c3) IS NULL THEN NULL
END AS seq
(SELECT @c1 := 1, @c2 := 0) s_init
CASE expression has to evaluate the
WHEN clauses by order of appearance (to be more specific, it does so, and it doesn't make sense to do otherwise).
In the above none of the
WHEN expressions make for a true value, which is why the
CASE clause keeps evaluating them one by one. This gives you your required order.