Skip to content
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

SIMILAR TO works wrongly [CORE3754] #4098

Closed
firebird-automations opened this issue Feb 6, 2012 · 7 comments
Closed

SIMILAR TO works wrongly [CORE3754] #4098

firebird-automations opened this issue Feb 6, 2012 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Artem Kudlaenko (avk)

Is related to QA573

1. Next SIMILAR TO queries return 'false':

SELECT CASE WHEN '1' SIMILAR TO '(1|2){0,}' ESCAPE '\' THEN 'true' else 'false' end
FROM RDB$DATABASE;

SELECT CASE WHEN '1' SIMILAR TO '(1|2){0,1}' ESCAPE '\' THEN 'true' else 'false' end
FROM RDB$DATABASE;

But this query return 'true':

SELECT CASE WHEN '1' SIMILAR TO '(1|2){1}' ESCAPE '\' THEN 'true' else 'false' end
FROM RDB$DATABASE;

2. Next SIMILAR TO query return 'false':

SELECT CASE WHEN '123' SIMILAR TO '(1|12[3]?){1}' ESCAPE '\' THEN 'true' else 'false' end
FROM RDB$DATABASE;

But this query return 'true':

SELECT CASE WHEN '123' SIMILAR TO '(1|12[3]?)+' ESCAPE '\' THEN 'true' else 'false' end
FROM RDB$DATABASE;

Commits: 6820b50

====== Test Details ======

See also test for CORE2006 and samples in core-4740
See also (in russian): http://sql.ru/forum/actualutils.aspx?action=gotomsg&tid=1026749&msg=14380584

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA573 [ QA573 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

Test Details: See also test for CORE2006
See also (in russian): http://sql.ru/forum/actualutils.aspx?action=gotomsg&tid=1026749&msg=14380584

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

Test Details: See also test for CORE2006
See also (in russian): http://sql.ru/forum/actualutils.aspx?action=gotomsg&tid=1026749&msg=14380584

=>

See also test for CORE2006 and samples in core-4740
See also (in russian): http://sql.ru/forum/actualutils.aspx?action=gotomsg&tid=1026749&msg=14380584

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Test created.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants