Fixes #141 for mysql with strict mode enabled