mariadb/mysql-test/suite/tokudb.alter_table/r/hcr3.result
Rich Prohaska a0dab9b34f #4623 change ENGINE=TOKUDB to ENGINE=TokuDB in the common tokudb test result files refs[t:4623]
git-svn-id: file:///svn/mysql/tests/mysql-test@40974 c7de825b-a66e-492c-adef-691d508d4ae1
2012-03-19 15:01:11 +00:00

69 lines
2.1 KiB
Text

SET STORAGE_ENGINE='tokudb';
DROP TABLE IF EXISTS foo;
set session tokudb_disable_slow_alter=ON;
create table foo (a int, b bigint, c char(10), d varchar(10), e text, primary key (a), key(b), clustering key (d))engine=TOkuDB;
insert into foo values (1,10,"cc","dddd","eeeee");
select * from foo;
a b c d e
1 10 cc dddd eeeee
alter table foo change a aa int;
show create table foo;
Table Create Table
foo CREATE TABLE `foo` (
`aa` int(11) NOT NULL DEFAULT '0',
`b` bigint(20) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`d` varchar(10) DEFAULT NULL,
`e` text,
PRIMARY KEY (`aa`),
KEY `b` (`b`),
CLUSTERING KEY `d` (`d`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
select * from foo;
aa b c d e
1 10 cc dddd eeeee
explain select * from foo where aa > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 1 Using where
select * from foo where aa > 0;
aa b c d e
1 10 cc dddd eeeee
alter table foo change b bb bigint;
show create table foo;
Table Create Table
foo CREATE TABLE `foo` (
`aa` int(11) NOT NULL DEFAULT '0',
`bb` bigint(20) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`d` varchar(10) DEFAULT NULL,
`e` text,
PRIMARY KEY (`aa`),
KEY `b` (`bb`),
CLUSTERING KEY `d` (`d`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
explain select bb from foo FORCE INDEX (b) where bb > 5;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo index b b 9 NULL 1 Using where; Using index
select bb from foo FORCE INDEX (b) where bb > 5;
bb
10
alter table foo change d dd varchar(10);
show create table foo;
Table Create Table
foo CREATE TABLE `foo` (
`aa` int(11) NOT NULL DEFAULT '0',
`bb` bigint(20) DEFAULT NULL,
`c` char(10) DEFAULT NULL,
`dd` varchar(10) DEFAULT NULL,
`e` text,
PRIMARY KEY (`aa`),
KEY `b` (`bb`),
CLUSTERING KEY `d` (`dd`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
explain select * from foo where dd > "d";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE foo range d d 13 NULL 1 Using where
select * from foo where dd > "d";
aa bb c dd e
1 10 cc dddd eeeee
drop table foo;