diff options
author | unknown <serg@serg.mylan> | 2004-05-15 11:26:58 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-05-15 11:26:58 +0200 |
commit | 36bce251128b8fd300c4a6329d0c2d8f601a14bc (patch) | |
tree | 7511a87efd9dc5060078495d60fc5092288b31ec /mysql-test/r/innodb.result | |
parent | b40430e08cf40d931c511d4d31ea517b7294417b (diff) | |
parent | fdd4717730796ba178cc59c3609e8693ed967105 (diff) | |
download | mariadb-git-36bce251128b8fd300c4a6329d0c2d8f601a14bc.tar.gz |
merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test/r/innodb.result')
-rw-r--r-- | mysql-test/r/innodb.result | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 259e1fb3059..700fe1a4111 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1538,6 +1538,37 @@ t2 CREATE TABLE `t2` ( CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t2; +create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id), primary key (id), index (id,id2)) engine = innodb; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL auto_increment, + `id2` int(11) NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `id` (`id`,`id2`), + CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t2; +create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id)) engine= innodb; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL auto_increment, + `id2` int(11) NOT NULL default '0', + KEY `t1_id_fk` (`id`), + CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t2 add index id_test (id), add index id_test2 (id,id2); +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) NOT NULL auto_increment, + `id2` int(11) NOT NULL default '0', + KEY `id_test` (`id`), + KEY `id_test2` (`id`,`id2`), + CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t2; create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb; ERROR HY000: Can't create table './test/t2.frm' (errno: 150) create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb; |