The file "patch-ss_images.sql" is wrong.
The wrong file: ALTER TABLE /*$wgDBprefix*/site_stats ADD ss_images int(10) default '0'; SELECT @images := COUNT(*) FROM /*$wgDBprefix*/image; UPDATE site_stats SET ss_images=@images;
The is correct: ALTER TABLE /*$wgDBprefix*/site_stats ADD ss_images int(10) default '0'; SELECT @images := COUNT(*) FROM /*$wgDBprefix*/image; UPDATE /*$wgDBprefix*/site_stats SET ss_images=@images;
Thomas Klein