Short-circuit setting of sql mode