mirror of
https://github.com/DependencyTrack/dependency-track.git
synced 2025-10-19 16:03:19 +00:00
improve vulnerablesoftware cpe normalization performance
Signed-off-by: Steffen Ohrendorf <steffen.ohrendorf@gmx.de>
This commit is contained in:
parent
61a4cf9096
commit
8e8691c1fa
1 changed files with 7 additions and 1 deletions
|
@ -43,7 +43,13 @@ public class v4135Updater extends AbstractUpgradeItem {
|
|||
try (final Statement statement = connection.createStatement()) {
|
||||
LOGGER.info("Normalizing \"VULNERABLESOFTWARE\" CPE columns");
|
||||
statement.execute(/* language=SQL */ """
|
||||
UPDATE "VULNERABLESOFTWARE" SET "PART" = LOWER("PART"), "VENDOR" = LOWER("VENDOR"), "PRODUCT" = LOWER("PRODUCT")
|
||||
UPDATE "VULNERABLESOFTWARE"
|
||||
SET "PART" = LOWER("PART"),
|
||||
"VENDOR" = LOWER("VENDOR"),
|
||||
"PRODUCT" = LOWER("PRODUCT")
|
||||
WHERE "PART" <> LOWER("PART")
|
||||
OR "VENDOR" <> LOWER("VENDOR")
|
||||
OR "PRODUCT" <> LOWER("PRODUCT")
|
||||
""");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue