Issue Details (XML | Word | Printable)

Key: CORE-5907
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

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

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

Created: 05/Sep/18 11:29 AM   Updated: 05/Oct/18 02:24 PM
Component/s: TRACEMGR
Affects Version/s: 4.0 Alpha 1, 3.0.3
Fix Version/s: 4.0 Beta 1, 3.0.5

QA Status: Done successfully


 Description  « Hide
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.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov made changes - 05/Sep/18 12:30 PM
Field Original Value New Value
Assignee Alexander Peshkov [ alexpeshkoff ]
Alexander Peshkov made changes - 23/Sep/18 05:07 PM
Fix Version/s 4.0 Beta 1 [ 10750 ]
Pavel Zotov made changes - 26/Sep/18 07:14 AM
Status Open [ 1 ] Open [ 1 ]
QA Status No test Done successfully
Alexander Peshkov made changes - 05/Oct/18 02:24 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0.5 [ 10885 ]
Resolution Fixed [ 1 ]