summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/alter_table.result
blob: 3a765a61dd26b94e26ce71c81d1144d417fdd510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
set @@sql_mode=strict_trans_tables;
create table t1(a text not null) row_format=dynamic engine=innodb;
create index idx1 on t1(a(3073));
Warnings:
Note	1071	Specified key was too long; max key length is 3072 bytes
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` text NOT NULL,
  KEY `idx1` (`a`(3072))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
drop table t1;
set @@sql_mode=default;
create table t1 (
id1    int(11)      not null auto_increment,
id2    varchar(30)  not null,
id3    datetime     not null default current_timestamp,
primary key (id1),
unique key unique_id2 (id2)
) engine=innodb;
alter table t1 change column id2 id4 varchar(100) not null;
select * from t1 where id4 like 'a';
id1	id4	id3
drop table t1;
create table t1 (a int) transactional=1 engine=aria;
create table t2 (a int) transactional=1 engine=innodb;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
show create table t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 TRANSACTIONAL=1
alter table t1 engine=innodb;
alter table t1 add column b int;
drop table t1,t2;