Actually, MySQL could really use an embedded procedure-writing language. Java wouldn't be the worst choice they could make, especially given the proliferation of other languages implemented atop the JVM -- being able to use JRuby for stored procedures inside a running MySQL instance (with no network I/O or marshalling overhead) would pretty much rock.
Of course, you could also just use Postgres, which already lets you embed your choice of scripting language(s) in the database server...
Of course, you could also just use Postgres, which already lets you embed your choice of scripting language(s) in the database server...