mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merged
mysql-test/r/innodb.result: Auto merged mysql-test/t/innodb.test: Auto merged sql/sql_select.cc: Auto merged
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user