Odd!
https://github.com/ILIAS-eLearning/ILIAS/blob/release_5-2/setup/sql/dbupdate_04.php#L16891
looks like it's trying to add a primary key of ('glo_id','term_id') to glo_term_reference
if you do a SHOW CREATE TABLE glo_term_reference what key is on there? In my DB It looks like
CREATE TABLE `glo_term_reference` (
`glo_id` int(11) NOT NULL DEFAULT 0,
`term_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`glo_id`,`term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
Which looks correct from here. If yours looks like that you can safely skip that step. You can do that by running a
UPDATE settings SET value = value+1 WHERE keyword = 'db_version';
and continue on.