GFIX  -online: message "IProvider::attachDatabase failed when loading mapping 
cache" appears in Classic (only) if access uses remote protocol
---------------------------------------------------------------------------------------------------------------------------------------------

                 Key: CORE-4899
                 URL: http://tracker.firebirdsql.org/browse/CORE-4899
             Project: Firebird Core
          Issue Type: Bug
          Components: GFIX
    Affects Versions: 3.0 RC 1
            Reporter: Pavel Zotov


Following batch:
0) reads argument %1, which can be:
*** SS_30 -- if we check 3.0 SuperServer
**  SC_30 -- for 3.0 SuperClassic
** CS_30 --for pure 3.0 Classic server
(default value = 'SS_30' -- SuperServer)
1) creates database with name derived from this batch own name + suffix, using 
appropriate FB instance (SS/SC/CS)
2) moves this database to full shutdown
3) attempts to return database to online state using REMOTE access
4) moves database again to offline
5) attempts to return database to online state using LOCAL access

Also, after on each step it gathers info from database header and extract from 
it only two lines - with database name and its attributes.

Text:

=== begin of batch `shutdown-online.bat` ===
@echo off

setlocal

@rem remove any occurrence of FB home from path:
set path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM

set fbarch=%1
if .%1.==.. set fbarch=SS_30

if /i .%fbarch%.==.SS_30. (
  set fbhome=C:\1INSTALL\FIREBIRD\fb30sS
  set fbport=3333
)
if /i .%fbarch%.==.CS_30. (
  set fbhome=C:\1INSTALL\FIREBIRD\fb30Cs
   set fbport=3329
)
if /i .%fbarch%.==.SC_30. (
  set fbhome=C:\1INSTALL\FIREBIRD\fb30Sc
  set fbport=3330
)

set dbpath=%~dp0
set dbname=%~n0.fdb.tmp

del %dbpath%%dbname% 2>nul
echo create database 'localhost/%fbport%:%dbpath%%dbname%' user 'SYSDBA' 
password 'masterkey'; show version; | %fbhome%\isql -q
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password 
masterkey | findstr /i "%dbname% attributes"


@rem --------------------------------------------------------

@echo on
%fbhome%\gfix localhost/%fbport%:%dbpath%%dbname% -user SYSDBA -password 
masterkey -shut full -force 0
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password 
masterkey | findstr /i "%dbname% attributes"
@echo off

@rem --------------------------------------------------------

@echo on
@echo.
@echo Return to ONLINE - attempt to use remote access:
%fbhome%\gfix localhost/%fbport%:%dbpath%%dbname% -user SYSDBA -password 
masterkey -online
@echo off
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password 
masterkey | findstr /i "%dbname% attributes"

@rem --------------------------------------------------------

@echo.
@echo Again move in shutdown mode.
%fbhome%\gfix localhost/%fbport%:%dbpath%%dbname% -user SYSDBA -password 
masterkey -shut full -force 0 1>nul 2>&1
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password 
masterkey | findstr /i "%dbname% attributes"

@rem --------------------------------------------------------
@echo on
@echo.
@echo Return to ONLINE - attempt to use local access:
%fbhome%\gfix %dbpath%%dbname% -user SYSDBA -password masterkey -online
@echo off
%fbhome%\gstat localhost/%fbport%:%dbpath%%dbname% -h -user SYSDBA -password 
masterkey | findstr /i "%dbname% attributes"

del %dbpath%%dbname% 2>nul
=== end of batch `shutdown-online.bat` ===

All three architectures were checked on WI-V3.0.0.31981.

Result for SS_30:
##############

Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gfix 
localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user 
SYSDBA -passwo
rd masterkey -shut full -force 0

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gstat 
localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -h -user 
SYSDBA -pa
ssword masterkey   | findstr /i "shutdown-online.fdb.tmp attributes"
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write, full shutdown

Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gfix 
localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user 
SYSDBA -passwo
rd masterkey -online
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write

Again move in shutdown mode.
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write, full shutdown

Return to ONLINE - attempt to use local access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30sS\gfix 
C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -password 
masterkey -o
nline
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write


(i.e. all fine - the're no errors occur)


Result for SC_30:
##############

Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gfix 
localhost/3330:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user 
SYSDBA -passwo
rd masterkey -shut full -force 0

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gstat 
localhost/3330:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -h -user 
SYSDBA -pa
ssword masterkey   | findstr /i "shutdown-online.fdb.tmp attributes"
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write, full shutdown

Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gfix 
localhost/3330:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user 
SYSDBA -passwo
rd masterkey -online
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write

Again move in shutdown mode.
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write, full shutdown

Return to ONLINE - attempt to use local access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Sc\gfix 
C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -password 
masterkey -o
nline
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write

(also all fine, no errors)


Result for CS_30:
##############

Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix 
localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user 
SYSDBA -passwo
rd masterkey -shut full -force 0

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gstat 
localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -h -user 
SYSDBA -pa
ssword masterkey   | findstr /i "shutdown-online.fdb.tmp attributes"
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write, full shutdown

Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix 
localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user 
SYSDBA -passwo
rd masterkey -online
database C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP shutdown
-IProvider::attachDatabase failed when loading mapping cache
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write, full shutdown

Again move in shutdown mode.
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write, full shutdown

Return to ONLINE - attempt to use local access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix 
C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user SYSDBA -password 
masterkey -o
nline
Database "C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP"
        Attributes              force write


Messages in Classic differ from other two architectures here:
. . .
Return to ONLINE - attempt to use remote access:

C:\FBTESTING\qa\fbt-repo\tmp>C:\1INSTALL\FIREBIRD\fb30Cs\gfix 
localhost/3329:C:\FBTESTING\qa\fbt-repo\tmp\shutdown-online.fdb.tmp -user 
SYSDBA -passwo
rd masterkey -online
database C:\FBTESTING\QA\FBT-REPO\TMP\SHUTDOWN-ONLINE.FDB.TMP shutdown
-IProvider::attachDatabase failed when loading mapping cache
. . .

PS. I have no guess what is correct in above text: maybe it is Classic behave 
like it was intended  and SS & SC are wrong ?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to