SIMILAR TO with quantifier {n,} in the pattern: 1) fails on 2.5 ("Invalid pattern"), 2) strange result in 3.0 --------------------------------------------------------------------------------------------------------------
Key: CORE-4740 URL: http://tracker.firebirdsql.org/browse/CORE-4740 Project: Firebird Core Issue Type: Bug Reporter: Pavel Zotov case-1: select iif( 'abcZ' similar to '[[:lower:]]{1,}Z', 1, 0) result from rdb$database; -- NB: letter 'Z' - in upper case case-2: select iif( 'abcz' similar to '[[:lower:]]{1,}z', 1, 0) result from rdb$database; -- NB: letter 'Z' - in lower case, as all preceding ones Result in WI-V2.5.4.26857 for both cases: === Statement failed, SQLSTATE = 42000 Invalid SIMILAR TO pattern === Result in WI-T3.0.0.31780: SQL> select iif( 'abcZ' similar to '[[:lower:]]{1,}Z', 1, 0) result from rdb$database; RESULT ============ 1 SQL> select iif( 'abcz' similar to '[[:lower:]]{1,}z', 1, 0) result from rdb$database; RESULT ============ 0 Why second matching fails if we have three letters in lowercase left side from 'z' ? If SIMILAR-engine count characters upto final one ('z') when it encounteres {1,} than why it does NOT so in the following cases (and these are also seems "invalid" for 2.5 as above): SQL> select iif( 'abcz' similar to '[[:lower:]]*z', 1, 0) result from rdb$database; RESULT ============ 1 SQL> select iif( 'abcz' similar to '[[:lower:]]+z', 1, 0) result from rdb$database; RESULT ============ 1 -- ? -- 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 ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel