I want to use the CHECK constraint in MySQL, but it is not supported. (Unlike other RDBMS, it will understand but not enforce the CHECKs.)
I have seen some workarounds with triggers. But they tend to set a default value to the field in question instead of returning an error.
Is it possible to construct a trigger that returns an error if a condition is not met?
Ultimately I want a trigger that copies a CHECK constraint.