Changes for core/lib/Drupal/Core/Cache/DatabaseBackend.php: 1 added line, 1 removed line.
Original line number
Diff line number
Diff line
@@ -110,7 +110,7 @@ public function getMultiple(&$cids, $allow_invalid = FALSE) {
// ::select() is a much smaller proportion of the request.
$result=[];
try{
$result=$this->connection->query('SELECT cid, data, created, expire, serialized, tags, checksum FROM {'.$this->connection->escapeTable($this->bin).'} WHERE cid IN ( :cids[] ) ORDER BY cid',[':cids[]'=>array_keys($cid_mapping)]);
$result=$this->connection->query('SELECT [cid], [data], [created], [expire], [serialized], [tags], [checksum] FROM {'.$this->connection->escapeTable($this->bin).'} WHERE [cid] IN ( :cids[] ) ORDER BY [cid]',[':cids[]'=>array_keys($cid_mapping)]);
Changes for core/lib/Drupal/Core/Config/DatabaseStorage.php: 4 added lines, 4 removed lines.
Original line number
Diff line number
Diff line
@@ -66,7 +66,7 @@ public function __construct(Connection $connection, $table, array $options = [],
*/
publicfunctionexists($name){
try{
return(bool)$this->connection->queryRange('SELECT 1 FROM {'.$this->connection->escapeTable($this->table).'} WHERE collection = :collection AND name = :name',0,1,[
return(bool)$this->connection->queryRange('SELECT 1 FROM {'.$this->connection->escapeTable($this->table).'} WHERE [collection] = :collection AND [name] = :name',0,1,[
':collection'=>$this->collection,
':name'=>$name,
],$this->options)->fetchField();
@@ -84,7 +84,7 @@ public function exists($name) {
publicfunctionread($name){
$data=FALSE;
try{
$raw=$this->connection->query('SELECT data FROM {'.$this->connection->escapeTable($this->table).'} WHERE collection = :collection AND name = :name',[':collection'=>$this->collection,':name'=>$name],$this->options)->fetchField();
$raw=$this->connection->query('SELECT [data] FROM {'.$this->connection->escapeTable($this->table).'} WHERE [collection] = :collection AND [name] = :name',[':collection'=>$this->collection,':name'=>$name],$this->options)->fetchField();
if($raw!==FALSE){
$data=$this->decode($raw);
}
@@ -102,7 +102,7 @@ public function read($name) {
publicfunctionreadMultiple(array$names){
$list=[];
try{
$list=$this->connection->query('SELECT name, data FROM {'.$this->connection->escapeTable($this->table).'} WHERE collection = :collection AND name IN ( :names[] )',[':collection'=>$this->collection,':names[]'=>$names],$this->options)->fetchAllKeyed();
$list=$this->connection->query('SELECT [name], [data] FROM {'.$this->connection->escapeTable($this->table).'} WHERE [collection] = :collection AND [name] IN ( :names[] )',[':collection'=>$this->collection,':names[]'=>$names],$this->options)->fetchAllKeyed();
foreach($listas&$data){
$data=$this->decode($data);
}
@@ -318,7 +318,7 @@ public function getCollectionName() {
*/
publicfunctiongetAllCollectionNames(){
try{
return$this->connection->query('SELECT DISTINCT collection FROM {'.$this->connection->escapeTable($this->table).'} WHERE collection <> :collection ORDER by collection',[
return$this->connection->query('SELECT DISTINCT [collection] FROM {'.$this->connection->escapeTable($this->table).'} WHERE [collection] <> :collection ORDER by [collection]',[