UDF: UDF with 33 parameters cores tdm_udrserv in ../udrserv/UdrFFDC.cpp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
High
|
Suresh Subbiah |
Bug Description
UDF only allows a maximum of 32 parameters (input+output). The following example defined a UDF with 33 parameters (32 input + 1 output). At the execution time, it did return a message 'LM Assertion: Parameters more than 32 are not allowed.
at FILE: ../langman/
This is seen on the v0210 build installed on a workstation.
To reproduce this problem:
(1) Download the attached tar file and untar it to get the 4 files in there. Put the 4 files in any directory <mydir>
(2) Run build.sh from <mydir> to build the UDF so file.
(3) Change the line ‘create library qa_udf_lib file '<mydir>/myudf.so'; in mytest.sql and fill in <mydir>
(4) From sqlci, obey mytest.sql
-------
Here is the execution output:
>>obey mytest.sql;
>>create schema mytest;
--- SQL operation complete.
>>set schema mytest;
--- SQL operation complete.
>>
>>create library qa_udf_lib file '<mydir>/myudf.so';
--- SQL operation complete.
>>
>>create function QA_UDF_
+>(I1 int, I2 int, I3 int, I4 int, I5 int, I6 int, I7 int, I8 int, I9 int,
+>I10 int, I11 int, I12 int, I13 int, I14 int, I15 int, I16 int, I17 int,
+>I18 int, I19 int, I20 int, I21 int, I22 int, I23 int, I24 int, I25 int,
+>I26 int, I27 int, I28 int, I29 int, I30 int, I31 int, I32 int)
+>returns (O int)
+>language c
+>parameter style sql
+>external name 'qa_udf_
+>library qa_udf_lib
+>deterministic
+>state area size 1024
+>allow any parallelism
+>no sql;
--- SQL operation complete.
>>
>>values(
+>1,1,1,
+>1,1,1,
+>1,1,1,
+>1,1));
LM Assertion: Parameters more than 32 are not allowed.
at FILE: ../langman/
*** ERROR[2034] $Z0001NI:60: Operating system error 201 while communicating with server process $Z0002EK:63.
*** ERROR[8904] SQL did not receive a reply from MXUDR, possibly caused by internal errors when executing user-defined routines.
--- 0 row(s) selected.
>>
>>drop function QA_UDF_
--- SQL operation complete.
>>drop library qa_udf_lib cascade;
--- SQL operation complete.
>>drop schema mytest cascade;
--- SQL operation complete.
-------
Here is the stack of the core file:
(gdb) bt
#0 0x00000039e28328a5 in raise () from /lib64/libc.so.6
#1 0x00000039e2834085 in abort () from /lib64/libc.so.6
#2 0x0000000000423689 in comTFDS (
msg1=0x43ad50 "Trafodion UDR Server Internal Error",
msg2=<value optimized out>,
msg3=
msg4=
writeToSeaL
#3 0x00000000004238f7 in makeTFDSCall (
msg=
dialOut=1, writeToSeaLog=1) at ../udrserv/
#4 0x00007ffff79c0873 in lmAssert (
file=
msg=
at ../langman/
#5 0x00007ffff79e1c58 in LmRoutineCSql:
inputRow=
at ../langman/
#6 0x0000000000415ebc in SPInfo:
reqSqlBuf=
numRowsProc
#7 0x00000000004164bf in SPInfo::work (this=0x7fffea2
at ../udrserv/
#8 0x0000000000432cda in UdrServerDataSt
this=
at ../udrserv/
#9 0x000000000042f08d in processARequest (UdrGlob=
msgStream=..., env=...) at ../udrserv/
#10 0x00000000004318ec in runServer (argc=2, argv=0x7fffffff
at ../udrserv/
#11 0x0000000000431b7f in main (argc=2, argv=0x7fffffff
at ../udrserv/
description: | updated |
Changed in trafodion: | |
assignee: | nobody → Suresh Subbiah (suresh-subbiah) |
status: | New → In Progress |
An error is raised during CREATE time for an UDF with more than 32 parameters now.