Issue Details (XML | Word | Printable)

Key: CORE-5467
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

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

fb_lock_print which is querying DB without attachments: 1) send to STDLOG (instead STDERR) one line of message; 2) ignores errorlevel env. variable

Created: 22/Jan/17 09:26 PM   Updated: 23/Jan/17 12:57 PM
Component/s: LOCK_PRINT
Affects Version/s: 4.0 Initial, 2.5.6, 3.0.1
Fix Version/s: None

QA Status: No test


 Description  « Hide
Choose some database _without_ attachments.
Then run following batch on 2.5.7, 3.0.2 and 4.0.0 (correct 'fbc' and 'dbnm' variables to be appropriate to your env.):

===
    @echo off
    setlocal enabledelayedexpansion enableextensions

    set fbc=C:\FB\30sC
    set dbnm=C:\FBTESTING\qa\fbt-repo\tmp\E30.fdb

    !fbc!\fb_lock_print -c -a -d !dbnm! 1>log 2>err

    for /f "tokens=*" %%a in ('type log') do (
      echo STDLOG: %%a
    )
    for /f "tokens=*" %%a in ('type err') do (
      echo STDERR: %%a
    )


    !fbc!\fb_lock_print -c -a !dbnm! 1>nul 2>&1
    if errorlevel 1 (
      echo We have a trouble...
    ) else (
      echo WAW... All fine, NO errors occured...
    )

    for /d %%i in (log,err) do del %%i 2>nul
===

On 3.0.2 and 4.0 you will see:

STDLOG: Unable to access lock table.
STDERR: File for memory mapping is empty.
WAW... All fine, NO errors occured...

On 2.5.7:

STDLOG: Unable to access lock table.
STDERR: operating system directive CreateFileMapping failed
STDERR: <.... localized message about volume for open file, see below ...> --- [1]
WAW... All fine, NO errors occured...

[1]: this is strange line with following text:
cyrillic: -Том для открытого файла был изменен извне, поэтому работа с этим файлом невозможна.
ascii: ~"Volume for the open file was changed externally, so work with this file is not possible."


IMO, output should be:
===
   STDERR: Unable to access lock table.
   STDERR: File for memory mapping is empty.
   We have a trouble...
===


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.