mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 07:14:17 +01:00
9e90516b35
git-svn-id: file:///svn/mysql/tests/mysql-test@48570 c7de825b-a66e-492c-adef-691d508d4ae1
161 lines
3.8 KiB
Text
Executable file
161 lines
3.8 KiB
Text
Executable file
SET DEFAULT_STORAGE_ENGINE = 'tokudb';
|
|
DROP TABLE IF EXISTS t1,t2;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
select * from t1;
|
|
a b c
|
|
1 10 100
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
select * from t1;
|
|
a b c
|
|
1 10 100
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
rename table t1 to t2;
|
|
DROP TABLE t2;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
rename table t1 to t2;
|
|
DROP TABLE t2;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
select * from t1;
|
|
a b c
|
|
1 10 100
|
|
rename table t1 to t2;
|
|
select * from t2;
|
|
a b c
|
|
1 10 100
|
|
DROP TABLE t2;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
select * from t1;
|
|
a b c
|
|
1 10 100
|
|
rename table t1 to t2;
|
|
select * from t2;
|
|
a b c
|
|
1 10 100
|
|
DROP TABLE t2;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
rename table t1 to t2;
|
|
insert into t2 values (1,10,100);
|
|
select * from t2;
|
|
a b c
|
|
1 10 100
|
|
DROP TABLE t2;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
rename table t1 to t2;
|
|
insert into t2 values (1,10,100);
|
|
select * from t2;
|
|
a b c
|
|
1 10 100
|
|
DROP TABLE t2;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
alter table t1 add index (c), add index (a,b);
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
alter table t1 add index (c), add index (a,b);
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
alter table t1 drop index b;
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
alter table t1 drop index b;
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
alter table t1 add index (c), add index (a,b);
|
|
select c from t1;
|
|
c
|
|
100
|
|
select a,b from t1;
|
|
a b
|
|
1 10
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
alter table t1 add index (c), add index (a,b);
|
|
select c from t1;
|
|
c
|
|
100
|
|
select a,b from t1;
|
|
a b
|
|
1 10
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
alter table t1 add index (c), add index (a,b), drop index b;
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
alter table t1 add index (c), add index (a,b), drop index b;
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
alter table t1 add index (c), add index foo (a,b), drop index b;
|
|
select c from t1;
|
|
c
|
|
100
|
|
select a,b from t1 use index (foo);
|
|
a b
|
|
1 10
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
alter table t1 add index (c), add index foo (a,b), drop index b;
|
|
select c from t1;
|
|
c
|
|
100
|
|
select a,b from t1 use index (foo);
|
|
a b
|
|
1 10
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
select * from t1;
|
|
a b c
|
|
1 10 100
|
|
truncate table t1;
|
|
insert into t1 values (2,20,200);
|
|
select * from t1;
|
|
a b c
|
|
2 20 200
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, primary key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
select * from t1;
|
|
a b c
|
|
1 10 100
|
|
truncate table t1;
|
|
insert into t1 values (2,20,200);
|
|
select * from t1;
|
|
a b c
|
|
2 20 200
|
|
DROP TABLE t1;
|
|
create table t1 (a int, b int, c int, key(a), key(b));
|
|
insert into t1 values (1,10,100);
|
|
select * from t1;
|
|
a b c
|
|
1 10 100
|
|
alter table t1 add index (c), drop index b;
|
|
select c from t1;
|
|
c
|
|
100
|
|
rename table t1 to t2;
|
|
select * from t2;
|
|
a b c
|
|
1 10 100
|
|
alter table t2 add index (b), drop index c;
|
|
select b from t2;
|
|
b
|
|
10
|
|
truncate table t2;
|
|
insert into t2 values (2,20,200);
|
|
select * From t2;
|
|
a b c
|
|
2 20 200
|
|
drop table t2;
|