Comment 3 for bug 1441932

Revision history for this message
Weishiun Tsai (wei-shiun-tsai) wrote :

Verified on the v0410 build installed on a workstation. This problem has been fixed:

>>create schema mytest;

--- SQL operation complete.
>>set schema mytest;

--- SQL operation complete.
>>
>>create library qaTmudfLib file '<mydir>/qaTmudfTest.so';

--- SQL operation complete.
>>
>>create table mytable1 (a decimal(9,2));

--- SQL operation complete.
>>create table mytable2 (a decimal(9,2) unsigned);

--- SQL operation complete.
>>insert into mytable1 values (17.17);

--- 1 row(s) inserted.
>>insert into mytable2 values (18.18);

--- 1 row(s) inserted.
>>select * from mytable1;

A
-----------

      17.17

--- 1 row(s) selected.
>>select * From mytable2;

A
----------

     18.18

--- 1 row(s) selected.
>>
>>create table_mapping function qaTmudfGeneral1()
+>returns (o1 decimal(9,2))
+>external name 'QA_TMUDF'
+>language cpp
+>library qaTmudfLib;

--- SQL operation complete.
>>
>>create table_mapping function qaTmudfGeneral2()
+>returns (o2 decimal(9,2) unsigned)
+>external name 'QA_TMUDF'
+>language cpp
+>library qaTmudfLib;

--- SQL operation complete.
>>
>>select * from UDF(qaTmudfGeneral1(TABLE(select * from mytable1)));

O1
-----------

      17.17

--- 1 row(s) selected.
>>select * from UDF(qaTmudfGeneral2(TABLE(select * from mytable2)));

O2
----------

     18.18

--- 1 row(s) selected.
>>
>>drop function qaTmudfGeneral1 cascade;

--- SQL operation complete.
>>drop function qaTmudfGeneral2 cascade;

--- SQL operation complete.
>>drop library qaTmudfLib cascade;

--- SQL operation complete.
>>drop schema mytest cascade;

--- SQL operation complete.
>>
>>exit;

End of MXCI Session