Fixes for a few scalar UDF bugs LP 1426605: change in NormRelExpr.cpp. When left linearizing a join backbone sufficients inputs were not being provided. The change ensures that inputs from the old tree and still marked as required inputs for a node in the new tree. LP 1420530: Error handling added to BiArith::bindNode. LP 1420938: Error handling to CREATE FUNCTION statement to flag more than 32 parameters. LP 1421438: showddl [function | procedure | table_mapping function] <name>; now works. If one of the optional tokens is not specified then we will look for a table called <name>.
Patch Set 1 Changes to address comments by Dave. One more fix in ExUdr.cpp. There is no LP for this bug. If a dll is missing at runtime or other LOAD errors during UDF fixup could lead to an assertion, since we try to place an error in UDF's up queue, before there are entries in the corresponding down queue. Fix is to remove this line and let existing error handling report this error. Thanks for your help Hans. Couple of items that I forgot to mention before 1) Changes in Analyzer.cpp related to printing predecessorJBBC are due to Hans. 2) Showddl code is mostly refactored from previous versions.
bug 1430034 TMUDF: processData() fails to handle several data type bug 1430438 TMUDF: A TMUDF with nonexisting external name crashes sqlci with a core bug 1430453 TMUDF: A TMUDF missing 'language cpp' crashes sqlci with a core bug 1430484 TMUDF: User defined error number for UDRException() not returned at run time bug 1404053 Core with SIGSEGV during CREATE PROCEDURE statement when procedure validation fails
Summary of changes:
- Support for more data types, including char types with character set UCS2 and interval types. Unlike in other types of UDFs, intervals are represented as integers, but that representation is not directly exposed to the UDF writer. CLOBs and BLOBs are only supported when they are mapped to VARCHARS. - Support to get and set values by specifying a C++ data type of time_t for datetime and certain interval values. - The default language for creating UDFs is changing. It used to be C, the new rule depends on the type of the library. If we can determine the library to be a jar file, the default language is Java. For other libraries, the default is C for scalar UDFs, C++ for table-valued UDFs. Also the PARAMETER STYLE clause is no longer used for TMUDFs, the parameter style is computed automatically for now. PARAMETER STYLE is now optional for Java stored procedures. - Error handling is somewhat improved, fewer internal errors occur when a UDR raises an exception. Still needs work. - Making interfaces of OrderInfo and PartitionInfo more similar by giving them similar methods.