fix MSVC preprocessor error, MySQL regression, and boost random build annoyances