forked from Qortal-Forker/qortal
Fixed case sensitivity issue when updating status in the cache.
This commit is contained in:
@@ -886,10 +886,10 @@ public class HSQLDBArbitraryRepository implements ArbitraryRepository {
|
|||||||
if (status == null) {
|
if (status == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String updateSql = "UPDATE ArbitraryResourcesCache SET status = ? WHERE service = ? AND name = ? AND identifier = ?";
|
String updateSql = "UPDATE ArbitraryResourcesCache SET status = ? WHERE service = ? AND LCASE(name) = ? AND LCASE(identifier) = ?";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.repository.executeCheckedUpdate(updateSql, status.value, arbitraryResourceData.service.value, arbitraryResourceData.name, arbitraryResourceData.identifier);
|
this.repository.executeCheckedUpdate(updateSql, status.value, arbitraryResourceData.service.value, arbitraryResourceData.name.toLowerCase(), arbitraryResourceData.identifier.toLowerCase());
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new DataException("Unable to set status for arbitrary resource", e);
|
throw new DataException("Unable to set status for arbitrary resource", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user