rusanov wrote :
>
>I update my database from 7.5.00.23 to 7.6.00.10
>
>I have problem with my function LAB.getAtomId,
>
>I call function and I have error Numeric value out of range;-3019
>POS(1) Invalid exponent
>
>if I call select LAB.getAtomId('laboratory') from DUAL function succeed
>
>why ? in version 7.5.00.23 it worked.
>
>CALL LAB.add_event2
>( 'info'
>, 'add_laboratory'
>, 'N/A'
>, '11'
>, LAB.getAtomId('laboratory')
>, 11
>)
>
>if I call
>
>CALL LAB.add_event2
>( 'info'
>, 'add_laboratory'
>, 'N/A'
>, '11'
>, 1
>, 11
>)
>
>call succeed.
>
>my function
>
>CREATE FUNCTION LAB.getAtomId
> ( name VARCHAR
> )
>
>RETURNS INT AS
>
>TRY
>
> IF name = 'test' THEN
> RETURN 1;
>
> IF name = 'technique' THEN
> RETURN 2;
>
> IF name = 'reagent' THEN
> RETURN 3;
>
> IF name = 'producer' THEN
> RETURN 4;
>
> IF name = 'laboratory' THEN
> RETURN 5;
>
> IF name = 'device' THEN
> RETURN 6;
>
> IF name = 'unit' THEN
> RETURN 7;
>
> IF name = 'lot' THEN
> RETURN 8;
>
> IF name = 'service' THEN
> RETURN 9;
>
> IF name = 'profile' THEN
> RETURN 10;
>
> IF name = 'patient' THEN
> RETURN 11;
>
> IF name = 'scheduled_profile' THEN
> RETURN 12;
>
> IF name = 'scheduled_test' THEN
> RETURN 13;
>
> IF name = 'device_instance' THEN
> RETURN 14;
>
> RETURN NULL;
>
>CATCH
> STOP ($rc, $errmsg);
>
>CREATE DBPROC LAB.add_event2
> ( IN type VARCHAR(10)
> , IN event VARCHAR(50)
> , IN source VARCHAR(50)
> , IN comment VARCHAR(2000)
>
> , IN atom INT
> , IN obj INT
> )
>
>AS
>
>VAR node VARCHAR(50);
>SET node = 'N/A';
>
>BEGIN
>
> TRY
> SELECT APPLNODEID
> FROM SYSDBA.TRANSACTIONS T, DOMAIN.CONNECTPARAMETERS C
> WHERE T.SESSION = C.SESSION;
>
> FETCH INTO :node;
> CATCH
> IF $rc <> 100 THEN STOP($rc, $errmsg);
>
> TRY
> INSERT LAB.eventlog
> ( source
> , type
> , event
> , event_user
> , computer
> , event_time
> , comment
> , atom
> , obj_id
> )
> VALUES
> ( :source
> , :type
> , :event
> , USER
> , :node
> , timestamp
> , :comment
> , :atom
> , :obj
> );
> CATCH
> STOP($rc, $errmsg);
>END;
>
>
>--
>MaxDB Discussion Mailing List
>For list archives: http://lists.mysql.com/maxdb
>To unsubscribe:
>http://lists.mysql.com/[EMAIL PROTECTED]
>
>
There's a bug in the code of the call statement, which may produce such
errors, if call parameters are value expressions. In your case this
value expression is the call of function getAtomId.
We will fix this bug as soon as possible.
Best Regards,
Thomas
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]