~vkolesnikov/pbxt/pbxt-07-diskfull

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/t/foreign_key.test

  • Committer: paul-mccullagh
  • Date: 2006-10-23 09:14:04 UTC
  • Revision ID: paul-mccullagh-918861e03d351978a9541168a96e58cc826734ee
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Test syntax of foreign keys
 
3
#
 
4
 
 
5
--disable_warnings
 
6
drop table if exists t1;
 
7
--enable_warnings
 
8
 
 
9
create table t1 (
 
10
        a int not null references t2,
 
11
        b int not null references t2 (c),
 
12
        primary key (a,b),
 
13
        foreign key (a) references t3 match full,
 
14
        foreign key (a) references t3 match partial,
 
15
        foreign key (a,b) references t3 (c,d) on delete no action
 
16
          on update no action,
 
17
        foreign key (a,b) references t3 (c,d) on update cascade,
 
18
        foreign key (a,b) references t3 (c,d) on delete set default,
 
19
        foreign key (a,b) references t3 (c,d) on update set null);
 
20
 
 
21
create index a on t1 (a);
 
22
create unique index b on t1 (a,b);
 
23
drop table t1;
 
24
 
 
25
# End of 4.1 tests