The Shadow Count Seems Wrong
It appears that adding and/or dropping shadow files from a database is not always reported by gstat when it produces a database report.
tux> # Use gstat to display shadow details
tux> gstat employee -h|grep -i sh[a]dow
Shadow count 0
tux> isql employee
Database: employee
SQL> SHOW DATABASE;
Database: employee
Owner: SYSDBA
Shadow 1: "/u00/firebird/databases/employee.shd1" auto
...
Straight away, it is obvious that the report from gstat is incorrect as the employee database has one shadow file.If we use isql to add a new shadow file to this database, as shown below, gstat still insists that there are no shadows.
SQL> CREATE SHADOW 7 AUTO '/u00/firebird/databases/employee.shd7';
SQL> SHOW DATABASE;
Database: employee
Owner: SYSDBA
Shadow 1: "/u00/firebird/databases/employee.shd1" auto
Shadow 7: "/u00/firebird/databases/employee.shd7" auto
...
SQL> shell;
tux> gstat employee -h | grep -i sh[a]dow
Shadow count 0