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

Wrong results (internal wrapping occured) for the multi-byte blob SUBSTRING function and its boundary arguments [CORE3335] #3701

Closed
firebird-automations opened this issue Feb 4, 2011 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @dyemanov

Is related to QA287

select substring(cast('abcdef' as blob sub_type text character set utf8)
from 1 for 2147483647) from rdb$database;
-- 'abcdef'

select substring(cast('abcdef' as blob sub_type text character set utf8)
from 2 for 2147483647) from rdb$database;
-- ''

select substring(cast('abcdef' as blob sub_type text character set utf8)
from 3 for 2147483647) from rdb$database;
-- 'cd'

select substring(cast('abcdef' as blob sub_type text character set utf8)
from 3 for 2147483646) from rdb$database;
-- ''

i.e. the problem occurs when (offset + length) overflows the 32-bit signed value.

Commits: 4a1dc69 8f538f4 3652f11

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 2.1.5 [ 10420 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA287 [ QA287 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

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