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 produces random results with [x-y] expressions [CORE2308] #2732

Closed
firebird-automations opened this issue Feb 6, 2009 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Is related to QA386

CREATE OR ALTER PROCEDURE PROC
RETURNS ( V INTEGER)
AS
BEGIN
IF ('b' SIMILAR TO ('[a-z]'))
THEN v = 1;
ELSE v = 2;
SUSPEND;
END

Run SELECT * FROM PROC few times - it will return 1 or 2 randomly

Or run following block :

EXECUTE BLOCK AS
DECLARE I INT = 1000;
DECLARE V INT;
BEGIN
WHILE (I > 0) DO
BEGIN
I = I - 1;
SELECT V FROM PROC INTO :V;

IF \(V <\> 1\)
THEN V = 1/0;

END
END

it may throw "integer divide by zero" exception

Not reproducible on DEBUG build !

Commits: 372fe94

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

summary: SIMILAR TO produced random results => SIMILAR TO produces random results with [x-y] expressions

environment: Reproduced in Windows only, but depends on how compiler optimizes expressions

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA386 [ QA386 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

QA test added.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test => Done successfully

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