Sorting when sql_mode = STRICT_TRANS_TABLES