bug with variables, link & stored procedures ?

Ivan Smahin ivan_smahin at paradigmasoft.com
Thu Mar 27 10:24:47 CDT 2008


Hello Steven,

Thursday, March 27, 2008, 4:11:45 PM, you wrote:

> Some more info, with an other example, same kind of problems :

> -----------
> CREATE OR REPLACE PROCEDURE [sp_login_gebruiker]( IN inId LONG )
> BEGIN
>         print 'curtime() :';
>         print (select curtime());
>         update gebruikers
>         set
>                 ingelogd = TRUE,
>                 login_datum = (select curdate()),
>                 login_tijd = (select curtime())         
>         where id = inId;
>         
> END
> -----------
> After 3 logins with several seconds in between  : in the warning log file:
> ---
> Print : curtime() :
> Print : 15:06:13:773
> Print : curtime() :
> Print : 15:06:13:773
> Print : curtime() :
> Print : 15:06:13:773
> ---

Yes - I see it. Please, report it to mantis.

Unfortunately it seems there is no simple workaround because of inability of taking
variable into "link record" command prevent variable usage here.
Other way is subquery - but it wrongfully decide to return "cached from the first call"
value.

The possible workaround is to use something like temporary table
until both bugs are fixed.

Something like this:

          .....
          update tmp_table f1 = var where recID = 1;
          link records (select f1 from tmp_table where recID = 1 )...
          ......


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list