Issue Details (XML | Word | Printable)

Key: CORE-2914
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Dmitry Yemanov
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

Server crashes while restoring a database having an expression index referencing a non-existent UDF

Created: 09/Mar/10 04:29 PM   Updated: 27/May/15 06:32 PM
Component/s: Engine
Affects Version/s: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.0.4, 2.5 Alpha 1, 2.1.1, 2.0.5, 2.1.2, 2.5 Beta 1, 2.5 Beta 2, 2.1.3, 3.0 Initial, 2.5 RC1, 2.5 RC2
Fix Version/s: 2.5 RC3, 2.1.4, 3.0 Alpha 1

QA Status: Not enough information
Test Details:
Log of fbt_run:
ERROR: bugs.core_2914
Database restore
Unexpected stderr stream received from GBAK.
-- looks like the database can`t be restored.

But this message happens ONLY inside fbt_run, because gbak itself DOES finish of restoring process!
gbak.exe -rep core2914-ods12.fbk host/port:path\tmp2914.fdb -v 1>log 2>err

-- produces file `err'` with ZERO size (empty) and `log`with mesages:
. . .
gbak: restoring privilege for user SYSDBA
gbak:creating indexes
gbak: activating and creating deferred index TEST_X_REVERSE
gbak:cannot commit index TEST_X_REVERSE
gbak: ERROR:function ID_REVERSE is not defined
gbak: ERROR: module name or entrypoint could not be found
gbak: ERROR: function ID_REVERSE is not defined
gbak: ERROR: module name or entrypoint could not be found
gbak:committing metadata
gbak:fixing views dbkey length
gbak:updating ownership of packages, procedures and tables
gbak:adding missing privileges
gbak:fixing system generators
gbak:finishing, closing, and going home <<<<<<<<<<<<<<<<<<<<<<<<<<<<< !! OK !! <<<<<<<<<<<<<<<<<
gbak:adjusting the ONLINE and FORCED WRITES flags

Wait for reply from dimitr on letter about problem with restoring .fbk under fbt-run, date: 14-may-2015 22:41.

 Description  « Hide
In the past, the engine has been made "smart enough" to not interrupt the restore process if some UDF library is missing. Instead, GBAK prints a warning and the process continues. But if some expression index references the missing UDF, the engine crashes while trying to call that UDF while creating the index.

We could throw an error and terminate the restore process in this case. Another alternative would be to restore such an index as inactive, with an appropriate message printed into stderr.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Andrei Kireev added a comment - 09/Mar/10 04:37 PM
I would vote for second option.