aboutsummaryrefslogtreecommitdiffstats
path: root/community/gvmd/fix-alpine-sql-syntax.patch
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-10-09 11:14:49 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-10-09 11:15:08 +0000
commit7cb01c0a740f2929d68ff09656336cc31669e649 (patch)
treea7dd9b7dad126ce017b4ae27681cfaa639a9f380 /community/gvmd/fix-alpine-sql-syntax.patch
parent51cf42c979ac2ceff213198f201112857b22b46b (diff)
downloadaports-7cb01c0a740f2929d68ff09656336cc31669e649.tar.bz2
aports-7cb01c0a740f2929d68ff09656336cc31669e649.tar.xz
community/gvmd: further fix for Error: sql_x_internal: sql_prepare failed
Patch: https://github.com/greenbone/gvmd/issues/473
Diffstat (limited to 'community/gvmd/fix-alpine-sql-syntax.patch')
-rw-r--r--community/gvmd/fix-alpine-sql-syntax.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/community/gvmd/fix-alpine-sql-syntax.patch b/community/gvmd/fix-alpine-sql-syntax.patch
index 1c37da0fc4..796c623192 100644
--- a/community/gvmd/fix-alpine-sql-syntax.patch
+++ b/community/gvmd/fix-alpine-sql-syntax.patch
@@ -21,3 +21,16 @@ index 1fc9582bb..c03e800b4 100644
" AND config_preferences.name != 'max_hosts'"
" UNION"
+diff --git a/src/manage_sql.c b/src/manage_sql.c
+index 99ee86f..3ce495c 100644
+--- a/src/manage_sql.c
++++ b/src/manage_sql.c
+@@ -28550,7 +28550,7 @@ report_port_count (report_t report)
+ {
+ return sql_int ("SELECT count (DISTINCT port) FROM results"
+ " WHERE report = %llu AND port != ''"
+- " AND port NOT %s 'general/%';",
++ " AND port NOT %s 'general/%%';",
+ report,
+ sql_ilike_op ());
+ }