Some fixes for MySql STRICT_TRANS_TABLES mode