Issue Details (XML | Word | Printable)

Key: DOC-118
Type: Bug Bug
Status: Open Open
Priority: Trivial Trivial
Assignee: Paul Vinkenoog
Reporter: Pavel Zotov
Votes: 0
Watchers: 0
Operations

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

Correct documentation: closing curly brace ( "}" ) need to be added to the list of special characters in SIMILAR TO (because it also need to be escaped).

Created: 25/Dec/15 05:39 PM   Updated: 25/Dec/15 05:39 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
From SIMILAR TO documentation:
===
<special character> ::= any of the characters []()|^-+*%_?{
===

Here we can see that list finished with opening curly brace. But *closing* "}" also need to be escaped.
Sample:

C:\MIX\firebird\OLTPTEST>isql /3333:"C:\MIX\firebird\OLTPTEST\OLTP30{smaLL}.FDB"
Database: /3333:C:\MIX\firebird\OLTPTEST\OLTP30{smaLL}.FDB, User: SYSDBA
SQL> set list on;
SQL> select mon$database_name from mon$database;

MON$DATABASE_NAME

===============================================================================
C:\MIX\FIREBIRD\OLTPTEST\OLTP30{SMALL}.FDB


SQL> set list on; select 1 from mon$database where mon$database_name similar to '%[\\/](OLTP30\{SMALL\}).FDB' escape '\'; ----- has '\' before "}"

CONSTANT 1

SQL> set list on; select 1 from mon$database where mon$database_name similar to '%[\\/](OLTP30\{SMALL}).FDB' escape '\'; ----- hasn't '\' before '}'

Statement failed, SQLSTATE = 42000
Invalid SIMILAR TO pattern

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