X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexternalstore%2FExternalStoreDB.php;h=b43bd210aa6ac0c332bf851cffee2bbac33c75f1;hb=8269ed4dfd5e4395e25945b1fa2ed391684606ed;hp=6bb1618ff6869bc158e9c5ac9348e660edfe2fa0;hpb=eca93b7c40944f1ac44d42f8ffa4afccc2ca235a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/externalstore/ExternalStoreDB.php b/includes/externalstore/ExternalStoreDB.php index 6bb1618ff6..b43bd210aa 100644 --- a/includes/externalstore/ExternalStoreDB.php +++ b/includes/externalstore/ExternalStoreDB.php @@ -92,9 +92,8 @@ class ExternalStoreDB extends ExternalStoreMedium { public function store( $location, $data ) { $dbw = $this->getMaster( $location ); - $id = $dbw->nextSequenceValue( 'blob_blob_id_seq' ); $dbw->insert( $this->getTable( $dbw ), - [ 'blob_id' => $id, 'blob_text' => $data ], + [ 'blob_text' => $data ], __METHOD__ ); $id = $dbw->insertId(); if ( !$id ) { @@ -104,6 +103,10 @@ class ExternalStoreDB extends ExternalStoreMedium { return "DB://$location/$id"; } + public function isReadOnly( $location ) { + return ( $this->getLoadBalancer( $location )->getReadOnlyReason() !== false ); + } + /** * Get a LoadBalancer for the specified cluster *