~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/constraints.test

  • Committer: Monty Taylor
  • Date: 2008-09-16 00:00:48 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916000048-3rvrv3gv9l0ad3gs
Fixed copyright headers in drizzled/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# Testing of constraints
3
 
# Currently MySQL only ignores the syntax.
4
 
#
5
 
--disable_warnings
6
 
drop table if exists t1;
7
 
--enable_warnings
8
 
 
9
 
create table t1 (a int check (a>0));
10
 
insert into t1 values (1);
11
 
insert into t1 values (0);
12
 
drop table t1;
13
 
create table t1 (a int ,b int, check a>b);
14
 
insert into t1 values (1,0);
15
 
insert into t1 values (0,1);
16
 
drop table t1;
17
 
create table t1 (a int ,b int, constraint abc check (a>b));
18
 
insert into t1 values (1,0);
19
 
insert into t1 values (0,1);
20
 
drop table t1;
21
 
create table t1 (a int null);
22
 
insert into t1 values (1),(NULL);
23
 
drop table t1;
24
 
create table t1 (a int null);
25
 
alter table t1 add constraint constraint_1 unique (a);
26
 
alter table t1 add constraint unique key_1(a);
27
 
alter table t1 add constraint constraint_2 unique key_2(a);
28
 
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
29
 
show create table t1;
30
 
drop table t1;
31
 
 
32
 
# End of 4.1 tests