Regression: can not launch trace if its 'database' section contains regexp 
pattern with curvy brackets to enclose quantifier 
-----------------------------------------------------------------------------------------------------------------------------

                 Key: CORE-5907
                 URL: http://tracker.firebirdsql.org/browse/CORE-5907
             Project: Firebird Core
          Issue Type: Bug
          Components: TRACEMGR
    Affects Versions: 3.0.3, 4.0 Alpha 1
            Reporter: Pavel Zotov


Suppose that you have several databases with names 'e25.fdb',  'e26.fdb', 
'e27.fdb', ...
If you want to trace activity in any of them it is reasonable do not enumerate 
all these names in the trace config; rather specify just pattern.

1) For 2.5 trace config will be like this:
<database (%[\\/](e[[:DIGIT:]]{2}).fdb)>
    enabled true
     . . .
</database> 

It is enough to launch ISQL and check whether we use correct pattern in 
<database> section:

echo set list on; select 1 from rdb$database where 
'C:\MIX\firebird\QA\fbt-repo\tmp\e25.fdb' similar to 
'%[\\/](e[[:DIGIT:]]{2}).fdb'; | C:\MIX\firebird\fb25\bin\isql /:employee

Output on 2.5.9.27115 will be: 1, i.e. all fine.

2) For 3.0+ we have to modify 'database' section and replace "< ... >" with 
"{... }" because of changed syntax, but the pattern will (and must) be the same:

database = (%[\\/](e[[:DIGIT:]]{2}).fdb)
{
  enabled = true
   . . .
}

But  this does not work. 
Trace log will be like this:
===
Trace session ID 1 started
Error creating trace session for database "":
Passed text: illegal line <database = (%[\\/](e[[:DIGIT:]]{2}).fdb)>
===

AFAIU, the problem relates to "{" and "}" that are used within pattern.
If we change 'database' section in such manner that no curvy brackets will be 
used than all again fine:

database = (%[\\/](e[[:DIGIT:]][[:DIGIT:]]).fdb) # this DOES work, no errors.
{
  . . . 
}


Checked on: WI-T4.0.0.1198 ; WI-V3.0.4.33045.


-- 
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

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to