Subject Select Problem with Firebird 1.5.4870 Stabel Windows
Author rakete312004
Hello,

a simple select does not work in the stabel Frirebird 1.5.
select * from demo('')

All changes mentioned in the comments of demo should return the same,
but they don't.

See the comments in the script for workarounds.


Regards,
Sascha Michel


The SQL script.

/******************************************************************************/
/**** Generated 26.09.2006 17:10:37
****/
/******************************************************************************/

SET SQL DIALECT 3;

SET NAMES ISO8859_1;

CREATE DATABASE '192.168.47.128:C:\BS_DB\example.fdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 16384
DEFAULT CHARACTER SET ISO8859_1;

SET TERM ^ ;

CREATE PROCEDURE DEMO (
IP VARCHAR(10))
RETURNS (
ID INTEGER,
TEST2 VARCHAR(10))
AS
BEGIN
EXIT;
END^

SET TERM ; ^



CREATE TABLE "example" (
ID INTEGER NOT NULL,
TEST2 VARCHAR(10) COLLATE DE_DE
);



ALTER TABLE "example" ADD CONSTRAINT "PK_example" PRIMARY KEY (ID);

CREATE INDEX EXAMPLE_IDX1 ON "example" (TEST2);


SET TERM ^ ;

ALTER PROCEDURE DEMO (
IP VARCHAR(10))
RETURNS (
ID INTEGER,
TEST2 VARCHAR(10))
AS
begin
for select ID , TEST2 from "example"
where
-- Upper(TEST2) starting with :IP -- Returns ID=1 ; TEST2
= 55 this is O.K.
-- TEST2 starting with '' -- Returns ID=1 ; TEST2 = 55
this is O.K.
TEST2 starting with :IP -- Returns nothing -- why ?
When I drop the Index EXAMPLE_IDX1 it works

into :ID , :TEST2
do
suspend;
end
^


SET TERM ; ^

COMMIT;

INSERT INTO "example" (ID, TEST2) VALUES (1, '55');

COMMIT;