Server IP : 49.212.180.16 / Your IP : 3.19.234.118 Web Server : Apache System : FreeBSD www2606.sakura.ne.jp 13.0-RELEASE-p14 FreeBSD 13.0-RELEASE-p14 #2: Mon Dec 9 13:54:55 JST 2024 root@www5301.sakura.ne.jp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 User : utannto ( 1076) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/rs/mysql/5.1/mysql-test/t/ |
Upload File : |
# # Testing of constraints # Currently MySQL only ignores the syntax. # --disable_warnings drop table if exists t1; --enable_warnings create table t1 (a int check (a>0)); insert into t1 values (1); insert into t1 values (0); drop table t1; create table t1 (a int ,b int, check a>b); insert into t1 values (1,0); insert into t1 values (0,1); drop table t1; create table t1 (a int ,b int, constraint abc check (a>b)); insert into t1 values (1,0); insert into t1 values (0,1); drop table t1; create table t1 (a int null); insert into t1 values (1),(NULL); drop table t1; create table t1 (a int null); alter table t1 add constraint constraint_1 unique (a); alter table t1 add constraint unique key_1(a); alter table t1 add constraint constraint_2 unique key_2(a); show create table t1; drop table t1; # End of 4.1 tests