Issues

Select view

Select search mode

 
50 of 114

Database update reports success without checking

Description

After executing database scripts, SchemaManager will report success without checking if the end state of the database is correct.

Upon most errors, SchemaManager will report failure, except when it doesn’t find update script files (the code seems to assume that no update is needed for that particular version). This can lead to scenarios in which no scripts are executed, but success is reported nonetheless.

Openfire should check, after running the database scripts, if the installed version matches the expected version.

Environment

None

Details

Assignee

Reporter

Components

Priority

Created March 20, 2025 at 8:18 PM
Updated March 20, 2025 at 8:41 PM

Activity

Show:

Daryl HerzmannMarch 20, 2025 at 8:41 PM

I read now that executeSQLScript parses the scripts, breaking them at the semi-colon and then runs each as a statement, which should address my concern.

Guus der KinderenMarch 20, 2025 at 8:32 PM

I don’t think that this is caused by the driver: it seems to be our implementation that checks for update scripts, that silently ignores missing update scripts.

Daryl HerzmannMarch 20, 2025 at 8:23 PM

I have seen this situation when running free-form SQL files through a database driver. The default behavior is to not have errors be FATAL. For example, the psql client needs ON_ERROR_STOP=1 set to actually error out when a SQL statement fails. FWIW.

Flag notifications