check constraint does not work?
CHECK constraints are not implemented in MySQL. From CREATE TABLE


  The CHECK clause is parsed but ignored by all storage engines. See Section 12.1.17, “CREATE TABLE Syntax”. The reason for accepting but ignoring syntax clauses is for compatibility, to make it easier to port code from other SQL servers, and to run applications that create tables with references. See Section 1.8.5, “MySQL Differences from Standard SQL”. 


It's also been a reported bug for almost 8 years...