Mysql-js is a project mainly written in C++, it's free.
Project goal is to use javascript for UDFs and stored procedures
introduction in Russian: http://habrahabr.ru/blogs/mysql/123311/