Re: Can MySQL start/fire an external process?



Mark Matthews wrote:
You can do pretty much anything you want in a UDF (make a socket call,
run some Java code using jUDF, exec() an external process, etc), which
you can call from a trigger:

I would not recommend doing anything in a UDF that could execute in unbounded time, perform I/O, access other libraries, etc.
Doing so can result in:
- security vulnerabilities, because the UDF runs as the user id of the DBMS server
- DBMS server hanging if your UDF takes a long time to return
- DBMS server crashing if your UDF has a bug, or fails to handle exception cases


UDFs are intended for very short-duration context-free operations, taking input parameters and giving output based solely on that input.
I would not recommend designing a UDF to read or write any state outside the scope of the UDF.


Regards,
Bill K.
.



Relevant Pages

  • Re: Difference between MyUDF(A30:C30) and MyUDF(Total1:Total3)?
    ... which are each sums of the columns ... The UDF call is in another cell, ... On the first of these double calls, the input parameters are wrong. ...
    (microsoft.public.excel)
  • Re: charindex in user-defined function
    ... input parameters, therefore your strings get truncated to VARCHAR. ... Some non-deterministic functions can be used in a UDF but others aren't ... who sort posts by date won't see your post as a recent one. ...
    (microsoft.public.sqlserver.programming)
  • Re: charindex in user-defined function
    ... input parameters, therefore your strings get truncated to VARCHAR. ... Some non-deterministic functions can be used in a UDF but others aren't ... who sort posts by date won't see your post as a recent one. ...
    (microsoft.public.sqlserver.clients)
  • Re: charindex in user-defined function
    ... input parameters, therefore your strings get truncated to VARCHAR. ... Some non-deterministic functions can be used in a UDF but others aren't ... who sort posts by date won't see your post as a recent one. ...
    (microsoft.public.sqlserver.server)
  • Re: Can MySQL start/fire an external process?
    ... >>You can do pretty much anything you want in a UDF (make a socket call, ... >>run some Java code using jUDF, execan external process, etc), which ... > - DBMS server hanging if your UDF takes a long time to return ... Mark Matthews ...
    (comp.lang.java.databases)