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
Select Starting with :Param (Empty string) doesn't work if using index with many fields [CORE1188] #1613
Comments
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @pcisarWorkflow: jira [ 11725 ] => Firebird [ 15411 ] |
Modified by: @dyemanovVersion: 2.5 RC2 [ 10372 ] Version: 2.5 RC1 [ 10362 ] Version: 3.0 Initial [ 10301 ] Version: 2.1.3 [ 10302 ] Version: 2.5 Beta 2 [ 10300 ] Version: 2.5 Beta 1 [ 10251 ] Version: 2.1.2 [ 10270 ] Version: 2.0.5 [ 10222 ] Version: 2.1.1 [ 10223 ] Version: 2.5 Alpha 1 [ 10224 ] Version: 2.0.4 [ 10211 ] Version: 2.1.0 [ 10041 ] Version: 2.0.3 [ 10200 ] Version: 2.0.2 [ 10130 ] Version: 2.0.0 [ 10091 ] Fix Version: 3.0 Alpha 1 [ 10331 ] Component: Engine [ 10000 ] |
Modified by: @asfernandes |
Modified by: @asfernandes |
Modified by: @asfernandes |
Modified by: @dyemanovstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @dyemanov The description looks incorrect to me. I see that the first query returns one row but the second one returns zero rows. Can anybody else confirm that? |
Commented by: @asfernandes Dmitry, that confirms my understanding of this bug and its description. Empty parameter plus indexed access triggers it, so bug "subject" is correct and description is not. |
Commented by: @dyemanov Thanks, this was my understanding as well. I just wanted to be sure I'm researching this bug and not another one ;-) |
Commented by: Evelyne Girard (evelyne) I made the correction so the description gives the accurate results (I unfortunately switched the first two results when I posted this issue at first). Sorry about that. |
Modified by: Evelyne Girard (evelyne)description: The following Select returns no row if we use a natural scan or if we pass directly the '' Value instead of using a parameter in Firebird 2.1 (Alpha) and 2.0 (It is OK in 1.5.3). create table TestX( select * from testx select * from testx select * from testx I wanted to reproduce this in ISQL but I couldn't find how to use parameters in ISQL (can we?) ... I had this problem in Delphi using FIBPlus components, PlanAnalyzer and also in IBExpert. Thank you Evelyne => The following Select returns no row if we use a natural scan or if we pass directly the '' Value instead of using a parameter in Firebird 2.1 (Alpha) and 2.0 (It is OK in 1.5.3). create table TestX( select * from testx select * from testx select * from testx I wanted to reproduce this in ISQL but I couldn't find how to use parameters in ISQL (can we?) ... I had this problem in Delphi using FIBPlus components, PlanAnalyzer and also in IBExpert. Thank you Evelyne |
Modified by: @dyemanovstatus: In Progress [ 3 ] => Open [ 1 ] |
Commented by: @asfernandes I see that compress is generating a pad byte for empty strings. What about this patch (for trunk)? ----------------------------------- - key->key_length = p + 1 - key->key_data; ----------------------------------- |
Modified by: @asfernandesassignee: Dmitry Yemanov [ dimitr ] => Adriano dos Santos Fernandes [ asfernandes ] status: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Evelyne Girard (evelyne)
Is related to CORE230
Is duplicated by CORE2232
Is related to CORE3052
Block progress on CORE3052
Is duplicated by CORE3452
Is related to QA506
Is duplicated by CORE3971
Votes: 3
The following Select returns no row if we use a natural scan or if we pass directly the '' Value instead of using a parameter in Firebird 2.1 (Alpha) and 2.0 (It is OK in 1.5.3).
create table TestX(
StringField1 varchar(10),
StringField2 varchar(10)
);
create index X_TestX_1_2 on Testx(StringField1,StringField2);
insert into testx values('A','B');
select * from testx
where stringfield1 ='A'
and stringfield2 starting with :Param
plan (testx natural);
Returns 1 row;
select * from testx
where stringfield1 ='A'
and stringfield2 starting with :Param
plan (testx index (x_testx_1_2));
returns 0 row;
select * from testx
where stringfield1 ='A'
and stringfield2 starting with ''
plan (testx natural);
Returns 1 row;
I wanted to reproduce this in ISQL but I couldn't find how to use parameters in ISQL (can we?) ... I had this problem in Delphi using FIBPlus components, PlanAnalyzer and also in IBExpert.
Thank you
Evelyne
Commits: c1c5d2b 57ddc9e FirebirdSQL/fbt-repository@a290acc
The text was updated successfully, but these errors were encountered: