mysql – Why initializing variable with var = (SELECT .. FROM t) puts an S lock on selected rows, but SELECT .. INTO do not put locks?

How to repeat:

-- Create table
CREATE TABLE test_lock_s (
 id INT UNSIGNED NOT NULL AUTO_INCREMENT
, user INT UNSIGNED DEFAULT NULL
, PRIMARY KEY (id)
);

-- Fill it with some data
INSERT INTO test_lock_s(id, user) VALUES (1, 1), (2, 1), (3, 2), (4, 7);

-- Then create two sessions

-- Session 1 (also works with read-committed)
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
START TRANSACTION;

-- (q1) This query acquires an S lock
SET @to = (SELECT tt.id FROM test_lock_s tt WHERE tt.id = 3);

-- (q2) And this query do not put locks
SELECT tt.id INTO @to FROM test_lock_s tt WHERE tt.id = 3;

-- Session 2

SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
START TRANSACTION;

-- This query hangs (if q1 is used in sess 1), trying to get X lock, waiting for an S lock to be released (by session 1)
UPDATE test_lock_s tt SET tt.user = 0 WHERE tt.id = 3;