fbudf functions make invalid blr
--------------------------------

                 Key: CORE-5504
                 URL: http://tracker.firebirdsql.org/browse/CORE-5504
             Project: Firebird Core
          Issue Type: Bug
          Components: UDF
    Affects Versions: 2.5.7
         Environment: Bug discover after update to 2.5.7.
All work fine until 2.5.5 :
the entry point module name has become case sensitive in FB2.5.7 ???
            Reporter: christophe derenne


With a fresh firebird-superserver 2.5.7 installation
create a new database
for example
/var/lib/firebird/data/test.fdb
with sqldialect 3, charset UTF-8

crate a very simple table :
create table tbtest (idtest integer not null);

Make some row (for exemple 10 rows from idtest=1 to idtest=10)

insert into tbtest (idtest)
values
(1);
insert into tbtest (idtest)
values
(2);
insert into tbtest (idtest)
values
(3);
insert into tbtest (idtest)
values
(4);
insert into tbtest (idtest)
values
(5);
insert into tbtest (idtest)
values
(6);
insert into tbtest (idtest)
values
(7);
insert into tbtest (idtest)
values
(8);
insert into tbtest (idtest)
values
(9);
insert into tbtest (idtest)
values
(10);

register a  fbudf function :
fo exemple :
declare external function ADDDAY
timestamp, int
returns timestamp
entry_point 'addday' module_name 'fbudf';

declare external function ADDDAY2
timestamp, int
returns timestamp
entry_point 'addDay' module_name 'fbudf';


Use thoses functions

select 100*a.idtest+10*b.idtest+c.idtest, addDay(cast('2001-01-01' as 
timestamp),100*a.idtest+10*b.idtest+c.idtest) from tbtest a
join tbtest b on 1=1 join tbtest c on 1=1;

result : 
invalid request BLR at offset 91
function ADDDAY is not defined
module name or entrypoint could not be found


select 100*a.idtest+10*b.idtest+c.idtest, addDay2(cast('2001-01-01' as 
timestamp),100*a.idtest+10*b.idtest+c.idtest) from tbtest a
join tbtest b on 1=1 join tbtest c on 1=1;

Result ok :

But both functions is working from FB1.5 to FB2.5

It seems that 
the entry point module name has become case sensitive in FB2.5.7

For old database with stored procedure or view depends on udf function, we 
cannot drop/create to correct the entry point 's caractere case.
Except create empty database with correct metadata and then insert data.




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to