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
starting with doesn't work as expected [CORE290] #621
Comments
Commented by: Alice F. Bird (firebirds) Date: 2002-07-31 14:26 Sorry, I understand bug tracker is'nt place for search condition ... page 141 and <val> = { page 140. And if you want to treat as bug that engine WHERE <constant or expression> STARTING WITH <COLUMN wouldn't you be so kind to wait until FB will allow another Best regards, Alexander V.Nevsky. |
Commented by: Alice F. Bird (firebirds) Date: 2002-07-31 13:49 Of course it doesn't work as expected if you subvert the syntax of the language! The syntax for the STARTING WITH is WHERE <COLUMN IDENTIFIER> STARTING WITH <constant or expression> Nowhere (in standards or in documentation) is it suggested that you can capsize this predicate and get the If bug there be, it ought to be that the engine rejects a predicate of the form WHERE <constant or expression> STARTING WITH <COLUMN IDENTIFIER> That it fails to do so seems to be one more example of the sloppy parsing being done by DSQL. -- Helen |
Modified by: @dyemanovstatus: Closed [ 6 ] => Reopened [ 4 ] assignee: Dmitry Yemanov [ dimitr ] SF_ID: 589052 => |
Modified by: @dyemanovstatus: Reopened [ 4 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 1.5.0 [ 10025 ] SF_ID: 589052 => |
Commented by: @pcisar Reopened just to add attachment. |
Modified by: @pcisarstatus: Closed [ 6 ] => Reopened [ 4 ] SF_ID: 589052 => resolution: Fixed [ 1 ] => |
Commented by: @pcisar script to reproduce the bug |
Modified by: @pcisarAttachment: test.sql [ 10092 ] |
Modified by: @pcisarstatus: Reopened [ 4 ] => Closed [ 6 ] resolution: Fixed [ 1 ] SF_ID: 589052 => |
Modified by: @pcisarWorkflow: jira [ 10314 ] => Firebird [ 14527 ] |
Modified by: @pavel-zotovQA Status: No test |
Submitted by: aroman (aroman)
Attachments:
test.sql
SFID: 589052#
Submitted By: aroman
"Starting with" doesn't work as expected if a value is
used at the left side and a field at right side, if an index
on that field is used by the plan. It does work with a
natural plan.
Env: Windows 2000, firebird 1.0 Windows superserver
build (also reproduced with interbase 6.02 Windows
superserver)
CREATE TABLE "Test"
(
"Test_Field" VARCHAR(30) NOT NULL,
CONSTRAINT "PK_Test" PRIMARY KEY ("Test_Field")
);
/* populate it with some values */
insert into"Test"("Test_Field") values ('4');
insert into"Test"("Test_Field") values ('41');
insert into"Test"("Test_Field") values ('411');
/* this one doesn't work as expected - it goes through
index */
select "Test_Field" from "Test" where '411.1' starting
with "Test_Field";
/* this one works well, but because of cast - rtrim can be
used instead - uses plan(natural) */
select "Test_Field" from "Test" where '411.1' starting
with CAST("Test_Field" As VARCHAR(30));
The text was updated successfully, but these errors were encountered: