Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/321810
Change subject: Add Flow External Store to addWiki.php ...................................................................... Add Flow External Store to addWiki.php Bug: T128417 Change-Id: Ieb45186e89fb0d3634c9de2da80289b6269187d0 --- M addWiki.php 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/10/321810/1 diff --git a/addWiki.php b/addWiki.php index 7d7c264..1b45ede 100644 --- a/addWiki.php +++ b/addWiki.php @@ -149,6 +149,18 @@ } else { $stores = array(); } + + // Flow External Store (may be the same, so there is an array_unique) + if ( is_array( $wgFlowExternalStore ) ) { + $flowStores = $wgFlowExternalStore; + } elseif ( $wgFlowExternalStore ) { + $flowStores = array( $wgFlowExternalStore ); + } else { + $flowStores = array(); + } + + $stores = array_unique( array_merge( $stores, $flowStores ) ); + if ( count( $stores ) ) { global $wgDBuser, $wgDBpassword, $wgExternalServers; foreach ( $stores as $storeURL ) { @@ -167,7 +179,10 @@ $store = new ExternalStoreDB; $extdb = $store->getMaster( $cluster ); $extdb->query( "SET default_storage_engine=InnoDB" ); - $extdb->query( "CREATE DATABASE $dbName" ); + + // IF NOT EXISTS because two External Store clusters + // can use the same DB, but different blobs table entries. + $extdb->query( "CREATE DATABASE IF NOT EXISTS $dbName" ); $extdb->selectDB( $dbName ); # Hack x2 -- To view, visit https://gerrit.wikimedia.org/r/321810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb45186e89fb0d3634c9de2da80289b6269187d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits