New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: can not launch trace if its 'database' section contains regexp pattern with curvy brackets to enclose quantifier [CORE5907] #6165
Comments
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff It's impossible tor restore 1to1 2.5 behavior - "{" and "}" have special meaning since fb3. Therefore added special rule - to enter that symbols type them twice, i.e. "{{" and "}}". Line from the sample will look like: |
Modified by: @AlexPeshkoffFix Version: 4.0 Beta 1 [ 10750 ] |
Commented by: @pavel-zotov What about database with exotic name, e.g. {e25}.fdb ? (i.e. curvy brackets are part of this name) In 2.5 following pattern will work for such names: <database (%[\\/](e\{[[:DIGIT:]]{2}\}).fdb)> How should this pattern look in 3.0 ? |
Commented by: @AlexPeshkoff No, it will not work for {e25}.fdb, only for e{25}.fdb. And for HEAD that pattern is: |
Commented by: @hvlad Will be good to have it noted at fbtrace.conf |
Commented by: @pavel-zotov > And for HEAD that pattern is: Unfortunately, it does not work (checked on WI-T4.0.0.1224 F, build of 25.09.2018). Test is trivial: i just copy string that you've provided to trace config:database = (%[\\/](e\{{[[:DIGIT:]]{{2}}\}}).fdb)
|
Commented by: @pavel-zotov BTW, quote from doc ( https://firebirdsql.org/refdocs/langrefupd25-similar-to.html ):Building regular expressions Within regular expressions, most characters represent themselves. The only exceptions are the special characters below:
...and the escape character, if it is defined.Where is CLOSING curvy bracket, "}", in this list ? |
Commented by: @pavel-zotov > Unfortunately, it does not work (checked on WI-T4.0.0.1224 F, build of 25.09.2018). Sorry for noise... It DOES work on WI-T4.0.0.1224, i did mistake related to multiple instances of FB installed on my machine. |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0.5 [ 10885 ] |
Submitted by: @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.
Commits: c285c28 3239c9a 60f32c3
The text was updated successfully, but these errors were encountered: