Issue Details (XML | Word | Printable)

Key: CORE-6350
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Unassigned
Reporter: Anatoliy Schegolskiy
Votes: 1
Watchers: 5

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

gbak does not restore SP with plan, when -I switch used

Created: 02/Jul/20 10:35 AM   Updated: 08/Jul/20 02:55 PM
Component/s: GBAK
Affects Version/s: 3.0.6
Fix Version/s: None

Environment: FB 3.0.3, Windows Server 2008 R2 (Windows 10)
Issue Links:

QA Status: No test

 Description  « Hide
When gbak -I used in my DB, there is an error appears, see below. And restored database does not contain ANY stored procedures.

Error while parsing procedure HP_INSERT_FIOLIST's BLR.
index FIOLIST_NAME1 cannot be used in the specified plan.
there is no index FIOLIST_NAME3 for table FIOLIST.
unknown ISC error 336330835.

I suppose, the reason of this error is usage of PLAN clause in stored procedure queries. Procedure HP_INSERT_FIOLIST contains code below:

      select fl_id
      from fiolist
      where fl_name1 = :txt1 and
            fl_name2 = :txt2 and
            fl_name3 = :txt3
      PLAN (fiolist index (fiolist_name1, fiolist_name2, fiolist_name3))
      rows 1
      into :fl_id;

The proposal is to ignore saved query plan in the stored procedure source, when command line switches -I or -M used.
The warning message can be enough.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 06/Jul/20 04:36 AM