jenkins-bot has submitted this change and it was merged.
Change subject: Re-added the index br_mail_timestamp
......................................................................
Re-added the index br_mail_timestamp
The selectRow operation on BounceHandlerActions::handleFailingRecipients()
would need the old index to run efficiently
Change-Id: I4f38c8531e1dae6f239c0cc743ed3fa82c47db10
---
M BounceHandlerHooks.php
M sql/bounce_records.sql
D sql/create_index.sql
A sql/create_index_mail_timestamp.sql
A sql/create_index_timestamp.sql
D sql/drop_mail_timestamp_index.sql
6 files changed, 13 insertions(+), 14 deletions(-)
Approvals:
Anomie: Looks good to me, but someone else must approve
Hoo man: Looks good to me, approved
01tonythomas: Looks good to me, but someone else must approve
Springle: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/BounceHandlerHooks.php b/BounceHandlerHooks.php
index 11b4f62..fd5170a 100644
--- a/BounceHandlerHooks.php
+++ b/BounceHandlerHooks.php
@@ -85,10 +85,8 @@
public static function LoadExtensionSchemaUpdates( DatabaseUpdater
$updater ) {
$updater->addExtensionTable( 'bounce_records', __DIR__ .
'/sql/bounce_records.sql', true );
$updater->modifyExtensionField( 'bounce_records', 'br_user',
__DIR__ . '/sql/alter_user_column.sql' );
- $updater->dropExtensionIndex( 'bounce_records',
'br_mail_timestamp',
- __DIR__ . '/sql/drop_mail_timestamp_index.sql' );
- $updater->addExtensionIndex( 'bounce_records', 'br_timestamp',
- __DIR__ . '/sql/create_index.sql' );
+ $updater->addExtensionIndex( 'bounce_records',
'br_mail_timestamp', __DIR__ .'/sql/create_index_mail_timestamp.sql' );
+ $updater->addExtensionIndex( 'bounce_records', 'br_timestamp',
__DIR__ .'/sql/create_index_timestamp.sql' );
return true;
}
diff --git a/sql/bounce_records.sql b/sql/bounce_records.sql
index d24c2ad..83252e4 100644
--- a/sql/bounce_records.sql
+++ b/sql/bounce_records.sql
@@ -9,4 +9,5 @@
br_reason VARCHAR(255) NOT NULL -- Failure reasons
)/*$wgDBTableOptions*/;
+CREATE INDEX /*i*/br_mail_timestamp ON /*_*/bounce_records(br_user_email(50),
br_timestamp);
CREATE INDEX /*i*/br_timestamp ON /*_*/bounce_records(br_timestamp);
diff --git a/sql/create_index.sql b/sql/create_index.sql
deleted file mode 100644
index 759e53e..0000000
--- a/sql/create_index.sql
+++ /dev/null
@@ -1,6 +0,0 @@
--- MySQL version of the database schema for the BounceHandler extension.
--- Licence: GNU GPL v2+
--- Author: Tony Thomas, Legoktm, Jeff Green
-
-
-CREATE INDEX /*i*/br_timestamp ON /*_*/bounce_records(br_timestamp);
diff --git a/sql/create_index_mail_timestamp.sql
b/sql/create_index_mail_timestamp.sql
new file mode 100644
index 0000000..f5a2267
--- /dev/null
+++ b/sql/create_index_mail_timestamp.sql
@@ -0,0 +1,5 @@
+-- MySQL version of the database schema for creating br_mail_timestamp index
for the BounceHandler extension.
+-- Licence: GNU GPL v2+
+-- Author: Tony Thomas, Legoktm, Jeff Green
+
+CREATE INDEX /*i*/br_mail_timestamp ON /*_*/bounce_records(br_user_email(50),
br_timestamp);
\ No newline at end of file
diff --git a/sql/create_index_timestamp.sql b/sql/create_index_timestamp.sql
new file mode 100644
index 0000000..a99fa5d
--- /dev/null
+++ b/sql/create_index_timestamp.sql
@@ -0,0 +1,5 @@
+-- MySQL version of the database schema for creating br_timestamp index for
the BounceHandler extension.
+-- Licence: GNU GPL v2+
+-- Author: Tony Thomas, Legoktm, Jeff Green
+
+CREATE INDEX /*i*/br_timestamp ON /*_*/bounce_records(br_timestamp);
\ No newline at end of file
diff --git a/sql/drop_mail_timestamp_index.sql
b/sql/drop_mail_timestamp_index.sql
deleted file mode 100644
index b4fc953..0000000
--- a/sql/drop_mail_timestamp_index.sql
+++ /dev/null
@@ -1,4 +0,0 @@
--- MySQL version of the database schema for removing br_mail_timestamp index
for the BounceHandler extension.
--- Licence: GNU GPL v2+
-
-ALTER TABLE /*_*/bounce_records DROP INDEX /*i*/br_mail_timestamp;
--
To view, visit https://gerrit.wikimedia.org/r/182421
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4f38c8531e1dae6f239c0cc743ed3fa82c47db10
Gerrit-PatchSet: 10
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <[email protected]>
Gerrit-Reviewer: 01tonythomas <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: PleaseStand <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits