mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge with 4.0
This commit is contained in:
@@ -140,13 +140,13 @@ id parent_id level
|
||||
1015 102 2
|
||||
explain select level from t1 where level=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref level level 1 const 12 where used; Using index
|
||||
1 SIMPLE t1 ref level level 1 const 12 Using where; Using index
|
||||
explain select level,id from t1 where level=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref level level 1 const 12 where used; Using index
|
||||
1 SIMPLE t1 ref level level 1 const 12 Using where; Using index
|
||||
explain select level,id,parent_id from t1 where level=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref level level 1 const 12 where used
|
||||
1 SIMPLE t1 ref level level 1 const 12 Using where
|
||||
select level,id from t1 where level=1;
|
||||
level id
|
||||
1 1002
|
||||
@@ -165,7 +165,7 @@ level id parent_id
|
||||
1 1007 101
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize error The handler for the table doesn't support check/repair
|
||||
test.t1 optimize error The handler for the table doesn't support optimize
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 id A 87 NULL NULL BTREE
|
||||
@@ -189,7 +189,7 @@ create table t1 (a int) type=innodb;
|
||||
insert into t1 values (1), (2);
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize error The handler for the table doesn't support check/repair
|
||||
test.t1 optimize error The handler for the table doesn't support optimize
|
||||
delete from t1 where a = 1;
|
||||
select * from t1;
|
||||
a
|
||||
@@ -208,7 +208,7 @@ create index skr on t1 (a);
|
||||
insert into t1 values (3,""), (4,"testing");
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze error The handler for the table doesn't support check/repair
|
||||
test.t1 analyze error The handler for the table doesn't support analyze
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 1 skr 1 a A 3 NULL NULL YES BTREE
|
||||
@@ -597,7 +597,7 @@ id parent_id level
|
||||
1016 102 2
|
||||
explain select level from t1 where level=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref level level 1 const 6 where used; Using index
|
||||
1 SIMPLE t1 ref level level 1 const 6 Using where; Using index
|
||||
select level,id from t1 where level=1;
|
||||
level id
|
||||
1 1004
|
||||
@@ -724,7 +724,7 @@ world 2
|
||||
hello 1
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize error The handler for the table doesn't support check/repair
|
||||
test.t1 optimize error The handler for the table doesn't support optimize
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 a A 2 NULL NULL BTREE
|
||||
@@ -759,7 +759,7 @@ create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h
|
||||
insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
|
||||
explain select * from t1 where a > 0 and a < 50;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 where used
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where
|
||||
drop table t1;
|
||||
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=innodb;
|
||||
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
|
||||
@@ -988,7 +988,7 @@ BEGIN;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
SELECT @@tx_isolation,@@global.tx_isolation;
|
||||
@@tx_isolation @@global.tx_isolation
|
||||
SERIALIZABLE READ-COMMITTED
|
||||
SERIALIZABLE REPEATABLE-READ
|
||||
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
|
||||
select id, code, name from t1 order by id;
|
||||
id code name
|
||||
|
Reference in New Issue
Block a user