mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge with 4.1.3-beta
This commit is contained in:
@@ -244,7 +244,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range x x 5 NULL 2 Using where
|
||||
explain select count(*) from t1 where x in (1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
|
||||
1 SIMPLE t1 ref x x 5 const 1 Using where; Using index
|
||||
explain select count(*) from t1 where x in (1,2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
|
||||
@@ -299,6 +299,27 @@ a b
|
||||
15 1
|
||||
47 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
id int( 11 ) unsigned NOT NULL AUTO_INCREMENT ,
|
||||
line int( 5 ) unsigned NOT NULL default '0',
|
||||
columnid int( 3 ) unsigned NOT NULL default '0',
|
||||
owner int( 3 ) unsigned NOT NULL default '0',
|
||||
ordinal int( 3 ) unsigned NOT NULL default '0',
|
||||
showid smallint( 6 ) unsigned NOT NULL default '1',
|
||||
tableid int( 1 ) unsigned NOT NULL default '1',
|
||||
content int( 5 ) unsigned NOT NULL default '188',
|
||||
PRIMARY KEY ( owner, id ) ,
|
||||
KEY menu( owner, showid, columnid ) ,
|
||||
KEY `COLUMN` ( owner, columnid, line ) ,
|
||||
KEY `LINES` ( owner, tableid, content, id ) ,
|
||||
KEY recount( owner, line )
|
||||
) ENGINE = MYISAM;
|
||||
INSERT into t1 (owner,id,columnid,line) values (11,15,15,1),(11,13,13,5);
|
||||
SELECT id, columnid, tableid, content, showid, line, ordinal FROM t1 WHERE owner=11 AND ((columnid IN ( 15, 13, 14 ) AND line IN ( 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 31 )) OR (columnid IN ( 13, 14 ) AND line IN ( 15 ))) LIMIT 0 , 30;
|
||||
id columnid tableid content showid line ordinal
|
||||
13 13 1 188 1 5 0
|
||||
15 15 1 188 1 1 0
|
||||
drop table t1;
|
||||
create table t1 (id int(10) primary key);
|
||||
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
select id from t1 where id in (2,5,9) ;
|
||||
|
||||
Reference in New Issue
Block a user