Brian Wolff has uploaded a new change for review. https://gerrit.wikimedia.org/r/134947
Change subject: Make CloneDatabase error out on shared tables. ...................................................................... Make CloneDatabase error out on shared tables. Due to the way prefixes are handled, this doesn't work properly. Make it quit early to prevent confusion. I don't think there's many people who need shared table support, so I don't know if its worth the effort to actually fix. Bug: 65654 Change-Id: I6cd701998fc9066d8c7a4fc86d93a4282cc7f9bd --- M includes/db/CloneDatabase.php 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/134947/1 diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 536d721..dcde3e9 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -71,7 +71,13 @@ * Clone the table structure */ public function cloneTableStructure() { + global $wgSharedTables; foreach ( $this->tablesToClone as $tbl ) { + if ( in_array( $tbl, $wgSharedTables, true ) ) { + // Shared tables don't work properly when cloning due to + // how prefixes are handled (bug 65654) + throw new MWException( "Cannot clone shared table $tbl." ); + } # Clean up from previous aborted run. So that table escaping # works correctly across DB engines, we need to change the pre- # fix back and forth so tableName() works right. -- To view, visit https://gerrit.wikimedia.org/r/134947 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cd701998fc9066d8c7a4fc86d93a4282cc7f9bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian Wolff <bawolff...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits