I have upgraded my fork of Quercus with the upstream changes up to the version in Resin 4.0.40. They include MYSQL_ATTR_INIT_COMMAND support for PDO.
The source code is available
on Bitbucket and its snapshot archives are available
on OSSRH.
In addition, I made a
repository clone of the upstream Quercus including all tags and branches available on Bitbucket, too. If you are interested in what is
not included in Quercus 4.0.39, it would be a good resource for taking a look.
Please note these works are not associated to Caucho Technology, Inc.