The DDL for table thread contains a UNIQUE constraint on the column definition and a UNIQUE (thread_root), that results in a duplicate index called thread_root_2 (at least in my version 10.1.34-MariaDB)
One definition should be removed.
CREATE TABLE /*$wgDBprefix*/thread ( thread_id int(8) unsigned NOT NULL PRIMARY KEY auto_increment, thread_root int(8) unsigned UNIQUE NOT NULL, thread_ancestor int(8) unsigned NOT NULL, thread_parent int(8) unsigned NULL, thread_summary_page int(8) unsigned NULL, thread_subject varchar(255) NULL, thread_author_id int unsigned NULL, thread_author_name varchar(255) NULL, thread_modified char(14) binary NOT NULL default '', thread_created char(14) binary NOT NULL default '', thread_editedness int(1) NOT NULL default 0, thread_article_namespace int NOT NULL, thread_article_title varchar(255) binary NOT NULL, thread_article_id int(8) unsigned NOT NULL, -- Special thread types (deleted/move trace/normal) thread_type int(4) unsigned NOT NULL default 0, -- Sort key thread_sortkey varchar(255) NOT NULL default '', -- Reply count, -1 means uninitialised. thread_replies int(8) DEFAULT -1, -- Signature thread_signature TINYBLOB NULL, UNIQUE (thread_root) ) /*$wgDBTableOptions*/;