Patches for 64bits support for mysql [sf#1359414] [#634]