Original link: Modular Magic: Reusing Code in MySQL with the New LIBRARY Feature / Oracle blog.
Just like you can use Java SP and UDF in Oracle, DB2, Derby, ASE etc. and C# SP and UDF in SQLServer then you can use JavaScript in MySQL.
BUT ONLY IN THE COMMERCIAL VERSION - NOT IN THE FREE VERSION.