tag:blogger.com,1999:blog-17155656.post113828529567483221..comments2023-04-06T12:09:13.895+02:00Comments on db4free.net blog: Emulating check constraints with views?Markus Popphttp://www.blogger.com/profile/15355530354397508921noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-17155656.post-1138299051558321992006-01-26T19:10:00.000+01:002006-01-26T19:10:00.000+01:00Thank you - I have filed a bug report about it: ht...Thank you - I have filed a bug report about it: http://bugs.mysql.com/bug.php?id=16813Markus Popphttps://www.blogger.com/profile/15355530354397508921noreply@blogger.comtag:blogger.com,1999:blog-17155656.post-1138295087979252512006-01-26T18:04:00.000+01:002006-01-26T18:04:00.000+01:00The first case definitely looks like a bug. If yo...The first case definitely looks like a bug. If you do the same thing with a BETWEEN, it will be rejected.<BR/><BR/>root@test~> CREATE OR REPLACE VIEW v_checktest AS SELECT id, val FROM checktest WHERE val BETWEEN 1 AND 5 WITH CHECK OPTION;<BR/>Query OK, 0 rows affected (0.02 sec)<BR/><BR/>root@test~> UPDATE v_checktest SET val=6 WHERE id=1;<BR/>ERROR 1369 (HY000): CHECK OPTION failed 'test.v_checktest'<BR/><BR/><BR/>The second thing, cascaded is the default, so even if you don't define it, it will still be there, so not a bug on that case.Anonymousnoreply@blogger.com