In version 1.15, I fixed a bug but introduced a worse one. It went unnoticed for more than two years, but fbudf has memory problem when dealing with varchars due to a silly change in the vary struct definition.
I think these h and cpp can be copied safely from the HEAD to FB2.0.
- add to fbudf project the files timestamp.cpp and timestamp.h
- for the same project, define FBUDF_EXPORTS as preprocessor macro
- for the firebird2 workspace/solution/make/etc get rid of the dependency of fbudf on fbclient. Build files that I indentified that need fixes are:
builds\posix\Makefile.in.client.fbudf
builds\posix\Makefile.in.embed.fbudf
builds\win32\msvc7\fbudf.vcproj
builds\win32\msvc7\Firebird2.sln
MacOs build files ignore fbudf completely.
This change eliminates the problem with the client library having different names depending on the build type (SS, CS, embedded).
- Functions that use an output argument shouldn't return anything.
- Signal null output blob if the engine understands it.
- Make input parameter const except in some cases where the library plays with input params using internal engine knowledge (not recommended for general usage).
- The old ib_udf.sql works as always with ib_udf.c
- You can use ib_udf.cpp with the old ib_udf.sql, but it won't detect NULL
- You must use ib_udf2.sql ONLY with ib_udf.cpp and will have complete functionality
- You can point your build schema to use ib_udf.cpp instead of ib_udf.c
- The changes are backward compatible, except for the detection of NULL that needs the new DDL declarations.
placed some variables in context
fixed some function signatures
closed a few possible buffer overruns
sorry to the platform maintainers, I can't verify what I did for non-Win32 builds