Code ERROR Lost connection???

Hi guys whenever I try to run this part of the code it results in a lost connection error.

#Match constructor Id to get constructor points

ALTER TABLE f1_cleaned

ADD COLUMN team_points INT;

UPDATE f1_cleaned f

JOIN f1_dataset.constructor_results cr

ON f.constructorId = cr.constructorId AND f.raceId = cr.raceId

SET f.team_points = cr.points;

It's just essentially trying to match the 2 same columns "constructorId" and "raceId" , becasue each combination has a different "point". Im trying to add the "point" column to my "f1_cleaned" table.

Anyone know why?