jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/345494 )
Change subject: Update comment for indexName(), explaining why it exists
......................................................................
Update comment for indexName(), explaining why it exists
Bug: T154872
Change-Id: Idf64b85dc56dcc28f3a25b2b8ded44c5490cf56c
---
M includes/libs/rdbms/database/DatabaseMysqlBase.php
1 file changed, 14 insertions(+), 1 deletion(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php
b/includes/libs/rdbms/database/DatabaseMysqlBase.php
index 4b3a644..6725090 100644
--- a/includes/libs/rdbms/database/DatabaseMysqlBase.php
+++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php
@@ -1343,7 +1343,20 @@
* @return string
*/
protected function indexName( $index ) {
- // Backwards-compatibility hack
+ /**
+ * When SQLite indexes were introduced in r45764, it was noted
that
+ * SQLite requires index names to be unique within the whole
database,
+ * not just within a schema. As discussed in CR r45819, to
avoid the
+ * need for a schema change on existing installations, the
indexes
+ * were implicitly mapped from the new names to the old names.
+ *
+ * This mapping can be removed if DB patches are introduced to
alter
+ * the relevant tables in existing installations. Note that
because
+ * this index mapping applies to table creation, even new
installations
+ * of MySQL have the old names (except for installations
created during
+ * a period where this mapping was inappropriately removed, see
+ * T154872).
+ */
$renamed = [
'ar_usertext_timestamp' => 'usertext_timestamp',
'un_user_id' => 'user_id',
--
To view, visit https://gerrit.wikimedia.org/r/345494
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idf64b85dc56dcc28f3a25b2b8ded44c5490cf56c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Tim Starling <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits