MariaDB> SELECT @var1, @var2;
        -> NULL, NULL
MariaDB> SELECT @var1 := 1, @var2;
        -> 1, NULL
MariaDB> SELECT @var1, @var2;
        -> 1, NULL
MariaDB> SELECT @var1, @var2 := @var1;
        -> 1, 1
MariaDB> SELECT @var1, @var2;
        -> 1, 1

MariaDB> SELECT @var1:=COUNT(*) FROM t1;
        -> 4
MariaDB> SELECT @var1;
        -> 4
