Comments (3)
The problem raised with sqlite >= 3.25.0
Starting with sqlite-3.25.0 ALTER TABLE ... RENAME TO ...
also rename dependent views
From sqlite Changelog:
2018-09-15 (3.25.0)
2.b. Fix table rename feature so that it also updates references to the renamed table in triggers and views.
https://sqlite.org/changes.html#version_3_25_0
Openvas migrate code:
migrate_172_to_173()
"ALTER TABLE nvts RENAME TO nvts_172;"
...
"DROP TABLE nvts_172;"
It works well with older sqlite versions but it breaks results_autofp view with recent sqlite
Workaround:
recreate results_autofp view with correct table name reference:
(echo "DROP VIEW results_autofp;"; sqlite3 /var/lib/openvas/mgr/tasks.db '.schema results_autofp' | sed 's/nvts_172/nvts/g') | sqlite3 /var/lib/openvas/mgr/tasks.db
from gvmd.
Built latest stable version from source (e.g. latest OpenVAS Manager 7.0.3, etc.).
--> Migration works fine there.
Not sure, what's wrong with the Debian binary distribution.
--> Issue can be closed.
from gvmd.
The problem raised with sqlite >= 3.25.0
Starting with sqlite-3.25.0
ALTER TABLE ... RENAME TO ...
also rename dependent viewsFrom sqlite Changelog:
2018-09-15 (3.25.0)
2.b. Fix table rename feature so that it also updates references to the renamed table in triggers and views.
https://sqlite.org/changes.html#version_3_25_0Openvas migrate code:
migrate_172_to_173() "ALTER TABLE nvts RENAME TO nvts_172;" ... "DROP TABLE nvts_172;"
It works well with older sqlite versions but it breaks results_autofp view with recent sqlite
Workaround:
recreate results_autofp view with correct table name reference:
(echo "DROP VIEW results_autofp;"; sqlite3 /var/lib/openvas/mgr/tasks.db '.schema results_autofp' | sed 's/nvts_172/nvts/g') | sqlite3 /var/lib/openvas/mgr/tasks.db
Perhaps I'm just a total newb, but how do I use the workaround? Is this to be used in bash or after logging in to sqlite3 or somewhere else? I'm having this problem in Ubuntu 20.04. I just upgraded from 18.04. I tried removing the package and reinstalling, but that didn't help. This seems to be the only answer available to me. I would appreciate any help you might offer.
from gvmd.
Related Issues (20)
- schedules - date/time problems HOT 4
- Scans with custom nth day of month schedule fail at 0% when manually started HOT 4
- Stale global_current_report causes subsequent gvmd requests to fail HOT 2
- gvmd failed to save scan results in the new DB versions from 252 HOT 1
- Upgrader la version de gvm de 22.4.0 à 22.4.1 HOT 1
- sql_exec_internal failed in check_osp_result_exists() HOT 2
- gvmd fail to compile HOT 5
- gvmd@gvmd FATAL: remaining connection slots are reserved for non-replication superuser connections HOT 19
- Scan exits after one second and no result ouput HOT 2
- Support passing max-email-attachment-size parameter through docker-compose.yml file
- gvmd --delete-scanner does not remove tasks.
- CPE with wildcard not being matched HOT 1
- CentOS creates 0-byte PDF report HOT 3
- Email Alert message with `attach report` option does not allow use of $i for full report text HOT 1
- Get Errors when try to 'make' HOT 5
- gvmd randomly segfaults when viewing e.g. scan results hosts tab in gsa
- Http Alerts don't work HOT 2
- Gvmd creates a pidfile not owned by root
- `free(): invalid pointer` / `corrupted size vs. prev_size` when starting up gvmd HOT 1
- gvm-setup fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gvmd.