Bug #22759 check constraint: missing feature and documentation
Submitted: 27 Sep 2006 19:25 Modified: 6 Nov 2009 16:49
Reporter: Maciej Pilichowski Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:5.0.24a OS:Linux (opensuse 10.0)
Assigned to: CPU Architecture:Any

[27 Sep 2006 19:25] Maciej Pilichowski
Description:
1) lack of check constraint is pretty serious (this feature is not "theoretical thing") -- I hope to see it very soon in mysql
2) check the documentation for alter table -- syntax for check constraint is missing
3) check references in documentation -- I started at alter table which points to create table (I was looking for something about the reason of check constraint lacking and maybe how I can work with it), then it points to foreign keys and there is _no_ information about check constraint

Of course I am much eager to see the feature than the documentation fix :-).

How to repeat:
This is a wish, not a bug.

Suggested fix:
Implement it, improve MySQL after all is important.
[29 Sep 2006 15:08] Valeriy Kravchuk
Thank you for a reasonable feature request.
[20 Jun 2007 6:27] vamsi mandava
is there any work around to fix this bug temperorily or we have to hanle the check in the front end before actually we are going to save the data
[18 Jul 2009 18:11] Karsten Wutzke
This is true for every OS. Even in mid 2009 there's still no CHECK constraint. Come on!
[6 Nov 2009 16:49] Valeriy Kravchuk
Duplicate of Bug #3464 actually.
[23 Jan 2019 16:28] Paul DuBois
Posted by developer:
 
Fixed in 8.0.16.

Previously, MySQL permitted a limited form of CHECK constraint
syntax, but parsed and ignored it. MySQL now implements the core
features of table and column CHECK constraints, for all storage
engines. Constraints are defined using CREATE TABLE and ALTER TABLE
statements.