uuidUDF, UUID Lib, CREATE_UUID in Firebird 2.5

  • Assume Firebird 2.5.7-amd64 is in /opt/firebird
  • go to Source/
  • Edit makefile. Add -fPIC -g to CFLAGS
  • make clean (yes, they ship compiled objects in distribution tarball)
  • Apply the following patch. No idea, maybe in 2005 the TMP/TEMP variable used to exist. Or you can somehow set environment for your firebird server…
--- uuidlibv12/uuidlibv1.2/Source/uuid.c	2005-10-12 13:13:40.000000000 +0200
+++ uuidlibv12-patched/uuidlibv1.2/Source/uuid.c	2018-01-20 12:44:38.446284700 +0100
@@ -91,6 +91,7 @@
            char * tmp = getenv("TMP");
 	   if (!tmp) {
 	        tmp = getenv("TEMP");
+tmp="/tmp";
 	   }
 	   char * tmpStr;
 	   tmpStr = (char *) malloc(strlen(tmp) + 20);
@@ -130,6 +131,7 @@
            char * tmp = getenv("TMP");
 	   if (!tmp) {
 	        tmp = getenv("TEMP");
+tmp="/tmp";
 	   }
 	   char * tmpStr;
 	   tmpStr = (char *) malloc(strlen(tmp) + 20);
  • make uuidlib
  • cp uuidlib /opt/firebird/UDF/uuidlib.so
  • cd /opt/firebird/UDF/; ln -s uuidlib.so uuidlib
  • Edit /opt/firebird/firebird.conf:
    • UdfAccess = Restrict /opt/firebird/UDF;/opt/firebird/UDF/uuidlib
  • Restart Firebird
  • Maybe you will need to execute uuidUDF.sql if your application already did not do it.
  • Try running “select UUID_CREATE() from rdb$database”.
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki