Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

5.1.3 - 2025-09-01
- Add support for Sentinel password
- Security hardening

5.1.2 - 2025-07-07
- Textual changes
Expand Down
10 changes: 5 additions & 5 deletions Queue/Backend/MySQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function appendValuesToList($key, $values)
{
$table = $this->makePrefixedKeyListTableName($key);

$query = sprintf('INSERT INTO %s (`list_value`) VALUES (?)', $table);
$query = sprintf('INSERT INTO `%s` (`list_value`) VALUES (?)', $table);
foreach ($values as $value) {
if (empty($value)) {
continue;
Expand Down Expand Up @@ -143,7 +143,7 @@ public function getFirstXValuesFromList($key, $numValues)
}

$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('SELECT SQL_NO_CACHE list_value FROM %s ORDER BY idqueuelist ASC LIMIT %d OFFSET 0', $table, (int)$numValues);
$sql = sprintf('SELECT SQL_NO_CACHE list_value FROM `%s` ORDER BY idqueuelist ASC LIMIT %d OFFSET 0', $table, (int)$numValues);

try {
$values = Db::fetchAll($sql);
Expand Down Expand Up @@ -172,7 +172,7 @@ public function hasAtLeastXRequestsQueued($key, $numValuesRequired)
}

$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('SELECT SQL_NO_CACHE idqueuelist FROM %s LIMIT %d', $table, (int)$numValuesRequired);
$sql = sprintf('SELECT SQL_NO_CACHE idqueuelist FROM `%s` LIMIT %d', $table, (int)$numValuesRequired);

try {
$values = Db::fetchAll($sql);
Expand All @@ -194,7 +194,7 @@ public function removeFirstXValuesFromList($key, $numValues)
}

$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('DELETE FROM %s ORDER BY idqueuelist ASC LIMIT %d', $table, (int)$numValues);
$sql = sprintf('DELETE FROM `%s` ORDER BY idqueuelist ASC LIMIT %d', $table, (int)$numValues);

try {
Db::query($sql);
Expand All @@ -210,7 +210,7 @@ public function removeFirstXValuesFromList($key, $numValues)
public function getNumValuesInList($key)
{
$table = $this->makePrefixedKeyListTableName($key);
$sql = sprintf('SELECT SQL_NO_CACHE max(idqueuelist) - min(idqueuelist) as num_entries FROM %s', $table);
$sql = sprintf('SELECT SQL_NO_CACHE max(idqueuelist) - min(idqueuelist) as num_entries FROM `%s`', $table);
try {
$value = Db::fetchOne($sql);
if ($value === null || $value === false) {
Expand Down