[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.58.157: ~ $
set optimizer_switch='index_condition_pushdown=on';
drop table if exists t1, t2, t3;
CREATE TABLE t1 (
event_date date DEFAULT '0000-00-00' NOT NULL,
type int(11) DEFAULT '0' NOT NULL,
event_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (event_date,type,event_id)
);
INSERT INTO t1 VALUES ('1999-07-10',100100,24), ('1999-07-11',100100,25),
('1999-07-13',100600,0), ('1999-07-13',100600,4), ('1999-07-13',100600,26),
('1999-07-14',100600,10), ('1999-07-15',100600,16), ('1999-07-15',100800,45),
('1999-07-15',101000,47), ('1999-07-16',100800,46), ('1999-07-20',100600,5),
('1999-07-20',100600,27), ('1999-07-21',100600,11), ('1999-07-22',100600,17),
('1999-07-23',100100,39), ('1999-07-24',100100,39), ('1999-07-24',100500,40),
('1999-07-25',100100,39), ('1999-07-27',100600,1), ('1999-07-27',100600,6),
('1999-07-27',100600,28), ('1999-07-28',100600,12), ('1999-07-29',100500,41),
('1999-07-29',100600,18), ('1999-07-30',100500,41), ('1999-07-31',100500,41),
('1999-08-01',100700,34), ('1999-08-03',100600,7), ('1999-08-03',100600,29),
('1999-08-04',100600,13), ('1999-08-05',100500,42), ('1999-08-05',100600,19),
('1999-08-06',100500,42), ('1999-08-07',100500,42), ('1999-08-08',100500,42),
('1999-08-10',100600,2), ('1999-08-10',100600,9), ('1999-08-10',100600,30),
('1999-08-11',100600,14), ('1999-08-12',100600,20), ('1999-08-17',100500,8),
('1999-08-17',100600,31), ('1999-08-18',100600,15), ('1999-08-19',100600,22),
('1999-08-24',100600,3), ('1999-08-24',100600,32), ('1999-08-27',100500,43),
('1999-08-31',100600,33), ('1999-09-17',100100,37), ('1999-09-18',100100,37),
('1999-09-19',100100,37), ('2000-12-18',100700,38);
select event_date,type,event_id from t1 WHERE event_date >= "1999-07-01" AND event_date < "1999-07-15" AND (type=100600 OR type=100100) ORDER BY event_date;
event_date	type	event_id
1999-07-10	100100	24
1999-07-11	100100	25
1999-07-13	100600	0
1999-07-13	100600	4
1999-07-13	100600	26
1999-07-14	100600	10
explain select event_date,type,event_id from t1 WHERE type = 100601 and event_date >= "1999-07-01" AND event_date < "1999-07-15" AND (type=100600 OR type=100100) ORDER BY event_date;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
select event_date,type,event_id from t1 WHERE event_date >= "1999-07-01" AND event_date <= "1999-07-15" AND (type=100600 OR type=100100) or event_date >= "1999-07-01" AND event_date <= "1999-07-15" AND type=100099;
event_date	type	event_id
1999-07-10	100100	24
1999-07-11	100100	25
1999-07-13	100600	0
1999-07-13	100600	4
1999-07-13	100600	26
1999-07-14	100600	10
1999-07-15	100600	16
drop table t1;
CREATE TABLE t1 (
PAPER_ID smallint(6) DEFAULT '0' NOT NULL,
YEAR smallint(6) DEFAULT '0' NOT NULL,
ISSUE smallint(6) DEFAULT '0' NOT NULL,
CLOSED tinyint(4) DEFAULT '0' NOT NULL,
ISS_DATE date DEFAULT '0000-00-00' NOT NULL,
PRIMARY KEY (PAPER_ID,YEAR,ISSUE)
);
INSERT INTO t1 VALUES (3,1999,34,0,'1999-07-12'), (1,1999,111,0,'1999-03-23'),
(1,1999,222,0,'1999-03-23'), (3,1999,33,0,'1999-07-12'),
(3,1999,32,0,'1999-07-12'), (3,1999,31,0,'1999-07-12'),
(3,1999,30,0,'1999-07-12'), (3,1999,29,0,'1999-07-12'),
(3,1999,28,0,'1999-07-12'), (1,1999,40,1,'1999-05-01'),
(1,1999,41,1,'1999-05-01'), (1,1999,42,1,'1999-05-01'),
(1,1999,46,1,'1999-05-01'), (1,1999,47,1,'1999-05-01'),
(1,1999,48,1,'1999-05-01'), (1,1999,49,1,'1999-05-01'),
(1,1999,50,0,'1999-05-01'), (1,1999,51,0,'1999-05-01'),
(1,1999,200,0,'1999-06-28'), (1,1999,52,0,'1999-06-28'),
(1,1999,53,0,'1999-06-28'), (1,1999,54,0,'1999-06-28'),
(1,1999,55,0,'1999-06-28'), (1,1999,56,0,'1999-07-01'),
(1,1999,57,0,'1999-07-01'), (1,1999,58,0,'1999-07-01'),
(1,1999,59,0,'1999-07-01'), (1,1999,60,0,'1999-07-01'),
(3,1999,35,0,'1999-07-12');
select YEAR,ISSUE from t1 where PAPER_ID=3 and (YEAR>1999 or (YEAR=1999 and ISSUE>28))  order by YEAR,ISSUE;
YEAR	ISSUE
1999	29
1999	30
1999	31
1999	32
1999	33
1999	34
1999	35
check table t1;
Table	Op	Msg_type	Msg_text
test.t1	check	status	OK
repair table t1;
Table	Op	Msg_type	Msg_text
test.t1	repair	status	OK
drop table t1;
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
parent_id int(11) DEFAULT '0' NOT NULL,
level tinyint(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (id),
KEY parent_id (parent_id),
KEY level (level)
);
INSERT INTO t1 VALUES (1,0,0), (3,1,1), (4,1,1), (8,2,2), (9,2,2), (17,3,2),
(22,4,2), (24,4,2), (28,5,2), (29,5,2), (30,5,2), (31,6,2), (32,6,2), (33,6,2),
(203,7,2), (202,7,2), (20,3,2), (157,0,0), (193,5,2), (40,7,2), (2,1,1),
(15,2,2), (6,1,1), (34,6,2), (35,6,2), (16,3,2), (7,1,1), (36,7,2), (18,3,2),
(26,5,2), (27,5,2), (183,4,2), (38,7,2), (25,5,2), (37,7,2), (21,4,2),
(19,3,2), (5,1,1), (179,5,2);
SELECT * FROM t1 WHERE level = 1 AND parent_id = 1;
id	parent_id	level
3	1	1
4	1	1
2	1	1
6	1	1
7	1	1
5	1	1
SELECT * FROM t1 WHERE level = 1 AND parent_id = 1 order by id;
id	parent_id	level
2	1	1
3	1	1
4	1	1
5	1	1
6	1	1
7	1	1
drop table t1;
create table t1(
Satellite		varchar(25)	not null,
SensorMode		varchar(25)	not null,
FullImageCornersUpperLeftLongitude	double	not null,
FullImageCornersUpperRightLongitude	double	not null,
FullImageCornersUpperRightLatitude	double	not null,
FullImageCornersLowerRightLatitude	double	not null,
index two (Satellite, SensorMode, FullImageCornersUpperLeftLongitude, FullImageCornersUpperRightLongitude, FullImageCornersUpperRightLatitude, FullImageCornersLowerRightLatitude));
insert into t1 values("OV-3","PAN1",91,-92,40,50);
insert into t1 values("OV-4","PAN1",91,-92,40,50);
select * from t1 where t1.Satellite = "OV-3" and t1.SensorMode = "PAN1" and t1.FullImageCornersUpperLeftLongitude > -90.000000 and t1.FullImageCornersUpperRightLongitude < -82.000000;
Satellite	SensorMode	FullImageCornersUpperLeftLongitude	FullImageCornersUpperRightLongitude	FullImageCornersUpperRightLatitude	FullImageCornersLowerRightLatitude
OV-3	PAN1	91	-92	40	50
drop table t1;
create table t1 ( aString char(100) not null default "", key aString (aString(10)) );
insert t1 (aString) values ( "believe in myself" ), ( "believe" ), ("baaa" ), ( "believe in love");
select * from t1 where aString < "believe in myself" order by aString;
aString
baaa
believe
believe in love
select * from t1 where aString > "believe in love" order by aString;
aString
believe in myself
alter table t1 drop key aString;
select * from t1 where aString < "believe in myself" order by aString;
aString
baaa
believe
believe in love
select * from t1 where aString > "believe in love" order by aString;
aString
believe in myself
drop table t1;
CREATE TABLE t1 (
t1ID int(10) unsigned NOT NULL auto_increment,
art binary(1) NOT NULL default '',
KNR char(5) NOT NULL default '',
RECHNR char(6) NOT NULL default '',
POSNR char(2) NOT NULL default '',
ARTNR char(10) NOT NULL default '',
TEX char(70) NOT NULL default '',
PRIMARY KEY  (t1ID),
KEY IdxArt (art),
KEY IdxKnr (KNR),
KEY IdxArtnr (ARTNR)
) ENGINE=MyISAM;
INSERT INTO t1 (art) VALUES ('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),('j'),('J'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),
('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j'),('j');
select count(*) from t1 where upper(art) = 'J';
count(*)
213
select count(*) from t1 where art = 'J' or art = 'j';
count(*)
602
select count(*) from t1 where art = 'j' or art = 'J';
count(*)
602
select count(*) from t1 where art = 'j';
count(*)
389
select count(*) from t1 where art = 'J';
count(*)
213
drop table t1;
create table t1 (x int, y int, index(x), index(y));
insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9);
update t1 set y=x;
explain select * from t1, t1 t2 where t1.y = 8 and t2.x between 7 and t1.y+0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	y	y	5	const	1	NULL
1	SIMPLE	t2	range	x	x	5	NULL	2	Using index condition; Using join buffer (Block Nested Loop)
explain select * from t1, t1 t2 where t1.y = 8 and t2.x >= 7 and t2.x <= t1.y+0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	y	y	5	const	1	NULL
1	SIMPLE	t2	range	x	x	5	NULL	2	Using index condition; Using join buffer (Block Nested Loop)
explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	y	y	5	const	1	NULL
1	SIMPLE	t2	range	x	x	5	NULL	3	Using index condition; Using join buffer (Block Nested Loop)
explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	y	y	5	const	1	NULL
1	SIMPLE	t2	range	x	x	5	NULL	3	Using index condition; Using join buffer (Block Nested Loop)
explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	y	y	5	const	1	NULL
1	SIMPLE	t2	range	x	x	5	NULL	2	Using index condition; Using join buffer (Block Nested Loop)
explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	y	y	5	const	1	NULL
1	SIMPLE	t2	range	x	x	5	NULL	2	Using index condition; Using join buffer (Block Nested Loop)
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	ref	x	x	5	const	1	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
drop table t1;
CREATE TABLE t1 (key1 int(11) NOT NULL default '0', KEY i1 (key1));
INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(1),(1);
CREATE TABLE t2 (keya int(11) NOT NULL default '0', KEY j1 (keya));
INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2);
explain select * from t1, t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	ref	j1	j1	4	const	1	Using index
1	SIMPLE	t1	index	i1	i1	4	NULL	7	Using where; Using index; Using join buffer (Block Nested Loop)
explain select * from t1 force index(i1), t2 force index(j1) where 
(t1.key1 <t2.keya + 1) and t2.keya=3;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	ref	j1	j1	4	const	1	Using index
1	SIMPLE	t1	index	i1	i1	4	NULL	7	Using where; Using index; Using join buffer (Block Nested Loop)
DROP TABLE t1,t2;
CREATE TABLE t1 (
a int(11) default NULL,
b int(11) default NULL,
KEY a (a),
KEY b (b)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES
(1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,2),(10,2),
(13,2),(14,2),(15,2),(16,2),(17,3),(17,3),(16,3),(17,3),(19,3),(20,3),
(21,4),(22,5),(23,5),(24,5),(25,5),(26,5),(30,5),(31,5),(32,5),(33,5),
(33,5),(33,5),(33,5),(33,5),(34,5),(35,5);
EXPLAIN SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a,b	a	5	NULL	2	Using index condition; Using where
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
a	b
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, c int, INDEX (c,a,b));
INSERT INTO t1 VALUES (1,0,0),(1,0,0),(1,0,0);
INSERT INTO t1 VALUES (0,1,0),(0,1,0),(0,1,0);
SELECT COUNT(*) FROM t1 WHERE (c=0 and a=1) or (c=0 and b=1);
COUNT(*)
6
SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1);
COUNT(*)
6
DROP TABLE t1;
CREATE TABLE t1 ( a int not null, b int not null, INDEX ab(a,b) );
INSERT INTO t1 VALUES (47,1), (70,1), (15,1), (15, 4);
SELECT * FROM t1
WHERE
(
( b =1 AND a BETWEEN 14 AND 21 ) OR
( b =2 AND a BETWEEN 16 AND 18 ) OR
( b =3 AND a BETWEEN 15 AND 19 ) OR
(a BETWEEN 19 AND 47)
);
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) ;
id
2
5
9
select id from t1 where id=2 or id=5 or id=9 ;
id
2
5
9
drop table t1;
create table t1 ( id1 int not null, id2 int not null, idnull int null, c char(20), primary key (id1,id2));
insert into t1 values (0,1,NULL,"aaa"), (1,1,NULL,"aaa"), (2,1,NULL,"aaa"),
(3,1,NULL,"aaa"), (4,1,NULL,"aaa"), (5,1,NULL,"aaa"),
(6,1,NULL,"aaa"), (7,1,NULL,"aaa"), (8,1,NULL,"aaa"),
(9,1,NULL,"aaa"), (10,1,NULL,"aaa"), (11,1,NULL,"aaa"),
(12,1,NULL,"aaa"), (13,1,NULL,"aaa"), (14,1,NULL,"aaa"),
(15,1,NULL,"aaa"), (16,1,NULL,"aaa"), (17,1,NULL,"aaa"),
(18,1,NULL,"aaa"), (19,1,NULL,"aaa"), (20,1,NULL,"aaa");
select a.id1, b.idnull from t1 as a, t1 as b where a.id2=1 and a.id1=1 and b.id1=a.idnull order by b.id2 desc limit 1;
id1	idnull
drop table t1;
create table t1 (
id int not null auto_increment,
name char(1) not null,
uid int not null,
primary key (id),
index uid_index (uid));
create table t2 (
id int not null auto_increment,
name char(1) not null,
uid int not null,
primary key (id),
index uid_index (uid));
insert into t1(id, uid, name) values(1, 0, ' ');
insert into t1(uid, name) values(0, ' ');
insert into t2(uid, name) select uid, name from t1;
insert into t1(uid, name) select uid, name from t2;
insert into t2(uid, name) select uid, name from t1;
insert into t1(uid, name) select uid, name from t2;
insert into t2(uid, name) select uid, name from t1;
insert into t1(uid, name) select uid, name from t2;
insert into t2(uid, name) select uid, name from t1;
insert into t1(uid, name) select uid, name from t2;
insert into t2(uid, name) select uid, name from t1;
insert into t1(uid, name) select uid, name from t2;
insert into t2(uid, name) select uid, name from t1;
insert into t2(uid, name) select uid, name from t1;
insert into t2(uid, name) select uid, name from t1;
insert into t2(uid, name) select uid, name from t1;
insert into t1(uid, name) select uid, name from t2;
delete from t2;
insert into t2(uid, name) values 
(1, CHAR(64+1)),
(2, CHAR(64+2)),
(3, CHAR(64+3)),
(4, CHAR(64+4)),
(5, CHAR(64+5)),
(6, CHAR(64+6)),
(7, CHAR(64+7)),
(8, CHAR(64+8)),
(9, CHAR(64+9)),
(10, CHAR(64+10)),
(11, CHAR(64+11)),
(12, CHAR(64+12)),
(13, CHAR(64+13)),
(14, CHAR(64+14)),
(15, CHAR(64+15)),
(16, CHAR(64+16)),
(17, CHAR(64+17)),
(18, CHAR(64+18)),
(19, CHAR(64+19)),
(20, CHAR(64+20)),
(21, CHAR(64+21)),
(22, CHAR(64+22)),
(23, CHAR(64+23)),
(24, CHAR(64+24)),
(25, CHAR(64+25)),
(26, CHAR(64+26));
insert into t1(uid, name) select uid, name from t2 order by uid;
delete from t2;
insert into t2(id, uid, name) select id, uid, name from t1;
select count(*) from t1;
count(*)
1026
select count(*) from t2;
count(*)
1026
analyze table t1,t2;
Table	Op	Msg_type	Msg_text
test.t1	analyze	status	OK
test.t2	analyze	status	Table is already up to date
explain select * from t1, t2  where t1.uid=t2.uid AND t1.uid > 0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	uid_index	uid_index	4	NULL	112	Using index condition
1	SIMPLE	t2	ref	uid_index	uid_index	4	test.t1.uid	38	NULL
explain select * from t1, t2  where t1.uid=t2.uid AND t2.uid > 0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	uid_index	uid_index	4	NULL	112	Using index condition
1	SIMPLE	t2	ref	uid_index	uid_index	4	test.t1.uid	38	NULL
explain select * from t1, t2  where t1.uid=t2.uid AND t1.uid != 0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	uid_index	uid_index	4	NULL	113	Using index condition
1	SIMPLE	t2	ref	uid_index	uid_index	4	test.t1.uid	38	NULL
explain select * from t1, t2  where t1.uid=t2.uid AND t2.uid != 0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	uid_index	uid_index	4	NULL	113	Using index condition
1	SIMPLE	t2	ref	uid_index	uid_index	4	test.t1.uid	38	NULL
select * from t1, t2  where t1.uid=t2.uid AND t1.uid > 0;
id	name	uid	id	name	uid
1001	A	1	1001	A	1
1002	B	2	1002	B	2
1003	C	3	1003	C	3
1004	D	4	1004	D	4
1005	E	5	1005	E	5
1006	F	6	1006	F	6
1007	G	7	1007	G	7
1008	H	8	1008	H	8
1009	I	9	1009	I	9
1010	J	10	1010	J	10
1011	K	11	1011	K	11
1012	L	12	1012	L	12
1013	M	13	1013	M	13
1014	N	14	1014	N	14
1015	O	15	1015	O	15
1016	P	16	1016	P	16
1017	Q	17	1017	Q	17
1018	R	18	1018	R	18
1019	S	19	1019	S	19
1020	T	20	1020	T	20
1021	U	21	1021	U	21
1022	V	22	1022	V	22
1023	W	23	1023	W	23
1024	X	24	1024	X	24
1025	Y	25	1025	Y	25
1026	Z	26	1026	Z	26
select * from t1, t2  where t1.uid=t2.uid AND t1.uid != 0;
id	name	uid	id	name	uid
1001	A	1	1001	A	1
1002	B	2	1002	B	2
1003	C	3	1003	C	3
1004	D	4	1004	D	4
1005	E	5	1005	E	5
1006	F	6	1006	F	6
1007	G	7	1007	G	7
1008	H	8	1008	H	8
1009	I	9	1009	I	9
1010	J	10	1010	J	10
1011	K	11	1011	K	11
1012	L	12	1012	L	12
1013	M	13	1013	M	13
1014	N	14	1014	N	14
1015	O	15	1015	O	15
1016	P	16	1016	P	16
1017	Q	17	1017	Q	17
1018	R	18	1018	R	18
1019	S	19	1019	S	19
1020	T	20	1020	T	20
1021	U	21	1021	U	21
1022	V	22	1022	V	22
1023	W	23	1023	W	23
1024	X	24	1024	X	24
1025	Y	25	1025	Y	25
1026	Z	26	1026	Z	26
drop table t1,t2;
create table t1 (x bigint unsigned not null);
insert into t1(x) values (0xfffffffffffffff0);
insert into t1(x) values (0xfffffffffffffff1);
select * from t1;
x
18446744073709551600
18446744073709551601
select count(*) from t1 where x>0;
count(*)
2
select count(*) from t1 where x=0;
count(*)
0
select count(*) from t1 where x<0;
count(*)
0
select count(*) from t1 where x < -16;
count(*)
0
select count(*) from t1 where x = -16;
count(*)
0
select count(*) from t1 where x > -16;
count(*)
2
select count(*) from t1 where x = 18446744073709551601;
count(*)
1
create table t2 (x bigint not null);
insert into t2(x) values (-16);
insert into t2(x) values (-15);
select * from t2;
x
-16
-15
select count(*) from t2 where x>0;
count(*)
0
select count(*) from t2 where x=0;
count(*)
0
select count(*) from t2 where x<0;
count(*)
2
select count(*) from t2 where x < -16;
count(*)
0
select count(*) from t2 where x = -16;
count(*)
1
select count(*) from t2 where x > -16;
count(*)
1
select count(*) from t2 where x = 18446744073709551601;
count(*)
0
drop table t1,t2;
create table t1 (x bigint unsigned not null primary key) engine=innodb;
insert into t1(x) values (0xfffffffffffffff0);
insert into t1(x) values (0xfffffffffffffff1);
select * from t1;
x
18446744073709551600
18446744073709551601
select count(*) from t1 where x>0;
count(*)
2
select count(*) from t1 where x=0;
count(*)
0
select count(*) from t1 where x<0;
count(*)
0
select count(*) from t1 where x < -16;
count(*)
0
select count(*) from t1 where x = -16;
count(*)
0
select count(*) from t1 where x > -16;
count(*)
2
select count(*) from t1 where x = 18446744073709551601;
count(*)
1
drop table t1;
create table t1 (a bigint unsigned);
create index t1i on t1(a);
insert into t1 select 18446744073709551615;
insert into t1 select 18446744073709551614;
explain select * from t1 where a <> -1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	index	t1i	t1i	9	NULL	2	Using where; Using index
select * from t1 where a <> -1;
a
18446744073709551614
18446744073709551615
explain select * from t1 where a > -1 or a < -1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	index	t1i	t1i	9	NULL	2	Using where; Using index
select * from t1 where a > -1 or a < -1;
a
18446744073709551614
18446744073709551615
explain select * from t1 where a > -1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	index	t1i	t1i	9	NULL	2	Using where; Using index
select * from t1 where a > -1;
a
18446744073709551614
18446744073709551615
explain select * from t1 where a < -1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
select * from t1 where a < -1;
a
drop table t1;
set names latin1;
create table t1 (a char(10), b text, key (a)) character set latin1;
INSERT INTO t1 (a) VALUES
('111'),('222'),('222'),('222'),('222'),('444'),('aaa'),('AAA'),('bbb');
explain select * from t1 where a='aaa';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	a	a	11	const	2	Using index condition
explain select * from t1 where a=binary 'aaa';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	11	NULL	2	Using index condition
explain select * from t1 where a='aaa' collate latin1_bin;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	11	NULL	2	Using index condition
explain select * from t1 where a='aaa' collate latin1_german1_ci;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	a	NULL	NULL	NULL	9	Using where
drop table t1;
CREATE TABLE t1 (
`CLIENT` char(3) character set latin1 collate latin1_bin NOT NULL default '000',
`ARG1` char(3) character set latin1 collate latin1_bin NOT NULL default '',
`ARG2` char(3) character set latin1 collate latin1_bin NOT NULL default '',
`FUNCTION` varchar(10) character set latin1 collate latin1_bin NOT NULL default '',
`FUNCTINT` int(11) NOT NULL default '0',
KEY `VERI_CLNT~2` (`ARG1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES ('000',' 0',' 0','Text 001',0), ('000',' 0',' 1','Text 002',0),
('000',' 1',' 2','Text 003',0), ('000',' 2',' 3','Text 004',0),
('001',' 3',' 0','Text 017',0);
SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 1' OR ARG1 != ' 2');
count(*)
4
SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1');
count(*)
4
drop table t1;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t2 (
pk1 int(11) NOT NULL,
pk2 int(11) NOT NULL,
pk3 int(11) NOT NULL,
pk4 int(11) NOT NULL,
filler char(82),
PRIMARY KEY (pk1,pk2,pk3,pk4)
) DEFAULT CHARSET=latin1;
insert into t2 select 1, A.a+10*B.a, 432, 44, 'fillerZ' from t1 A, t1 B;
INSERT INTO t2 VALUES (2621, 2635, 0, 0,'filler'), (2621, 2635, 1, 0,'filler'),
(2621, 2635, 10, 0,'filler'), (2621, 2635, 11, 0,'filler'),
(2621, 2635, 14, 0,'filler'), (2621, 2635, 1000015, 0,'filler');
SELECT * FROM t2
WHERE ((((pk4 =0) AND (pk1 =2621) AND (pk2 =2635)))
OR ((pk4 =1) AND (((pk1 IN ( 7, 2, 1 ))) OR (pk1 =522)) AND ((pk2 IN ( 0, 2635))))
) AND (pk3 >=1000000);
pk1	pk2	pk3	pk4	filler
2621	2635	1000015	0	filler
drop table t1, t2;
create table t1(a char(2), key(a(1)));
insert into t1 values ('x'), ('xx');
explain select a from t1 where a > 'x';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	2	NULL	2	Using where
select a from t1 where a > 'x';
a
xx
drop table t1;
CREATE TABLE t1 (
OXID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
OXPARENTID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT 'oxrootid',
OXLEFT int NOT NULL DEFAULT '0',
OXRIGHT int NOT NULL DEFAULT '0',
OXROOTID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
PRIMARY KEY  (OXID),
KEY OXNID (OXID),
KEY OXLEFT (OXLEFT),
KEY OXRIGHT (OXRIGHT),
KEY OXROOTID (OXROOTID)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;
INSERT INTO t1 VALUES
('d8c4177d09f8b11f5.52725521','oxrootid',1,40,'d8c4177d09f8b11f5.52725521'),
('d8c4177d151affab2.81582770','d8c4177d09f8b11f5.52725521',2,3,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d206a333d2.74422679','d8c4177d09f8b11f5.52725521',4,5,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d225791924.30714720','d8c4177d09f8b11f5.52725521',6,7,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d2380fc201.39666693','d8c4177d09f8b11f5.52725521',8,9,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d24ccef970.14957924','d8c4177d09f8b11f5.52725521',10,11,
'd8c4177d09f8b11f5.52725521');
EXPLAIN
SELECT s.oxid FROM t1 v, t1 s 
WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	v	ref	OXLEFT,OXRIGHT,OXROOTID	OXROOTID	34	const	5	Using index condition
1	SIMPLE	s	ALL	OXLEFT	NULL	NULL	NULL	6	Range checked for each record (index map: 0x4)
SELECT s.oxid FROM t1 v, t1 s 
WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
oxid
d8c4177d151affab2.81582770
d8c4177d206a333d2.74422679
d8c4177d225791924.30714720
d8c4177d2380fc201.39666693
d8c4177d24ccef970.14957924
DROP TABLE t1;
create table t1 (
c1  char(10), c2  char(10), c3  char(10), c4  char(10),
c5  char(10), c6  char(10), c7  char(10), c8  char(10),
c9  char(10), c10 char(10), c11 char(10), c12 char(10),
c13 char(10), c14 char(10), c15 char(10), c16 char(10),
index(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,c13,c14,c15,c16)
);
insert into t1 (c1) values ('1'),('1'),('1'),('1');
select * from t1 where
c1 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4",
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c2 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4", 
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c3 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4", 
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c4 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4", 
"abcdefg5", "123456785", "qwertyui5", "asddfg5", 
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c5 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4",
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c6 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4",
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c7 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4", 
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c8 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4", 
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c9 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4", 
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC")
and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh", 
"abcdefg1", "123456781", "qwertyui1", "asddfg1", 
"abcdefg2", "123456782", "qwertyui2", "asddfg2", 
"abcdefg3", "123456783", "qwertyui3", "asddfg3", 
"abcdefg4", "123456784", "qwertyui4", "asddfg4", 
"abcdefg5", "123456785", "qwertyui5", "asddfg5",
"abcdefg6", "123456786", "qwertyui6", "asddfg6",
"abcdefg7", "123456787", "qwertyui7", "asddfg7",
"abcdefg8", "123456788", "qwertyui8", "asddfg8",
"abcdefg9", "123456789", "qwertyui9", "asddfg9",
"abcdefgA", "12345678A", "qwertyuiA", "asddfgA",
"abcdefgB", "12345678B", "qwertyuiB", "asddfgB",
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC");
c1	c2	c3	c4	c5	c6	c7	c8	c9	c10	c11	c12	c13	c14	c15	c16
drop table t1;
End of 4.1 tests
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
status varchar(20),
PRIMARY KEY  (id),
KEY (status)
);
INSERT INTO t1 VALUES
(1,'B'), (2,'B'), (3,'B'), (4,'B'), (5,'B'), (6,'B'),
(7,'B'), (8,'B'), (9,'B'), (10,'B'), (11,'B'), (12,'B'),
(13,'B'), (14,'B'), (15,'B'), (16,'B'), (17,'B'), (18,'B'),
(19,'B'), (20,'B'), (21,'B'), (22,'B'), (23,'B'), (24,'B'), 
(25,'A'), (26,'A'), (27,'A'), (28,'A'), (29,'A'), (30,'A'),
(31,'A'), (32,'A'), (33,'A'), (34,'A'), (35,'A'), (36,'A'),
(37,'A'), (38,'A'), (39,'A'), (40,'A'), (41,'A'), (42,'A'),
(43,'A'), (44,'A'), (45,'A'), (46,'A'), (47,'A'), (48,'A'),
(49,'A'), (50,'A'), (51,'A'), (52,'A'), (53,'C'), (54,'C'),
(55,'C'), (56,'C'), (57,'C'), (58,'C'), (59,'C'), (60,'C');
EXPLAIN SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	status	status	23	NULL	11	Using index condition
EXPLAIN SELECT * FROM t1 WHERE status NOT IN ('A','B');
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	status	status	23	NULL	11	Using index condition
SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';
id	status
53	C
54	C
55	C
56	C
57	C
58	C
59	C
60	C
SELECT * FROM t1 WHERE status NOT IN ('A','B');
id	status
53	C
54	C
55	C
56	C
57	C
58	C
59	C
60	C
EXPLAIN SELECT status FROM t1 WHERE status <> 'A' AND status <> 'B';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	status	status	23	NULL	11	Using where; Using index
EXPLAIN SELECT status FROM t1 WHERE status NOT IN ('A','B');
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	status	status	23	NULL	11	Using where; Using index
EXPLAIN SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	status	status	23	NULL	10	Using index condition
EXPLAIN SELECT * FROM t1 WHERE status < 'A' OR status > 'B';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	status	status	23	NULL	10	Using index condition
SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';
id	status
53	C
54	C
55	C
56	C
57	C
58	C
59	C
60	C
SELECT * FROM t1 WHERE status < 'A' OR status > 'B';
id	status
53	C
54	C
55	C
56	C
57	C
58	C
59	C
60	C
DROP TABLE t1;
CREATE TABLE  t1 (a int, b int, primary key(a,b));
INSERT INTO  t1 VALUES
(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3),(4,1),(4,2),(4,3);
CREATE VIEW v1 as SELECT a,b FROM t1 WHERE b=3;
EXPLAIN SELECT a,b FROM t1 WHERE a < 2 and b=3;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
EXPLAIN SELECT a,b FROM v1 WHERE a < 2 and b=3;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
EXPLAIN SELECT a,b FROM t1 WHERE a < 2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
EXPLAIN SELECT a,b FROM v1 WHERE a < 2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
SELECT a,b FROM t1 WHERE a < 2 and b=3;
a	b
1	3
SELECT a,b FROM v1 WHERE a < 2 and b=3;
a	b
1	3
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (name varchar(15) NOT NULL, KEY idx(name));
INSERT INTO t1 VALUES ('Betty'), ('Anna');
SELECT * FROM t1;
name
Anna
Betty
DELETE FROM t1 WHERE name NOT LIKE 'A%a';
SELECT * FROM t1;
name
Anna
DROP TABLE t1;
CREATE TABLE t1 (a int, KEY idx(a));
INSERT INTO t1 VALUES (NULL), (1), (2), (3);
SELECT * FROM t1;
a
NULL
1
2
3
DELETE FROM t1 WHERE NOT(a <=> 2);
SELECT * FROM t1;
a
2
DROP TABLE t1;
create table t1 (a int, b int, primary key(a,b));
create view v1 as select a, b from t1;
INSERT INTO `t1` VALUES
(0,0),(1,0),(2,0),(3,0),(4,0),(5,1),(6,1),(7,1),(8,1),(9,1),(10,2),(11,2),(12,2)
,(13,2),(14,2),(15,3),(16,3),(17,3),(18,3),(19,3);
explain select * from t1 where a in (3,4)  and b in (1,2,3);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	8	NULL	#	Using where; Using index
explain select * from v1 where a in (3,4)  and b in (1,2,3);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	8	NULL	#	Using where; Using index
explain select * from t1 where a between 3 and 4 and b between 1 and 2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	8	NULL	#	Using where; Using index
explain select * from v1 where a between 3 and 4 and b between 1 and 2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	8	NULL	#	Using where; Using index
drop view v1;
drop table t1;
create table t3 (a int);
insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a varchar(10), filler char(200), key(a)) charset=binary;
insert into t1 values ('a','');
insert into t1 values ('a ','');
insert into t1 values ('a  ', '');
insert into t1 select concat('a', 1000 + A.a + 10 * (B.a + 10 * C.a)), ''
  from t3 A, t3 B, t3 C;
create table t2 (a varchar(10), filler char(200), key(a));
insert into t2 select * from t1;
explain select * from t1 where a between 'a' and 'a ';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	13	NULL	#	Using index condition
explain select * from t1 where a = 'a' or a='a ';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	13	NULL	#	Using index condition
explain select * from t2 where a between 'a' and 'a ';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	ref	a	a	13	const	#	Using index condition
explain select * from t2 where a = 'a' or a='a ';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	ref	a	a	13	const	#	Using index condition
update t1 set a='b' where a<>'a';
explain select * from t1 where a not between 'b' and 'b';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	13	NULL	#	Using index condition
select a, hex(filler) from t1 where a not between 'b' and 'b';
a	hex(filler)
a	0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
drop table t1,t2,t3;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, key(a));
insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C;
set @a="select * from t2 force index (a) where a NOT IN(0";
select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z;
count(*)
1000
set @a=concat(@a, ')');
insert into t2 values (11),(13),(15);
set @b= concat("explain ", @a);
prepare stmt1 from @b;
execute stmt1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	index	a	a	5	NULL	1003	Using where; Using index
prepare stmt1 from @a;
execute stmt1;
a
11
13
15
drop table t1, t2;
CREATE TABLE t1 (
id int NOT NULL DEFAULT '0',
b int NOT NULL DEFAULT '0',
c int NOT NULL DEFAULT '0', 
INDEX idx1(b,c), INDEX idx2(c));
INSERT INTO t1(id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
INSERT INTO t1(b,c) VALUES (3,4), (3,4);
SELECT * FROM t1 WHERE b<=3 AND 3<=c;
id	b	c
0	3	4
0	3	4
SELECT * FROM t1 WHERE 3 BETWEEN b AND c;
id	b	c
0	3	4
0	3	4
EXPLAIN  SELECT * FROM t1 WHERE b<=3 AND 3<=c;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	idx1,idx2	idx2	4	NULL	3	Using index condition; Using where
EXPLAIN  SELECT * FROM t1 WHERE 3 BETWEEN b AND c;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	idx1,idx2	idx2	4	NULL	3	Using where
SELECT * FROM t1 WHERE 0 < b OR 0 > c;
id	b	c
0	3	4
0	3	4
SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;
id	b	c
0	3	4
0	3	4
EXPLAIN SELECT * FROM t1 WHERE 0 < b OR 0 > c;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	idx1,idx2	NULL	NULL	NULL	10	Using where
EXPLAIN SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	idx1,idx2	NULL	NULL	NULL	10	Using where
DROP TABLE t1;
CREATE TABLE t1 (                                      
item char(20) NOT NULL default '',                          
started datetime NOT NULL default '0000-00-00 00:00:00', 
price decimal(16,3) NOT NULL default '0.000',                 
PRIMARY KEY (item,started)                     
) ENGINE=MyISAM;
INSERT INTO t1 VALUES
('A1','2005-11-01 08:00:00',1000),
('A1','2005-11-15 00:00:00',2000),
('A1','2005-12-12 08:00:00',3000),
('A2','2005-12-01 08:00:00',1000);
EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	PRIMARY	PRIMARY	20	const	2	Using index condition
Warnings:
Warning	1292	Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
Warning	1292	Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
item	started	price
A1	2005-11-01 08:00:00	1000.000
A1	2005-11-15 00:00:00	2000.000
Warnings:
Warning	1292	Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
Warning	1292	Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
item	started	price
A1	2005-11-01 08:00:00	1000.000
A1	2005-11-15 00:00:00	2000.000
DROP INDEX `PRIMARY` ON t1;
EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	4	Using where
Warnings:
Warning	1292	Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
item	started	price
A1	2005-11-01 08:00:00	1000.000
A1	2005-11-15 00:00:00	2000.000
Warnings:
Warning	1292	Incorrect datetime value: '2005-12-01 24:00:00' for column 'started' at row 1
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
item	started	price
A1	2005-11-01 08:00:00	1000.000
A1	2005-11-15 00:00:00	2000.000
DROP TABLE t1;

BUG#32198 "Comparison of DATE with DATETIME still not using indexes correctly"

CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
dateval date default NULL,
PRIMARY KEY  (id),
KEY dateval (dateval)
) AUTO_INCREMENT=173;
INSERT INTO t1 VALUES
(1,'2007-01-01'),(2,'2007-01-02'),(3,'2007-01-03'),(4,'2007-01-04'),
(5,'2007-01-05'),(6,'2007-01-06'),(7,'2007-01-07'),(8,'2007-01-08'),
(9,'2007-01-09'),(10,'2007-01-10'),(11,'2007-01-11');
This must use range access:
explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= '2007-01-02 23:59:59';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	dateval	dateval	4	NULL	2	Using index condition
drop table t1;
CREATE TABLE t1 (
a varchar(32), index (a)
) DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
INSERT INTO t1 VALUES
('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A');
SELECT a FROM t1 WHERE a='b' OR a='B';
a
B
B
EXPLAIN SELECT a FROM t1 WHERE a='b' OR a='B';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	35	NULL	3	Using where; Using index
DROP TABLE t1;
CREATE TABLE t1 (f1 TINYINT(11) UNSIGNED NOT NULL, PRIMARY KEY (f1));
INSERT INTO t1 VALUES (127),(254),(0),(1),(255);
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 < 256;
COUNT(*)
5
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 < 256.0;
COUNT(*)
5
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 < 255;
COUNT(*)
4
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 < -1;
COUNT(*)
0
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 > -1;
COUNT(*)
5
DROP TABLE t1;
CREATE TABLE t1 ( f1 TINYINT(11) NOT NULL, PRIMARY KEY (f1));
INSERT INTO t1 VALUES (127),(126),(0),(-128),(-127);
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 < 128;
COUNT(*)
5
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 < 128.0;
COUNT(*)
5
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 < 127;
COUNT(*)
4
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 > -129;
COUNT(*)
5
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 > -129.0;
COUNT(*)
5
SELECT SQL_NO_CACHE COUNT(*) FROM t1 WHERE f1 > -128;
COUNT(*)
4
DROP TABLE t1;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, b int, filler char(100));
insert into t2 select A.a + 10 * (B.a + 10 * C.a), 10, 'filler' from t1 A,
t1 B, t1 C where A.a < 5;
insert into t2 select 1000, b, 'filler' from t2;
alter table t2 add index (a,b);
select 'In following EXPLAIN the access method should be ref or range, #rows~=500 (and not 2)' Z;
Z
In following EXPLAIN the access method should be ref or range, #rows~=500 (and not 2)
explain select * from t2 where a=1000 and b<11;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	ref	a	a	5	const	502	Using index condition
drop table t1, t2;
CREATE TABLE t1( a INT, b INT, KEY( a, b ) );
CREATE TABLE t2( a INT, b INT, KEY( a, b ) );
CREATE TABLE t3( a INT, b INT, KEY( a, b ) );
INSERT INTO t1( a, b ) 
VALUES (0, 1), (1, 2), (1, 4), (2, 3), (5, 0), (9, 7);
INSERT INTO t2( a, b ) 
VALUES ( 1, 1), ( 2, 1), ( 3, 1), ( 4, 1), ( 5, 1),
( 6, 1), ( 7, 1), ( 8, 1), ( 9, 1), (10, 1), 
(11, 1), (12, 1), (13, 1), (14, 1), (15, 1),
(16, 1), (17, 1), (18, 1), (19, 1), (20, 1);
INSERT INTO t2 SELECT a, 2 FROM t2 WHERE b = 1;
INSERT INTO t2 SELECT a, 3 FROM t2 WHERE b = 1;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t2 SELECT -1, -1 FROM t2;
INSERT INTO t3
VALUES (1, 0), (2, 0), (3, 0), (4, 0), (5, 0),
(6, 0), (7, 0), (8, 0), (9, 0), (10, 0);
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
INSERT INTO t3 SELECT * FROM t3 WHERE a = 10;
SELECT * FROM t1 WHERE
3 <= a AND a < 5 OR 
5 < a AND b = 3 OR
3 <= a;
a	b
5	0
9	7
EXPLAIN
SELECT * FROM t1 WHERE
3 <= a AND a < 5 OR 
5 < a AND b = 3 OR
3 <= a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	5	NULL	3	Using where; Using index
SELECT * FROM t1 WHERE
3 <= a AND a < 5 OR 
5 <= a AND b = 3 OR
3 <= a;
a	b
5	0
9	7
EXPLAIN
SELECT * FROM t1 WHERE
3 <= a AND a < 5 OR 
5 <= a AND b = 3 OR
3 <= a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	5	NULL	4	Using where; Using index
SELECT * FROM t1 WHERE
3 <= a AND a <= 5 OR 
5 <= a AND b = 3 OR
3 <= a;
a	b
5	0
9	7
EXPLAIN
SELECT * FROM t1 WHERE
3 <= a AND a <= 5 OR 
5 <= a AND b = 3 OR
3 <= a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	5	NULL	3	Using where; Using index
SELECT * FROM t1 WHERE
3 <= a AND a <= 5 OR 
3 <= a;
a	b
5	0
9	7
EXPLAIN
SELECT * FROM t1 WHERE
3 <= a AND a <= 5 OR 
3 <= a;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	5	NULL	3	Using where; Using index
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 1 OR
15 <= a AND a < 20 AND b = 3
OR
1 <= a AND b = 1;
a	b
1	1
2	1
3	1
4	1
5	1
6	1
7	1
8	1
9	1
10	1
11	1
12	1
13	1
14	1
15	1
15	3
16	1
16	3
17	1
17	3
18	1
18	3
19	1
19	3
20	1
EXPLAIN
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 1 OR
15 <= a AND a < 20 AND b = 3
OR
1 <= a AND b = 1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	range	a	a	10	NULL	50	Using where; Using index
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 2 OR
15 <= a AND a < 20 AND b = 3
OR
1 <= a AND b = 1;
a	b
1	1
2	1
3	1
4	1
5	1
5	2
6	1
6	2
7	1
7	2
8	1
8	2
9	1
9	2
10	1
11	1
12	1
13	1
14	1
15	1
15	3
16	1
16	3
17	1
17	3
18	1
18	3
19	1
19	3
20	1
EXPLAIN
SELECT * FROM t2 WHERE
5 <= a AND a < 10 AND b = 2 OR
15 <= a AND a < 20 AND b = 3
OR
1 <= a AND b = 1;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	range	a	a	10	NULL	50	Using where; Using index
SELECT * FROM t3 WHERE
5 <= a AND a < 10 AND b = 3 OR 
a < 5 OR
a < 10;
a	b
1	0
2	0
3	0
4	0
5	0
6	0
7	0
8	0
9	0
EXPLAIN
SELECT * FROM t3 WHERE
5 <= a AND a < 10 AND b = 3 OR 
a < 5 OR
a < 10;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t3	range	a	a	5	NULL	8	Using where; Using index
DROP TABLE t1, t2, t3;
#
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
#
CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES (1), (NULL);
SELECT * FROM t1 WHERE a <> NULL and (a <> NULL or a <= NULL);
a
DROP TABLE t1;
#
# Bug#47925: regression of range optimizer and date comparison in 5.1.39!
#
CREATE TABLE t1 ( a DATE,     KEY ( a ) );
CREATE TABLE t2 ( a DATETIME, KEY ( a ) );
# Make optimizer choose range scan
INSERT INTO t1 VALUES ('2009-09-22'), ('2009-09-22'), ('2009-09-22');
INSERT INTO t1 VALUES ('2009-09-23'), ('2009-09-23'), ('2009-09-23');
INSERT INTO t2 VALUES ('2009-09-22 12:00:00'), ('2009-09-22 12:00:00'),
('2009-09-22 12:00:00');
INSERT INTO t2 VALUES ('2009-09-23 12:00:00'), ('2009-09-23 12:00:00'),
('2009-09-23 12:00:00');
# DATE vs DATE
EXPLAIN
SELECT * FROM t1 WHERE a >= '2009/09/23';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
X	X	X	range	a	a	X	X	X	X
SELECT * FROM t1 WHERE a >= '2009/09/23';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '20090923';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >=  20090923;
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '2009-9-23';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '2009.09.23';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '2009:09:23';
a
2009-09-23
2009-09-23
2009-09-23
# DATE vs DATETIME
EXPLAIN
SELECT * FROM t2 WHERE a >= '2009/09/23';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
X	X	X	range	a	a	X	X	X	X
SELECT * FROM t2 WHERE a >= '2009/09/23';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '2009/09/23';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '20090923';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >=  20090923;
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '2009-9-23';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '2009.09.23';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '2009:09:23';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
# DATETIME vs DATETIME
EXPLAIN
SELECT * FROM t2 WHERE a >= '2009/09/23 12:00:00';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
X	X	X	range	a	a	X	X	X	X
SELECT * FROM t2 WHERE a >= '2009/09/23 12:00:00';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '20090923120000';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >=  20090923120000;
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '2009-9-23 12:00:00';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '2009.09.23 12:00:00';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
SELECT * FROM t2 WHERE a >= '2009:09:23 12:00:00';
a
2009-09-23 12:00:00
2009-09-23 12:00:00
2009-09-23 12:00:00
# DATETIME vs DATE
EXPLAIN
SELECT * FROM t1 WHERE a >= '2009/09/23 00:00:00';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
X	X	X	range	a	a	X	X	X	X
SELECT * FROM t1 WHERE a >= '2009/09/23 00:00:00';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '2009/09/23 00:00:00';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '20090923000000';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >=  20090923000000;
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '2009-9-23 00:00:00';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '2009.09.23 00:00:00';
a
2009-09-23
2009-09-23
2009-09-23
SELECT * FROM t1 WHERE a >= '2009:09:23 00:00:00';
a
2009-09-23
2009-09-23
2009-09-23
# Test of the new get_date_from_str implementation
# Behavior differs slightly between the trunk and mysql-pe.
# The former may give errors for the truncated values, while the latter
# gives warnings. The purpose of this test is not to interfere, and only
# preserve existing behavior.
SELECT str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND 
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND 
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20'
1
Warnings:
Warning	1292	Truncated incorrect date value: ''
SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND 
str_to_date('2007-20-00', '%Y-%m-%d') <= '';
str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND 
str_to_date('2007-20-00', '%Y-%m-%d') <= ''
NULL
Warnings:
Warning	1292	Truncated incorrect date value: ''
Warning	1411	Incorrect datetime value: '2007-20-00' for function str_to_date
Warning	1411	Incorrect datetime value: '2007-20-00' for function str_to_date
SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20'
1
Warnings:
Warning	1292	Truncated incorrect datetime value: ''
SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '';
str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND ''
NULL
Warnings:
Warning	1411	Incorrect datetime value: '2007-20-00' for function str_to_date
SELECT str_to_date('', '%Y-%m-%d');
str_to_date('', '%Y-%m-%d')
0000-00-00
DROP TABLE t1, t2;
#
# Bug#48459: valgrind errors with query using 'Range checked for each 
# record'
#
CREATE TABLE t1 (
a INT,
b CHAR(2),
c INT,
d INT,
KEY ( c ),
KEY ( d, a, b ( 2 ) ),
KEY ( b ( 1 ) )
);
INSERT INTO t1 VALUES ( NULL, 'a', 1, 2 ), ( NULL, 'a', 1, 2 ),
( 1,    'a', 1, 2 ), ( 1,    'a', 1, 2 );
CREATE TABLE t2 (
a INT,
c INT,
e INT,
KEY ( e )
);
INSERT INTO t2 VALUES ( 1, 1, NULL ), ( 1, 1, NULL );
# Should not give Valgrind warnings
SELECT 1
FROM t1, t2
WHERE t1.d <> '1' AND t1.b > '1'
AND t1.a = t2.a AND t1.c = t2.c;
1
1
1
1
1
DROP TABLE t1, t2;
#
# Bug #48665: sql-bench's insert test fails due to wrong result
#
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a));
INSERT INTO t1 VALUES (0,0), (1,1);
EXPLAIN 
SELECT * FROM t1 FORCE INDEX (PRIMARY) 
WHERE (a>=1 AND a<=2) OR (a>=4 AND a<=5) OR (a>=0 AND a <=10);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
@	@	@	range	@	@	@	@	@	@
# Should return 2 rows
SELECT * FROM t1 FORCE INDEX (PRIMARY) 
WHERE (a>=1 AND a<=2) OR (a>=4 AND a<=5) OR (a>=0 AND a <=10);
a	b
0	0
1	1
DROP TABLE t1;
#
# Bug #54802: 'NOT BETWEEN' evaluation is incorrect
#
CREATE TABLE t1 (c_key INT, c_notkey INT, KEY(c_key));
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
EXPLAIN SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	c_key	NULL	NULL	NULL	3	Using where
SELECT * FROM t1 WHERE 2 NOT BETWEEN c_notkey AND c_key;
c_key	c_notkey
1	1
3	3
DROP TABLE t1;
#
# Bug #57030: 'BETWEEN' evaluation is incorrect
#
CREATE TABLE t1(pk INT PRIMARY KEY, i4 INT);
CREATE UNIQUE INDEX i4_uq ON t1(i4);
INSERT INTO t1 VALUES (1,10), (2,20), (3,30);
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 10;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	const	i4_uq	i4_uq	5	const	1	NULL
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 10;
pk	i4
1	10
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND i4;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	const	i4_uq	i4_uq	5	const	1	NULL
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND i4;
pk	i4
1	10
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	i4_uq	i4_uq	5	NULL	3	Using index condition
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND i4;
pk	i4
1	10
2	20
3	30
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND 10;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	i4_uq	i4_uq	5	NULL	1	Using index condition
SELECT * FROM t1 WHERE 10 BETWEEN i4 AND 10;
pk	i4
1	10
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND 10;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	NULL
SELECT * FROM t1 WHERE 10 BETWEEN 10 AND 10;
pk	i4
1	10
2	20
3	30
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 11 AND 11;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
SELECT * FROM t1 WHERE 10 BETWEEN 11 AND 11;
pk	i4
EXPLAIN
SELECT * FROM t1 WHERE 10 BETWEEN 100 AND 0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
SELECT * FROM t1 WHERE 10 BETWEEN 100 AND 0;
pk	i4
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 100 AND 0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
SELECT * FROM t1 WHERE i4 BETWEEN 100 AND 0;
pk	i4
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	i4_uq	i4_uq	5	NULL	3	Using index condition
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND 99999999999999999;
pk	i4
1	10
2	20
3	30
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 999999999999999 AND 30;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
SELECT * FROM t1 WHERE i4 BETWEEN 999999999999999 AND 30;
pk	i4
EXPLAIN
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND '20';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	i4_uq	i4_uq	5	NULL	1	Using index condition
SELECT * FROM t1 WHERE i4 BETWEEN 10 AND '20';
pk	i4
1	10
2	20
EXPLAIN
SELECT * FROM t1, t1 as t2 WHERE t2.pk BETWEEN t1.i4 AND t1.i4;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	i4_uq	NULL	NULL	NULL	3	NULL
1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	4	test.t1.i4	1	Using index condition
SELECT * FROM t1, t1 as t2 WHERE t2.pk BETWEEN t1.i4 AND t1.i4;
pk	i4	pk	i4
EXPLAIN
SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	i4_uq	NULL	NULL	NULL	3	NULL
1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	4	test.t1.i4	1	Using index condition
SELECT * FROM t1, t1 as t2 WHERE t1.i4 BETWEEN t2.pk AND t2.pk;
pk	i4	pk	i4
DROP TABLE t1;
#
# BUG#13519696 - 62940: SELECT RESULTS VARY WITH VERSION AND
# WITH/WITHOUT INDEX RANGE SCAN
#
create table t1 (id int unsigned not null auto_increment primary key);
insert into t1 values (null);
insert into t1 select null from t1;
insert into t1 select null from t1;
insert into t1 select null from t1;
insert into t1 select null from t1;
insert into t1 select null from t1;
insert into t1 select null from t1;
insert into t1 select null from t1;
insert into t1 select null from t1;
create table t2 (
id int unsigned not null auto_increment,
val decimal(5,3) not null,
primary key (id,val),
unique key (val,id),
unique key (id));
insert into t2 select null,id*0.0009 from t1;
select count(val) from t2 ignore index (val) where val > 0.1155;
count(val)
128
select count(val) from t2 force index (val)  where val > 0.1155;
count(val)
128
drop table t2, t1;
#
# BUG#13453382 - REGRESSION SINCE 5.1.39, RANGE OPTIMIZER WRONG
# RESULTS WITH DECIMAL CONVERSION
#
create table t1 (a int,b int,c int,primary key (a,c));
insert into t1 values (1,1,2),(1,1,3),(1,1,4);
select convert(3, signed integer) > 2.9;
convert(3, signed integer) > 2.9
1
select * from t1 force  index (primary) where a=1 and c>= 2.9;
a	b	c
1	1	3
1	1	4
select * from t1 ignore index (primary) where a=1 and c>= 2.9;
a	b	c
1	1	3
1	1	4
select * from t1 force  index (primary) where a=1 and c> 2.9;
a	b	c
1	1	3
1	1	4
select * from t1 ignore index (primary) where a=1 and c> 2.9;
a	b	c
1	1	3
1	1	4
drop table t1;
#
# BUG#13463488 - 63437: CHAR & BETWEEN WITH INDEX RETURNS WRONG
# RESULT AFTER MYSQL 5.1.
#
CREATE TABLE t1(
F1 CHAR(5) NOT NULL,
F2 CHAR(5) NOT NULL,
F3 CHAR(5) NOT NULL,
PRIMARY KEY(F1),
INDEX IDX_F2(F2)
);
INSERT INTO t1 VALUES
('A','A','A'),('AA','AA','AA'),('AAA','AAA','AAA'),
('AAAA','AAAA','AAAA'),('AAAAA','AAAAA','AAAAA');
SELECT * FROM t1 WHERE F1 = 'A    ';
F1	F2	F3
A	A	A
SELECT * FROM t1 IGNORE INDEX(PRIMARY) WHERE F1 = 'A    ';
F1	F2	F3
A	A	A
SELECT * FROM t1 WHERE F1 >= 'A    ';
F1	F2	F3
A	A	A
AA	AA	AA
AAA	AAA	AAA
AAAA	AAAA	AAAA
AAAAA	AAAAA	AAAAA
SELECT * FROM t1 WHERE F1 > 'A    ';
F1	F2	F3
AA	AA	AA
AAA	AAA	AAA
AAAA	AAAA	AAAA
AAAAA	AAAAA	AAAAA
SELECT * FROM t1 WHERE F1 BETWEEN 'A    ' AND 'AAAAA';
F1	F2	F3
A	A	A
AA	AA	AA
AAA	AAA	AAA
AAAA	AAAA	AAAA
AAAAA	AAAAA	AAAAA
SELECT * FROM t1 WHERE F2 BETWEEN 'A    ' AND 'AAAAA';
F1	F2	F3
A	A	A
AA	AA	AA
AAA	AAA	AAA
AAAA	AAAA	AAAA
AAAAA	AAAAA	AAAAA
SELECT * FROM t1 WHERE F3 BETWEEN 'A    ' AND 'AAAAA';
F1	F2	F3
A	A	A
AA	AA	AA
AAA	AAA	AAA
AAAA	AAAA	AAAA
AAAAA	AAAAA	AAAAA
SELECT * FROM t1 IGNORE INDEX(PRIMARY) WHERE F1 BETWEEN 'A    ' AND
'AAAAA';
F1	F2	F3
A	A	A
AA	AA	AA
AAA	AAA	AAA
AAAA	AAAA	AAAA
AAAAA	AAAAA	AAAAA
DROP TABLE t1;
End of 5.1 tests
CREATE TABLE t1 (c1 DECIMAL(10,0),INDEX(c1));
INSERT INTO t1 VALUES (1),(2),(3);
SELECT c1 FROM t1 WHERE c1 >= 'A' GROUP BY 1;
c1
1
2
3
Warnings:
Warning	1366	Incorrect decimal value: 'A' for column 'c1' at row 1
Warning	1292	Truncated incorrect DOUBLE value: 'A'
DROP TABLE t1;
create table t1 (a int,b int,key (b),key (a),key (b,a));
insert into t1(a,b) values (1,2),(3,4),(5,6),(7,8);
create table t2 (c int);
insert into t2(c) values (1),(5),(6),(7),(8);
select 1 from (select c from t1,t2 where b >= 1 and a <=> c group by 1 limit 1) as d1;
1
1
drop table t1, t2;
#
# Bug #26106: Wrong plan may be chosen when there are several possible
# range and ref accesses
#
# Note: The fix for this bug has been reverted. The code will no longer
# select the optimal plan for the two following test queries. This is
# not due to a bug but due to minor differences in range estimates
# produced by the storage engine.
CREATE TABLE t1( 
a INT,
b INT,
KEY k ( a ),
KEY l ( a, b )
);
INSERT INTO t1(a) VALUES (1);
INSERT INTO t1 
VALUES (2,3),(2,3),(2,3),(2,3),(2,3),(2,3),(2,3),(2,3),(2,3),(2,3);
INSERT INTO t1 SELECT 3, 4 FROM t1 WHERE a = 2 AND b = 3;
INSERT INTO t1 SELECT 4, 1 FROM t1 WHERE a = 2 AND b = 3;
ANALYZE TABLE t1;
Table	Op	Msg_type	Msg_text
test.t1	analyze	status	OK
INSERT INTO t1 VALUES (1, 2);
INSERT INTO t1 SELECT a, b FROM t1 WHERE a=1 AND b=2;
INSERT INTO t1 SELECT a, b FROM t1 WHERE a=1 AND b=2;
INSERT INTO t1 SELECT a, b FROM t1 WHERE a=1 AND b=2;
INSERT INTO t1 SELECT a, b FROM t1 WHERE a=1 AND b=2;
INSERT INTO t1 SELECT a, b FROM t1 WHERE a=1 AND b=2;
INSERT INTO t1 SELECT a, b FROM t1 WHERE a=1 AND b=2;
INSERT INTO t1 SELECT a, b FROM t1 WHERE a=1 AND b=2;
# This must use range over index l, not k.
# Update: Due to patch being reverted and minor differences in 
#         range estimates k is selected.
EXPLAIN SELECT * FROM t1 WHERE a = 1 AND b >= 2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	k,l	k	5	const	134	Using where
CREATE TABLE t2( 
a INT, 
b INT, 
c INT,
KEY k ( a ), 
KEY l ( a, b ),
KEY m ( b ), 
KEY n ( a, c )
);
INSERT INTO t2(a) VALUES (1);
INSERT INTO t2 
VALUES (2,3,3),(2,3,3),(2,3,3),(2,3,3),(2,3,3),
(2,3,3),(2,3,3),(2,3,3),(2,3,3),(2,3,3);
INSERT INTO t2 SELECT 3, 4, 4 FROM t2 WHERE a = 2 AND b = 3;
INSERT INTO t2 SELECT 4, 1, 1 FROM t2 WHERE a = 2 AND b = 3;
ANALYZE TABLE t2;
Table	Op	Msg_type	Msg_text
test.t2	analyze	status	OK
INSERT INTO t2 VALUES (1, 2, 2);
INSERT INTO t2 SELECT a, b, c FROM t2 WHERE a=1 AND b=2;
INSERT INTO t2 SELECT a, b, c FROM t2 WHERE a=1 AND b=2;
INSERT INTO t2 SELECT a, b, c FROM t2 WHERE a=1 AND b=2;
INSERT INTO t2 SELECT a, b, c FROM t2 WHERE a=1 AND b=2;
INSERT INTO t2 SELECT a, b, c FROM t2 WHERE a=1 AND b=2;
INSERT INTO t2 SELECT a, b, c FROM t2 WHERE a=1 AND b=2;
INSERT INTO t2 VALUES (1, 1, 2);
# This must use range over index l, not n.
# Update: Due to patch being reverted and minor differences in 
#         range estimates k is selected.
EXPLAIN SELECT * FROM t2 WHERE a = 1 AND b >= 2 AND c >= 2;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	ref	k,l,m,n	k	5	const	66	Using where
DROP TABLE t1, t2;
#
# BUG#11765831: 'RANGE ACCESS' MAY INCORRECTLY FILTER 
#               AWAY QUALIFYING ROWS
#
CREATE TABLE t10(
K INT NOT NULL AUTO_INCREMENT,
I INT, J INT,
PRIMARY KEY(K),
KEY(I,J)
);
INSERT INTO t10(I,J) VALUES (6,1),(6,2),(6,3),(6,4),(6,5),
(6,6),(6,7),(6,8),(6,9),(6,0);
CREATE TABLE t100 LIKE t10;
INSERT INTO t100(I,J) SELECT X.I, X.K+(10*Y.K) FROM t10 AS X,t10 AS Y;
INSERT INTO t100(I,J) VALUES(8,26);

EXPLAIN SELECT * FROM t100 WHERE I <> 6 OR (I <> 8 AND J = 5);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t100	range	I	I	10	NULL	4	Using index condition

SELECT * FROM t100 WHERE I <> 6 OR (I <> 8 AND J = 5);
K	I	J
101	8	26
DROP TABLE t10,t100;
#
# BUG#12698916 - JOIN QUERY GIVES WRONG RESULT AT 2ND EXEC. OR
# AFTER FLUSH TABLES [-INT VS NULL]
#
CREATE TABLE t1 (col_int INT, pk INT) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 VALUES (-100,1),(1,6);
CREATE TABLE t2 (
col_int_key INT,
col_varchar VARCHAR(100) NOT NULL DEFAULT "DEFAULT",
pk INT NOT NULL,
PRIMARY KEY (pk),
KEY (col_int_key)
) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t2 VALUES
(1,"GOOD",1),(100,"",2),(200,"",3),(300,"",4),(400,"",5),(500,"",8);
EXPLAIN SELECT t1.*,t2.* FROM t1 straight_join t2
ON t2.col_int_key = t1.col_int WHERE t2.pk < t1.pk;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using where
1	SIMPLE	t2	ref	PRIMARY,col_int_key	col_int_key	5	test.t1.col_int	1	Using index condition
SELECT t1.*,t2.* FROM t1 straight_join t2
ON t2.col_int_key = t1.col_int WHERE t2.pk < t1.pk;
col_int	pk	col_int_key	col_varchar	pk
1	6	1	GOOD	1
# need FLUSH so that InnoDB statistics change and thus plan changes
FLUSH TABLES;
EXPLAIN SELECT t1.*,t2.* FROM t1 straight_join t2
ON t2.col_int_key = t1.col_int WHERE t2.pk < t1.pk;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	NULL
1	SIMPLE	t2	ALL	PRIMARY,col_int_key	NULL	NULL	NULL	6	Range checked for each record (index map: 0x3)
SELECT t1.*,t2.* FROM t1 straight_join t2
ON t2.col_int_key = t1.col_int WHERE t2.pk < t1.pk;
col_int	pk	col_int_key	col_varchar	pk
1	6	1	GOOD	1
DROP TABLE t1,t2;
#
# Bug#12694872 - 
# VALGRIND: 18,816 BYTES IN 196 BLOCKS ARE DEFINITELY LOST IN UNIQUE::GET
#
CREATE TABLE t1 (
pk INTEGER AUTO_INCREMENT,
col_int_nokey INTEGER NOT NULL,
col_int_key INTEGER NOT NULL,
col_date_key DATE NOT NULL,
col_varchar_key VARCHAR(1) NOT NULL,
col_varchar_nokey VARCHAR(1) NOT NULL,
PRIMARY KEY (pk),
KEY (col_int_key),
KEY (col_date_key),
KEY (col_varchar_key, col_int_key)
);
INSERT INTO t1 (
col_int_key,
col_int_nokey,
col_date_key,
col_varchar_key,
col_varchar_nokey
) VALUES 
(0, 4, '2011-08-25', 'j', 'j'),
(8, 6, '2004-09-18', 'v', 'v'),
(1, 3, '2009-12-01', 'c', 'c'),
(8, 5, '2004-12-17', 'm', 'm'),
(9, 3, '2000-03-14', 'd', 'd'),
(6, 2, '2006-05-25', 'y', 'y'),
(1, 9, '2008-01-23', 't', 't'),
(6, 3, '2007-06-18', 'd', 'd'),
(2, 8, '2002-10-13', 's', 's'),
(4, 1, '1900-01-01', 'r', 'r'),
(8, 8, '1959-04-25', 'm', 'm'),
(4, 8, '2006-03-09', 'b', 'b'),
(4, 5, '2001-06-05', 'x', 'x'),
(7, 7, '2006-05-28', 'g', 'g'),
(4, 5, '2001-04-19', 'p', 'p'),
(1, 1, '1900-01-01', 'q', 'q'),
(9, 6, '2004-08-20', 'w', 'w'),
(4, 2, '2004-10-10', 'd', 'd'),
(8, 9, '2000-04-02', 'e', 'e')
;
ALTER TABLE t1 DISABLE KEYS;
SELECT table2.col_date_key AS field1,
CONCAT ( table2.col_varchar_nokey, table1.col_varchar_nokey ) AS field2
FROM ( t1 AS table1 INNER JOIN t1 AS table2
ON (( table2.pk <> table1.pk ) AND
( table2.pk >= table1.col_int_nokey ) ) )
WHERE ( table1.pk > 226 AND
table1.pk < ( 226 + 102 ) OR
( table1.col_int_key > 226 AND
table1.col_int_key < ( 226 + 36 ) OR
( table1.col_varchar_key <= 'h' OR
table1.col_int_key > 226 AND
table1.col_int_key < ( 226 + 227 ) )
) 
)
;
field1	field2
1900-01-01	qb
1900-01-01	qc
1900-01-01	qd
1900-01-01	qd
1900-01-01	qd
1900-01-01	qe
1900-01-01	qg
1900-01-01	rb
1900-01-01	rc
1900-01-01	rd
1900-01-01	rd
1900-01-01	rd
1900-01-01	re
1900-01-01	rg
1959-04-25	mb
1959-04-25	mc
1959-04-25	md
1959-04-25	md
1959-04-25	md
1959-04-25	me
1959-04-25	mg
2000-03-14	dc
2000-03-14	dd
2000-03-14	dd
2000-04-02	eb
2000-04-02	ec
2000-04-02	ed
2000-04-02	ed
2000-04-02	ed
2000-04-02	eg
2001-04-19	pb
2001-04-19	pc
2001-04-19	pd
2001-04-19	pd
2001-04-19	pd
2001-04-19	pe
2001-04-19	pg
2001-06-05	xb
2001-06-05	xc
2001-06-05	xd
2001-06-05	xd
2001-06-05	xd
2001-06-05	xe
2001-06-05	xg
2002-10-13	sb
2002-10-13	sc
2002-10-13	sd
2002-10-13	sd
2002-10-13	sd
2002-10-13	se
2002-10-13	sg
2004-08-20	wb
2004-08-20	wc
2004-08-20	wd
2004-08-20	wd
2004-08-20	wd
2004-08-20	we
2004-08-20	wg
2004-09-18	vd
2004-10-10	db
2004-10-10	dc
2004-10-10	dd
2004-10-10	dd
2004-10-10	de
2004-10-10	dg
2004-12-17	mc
2004-12-17	md
2004-12-17	md
2004-12-17	md
2006-03-09	bc
2006-03-09	bd
2006-03-09	bd
2006-03-09	bd
2006-03-09	be
2006-03-09	bg
2006-05-25	yc
2006-05-25	yd
2006-05-25	yd
2006-05-25	yd
2006-05-28	gb
2006-05-28	gc
2006-05-28	gd
2006-05-28	gd
2006-05-28	gd
2006-05-28	ge
2007-06-18	db
2007-06-18	dc
2007-06-18	dd
2007-06-18	dd
2007-06-18	dg
2008-01-23	tc
2008-01-23	td
2008-01-23	td
2008-01-23	td
2008-01-23	tg
2009-12-01	cd
2009-12-01	cd
2009-12-01	cd
ALTER TABLE t1 ENABLE KEYS;
CREATE TABLE t2 SELECT table2.col_date_key AS field1,
CONCAT ( table2.col_varchar_nokey, table1.col_varchar_nokey ) AS field2
FROM ( t1 AS table1 INNER JOIN t1 AS table2
ON (( table2.pk <> table1.pk ) AND
( table2.pk >= table1.col_int_nokey ) ) )
WHERE ( table1.pk > 226 AND
table1.pk < ( 226 + 102 ) OR
( table1.col_int_key > 226 AND
table1.col_int_key < ( 226 + 36 ) OR
( table1.col_varchar_key <= 'h' OR
table1.col_int_key > 226 AND
table1.col_int_key < ( 226 + 227 ) )
) 
)
;
SELECT * FROM t2
WHERE (field1, field2) IN (SELECT table2.col_date_key AS field1,
CONCAT ( table2.col_varchar_nokey, table1.col_varchar_nokey ) AS field2
FROM ( t1 AS table1 INNER JOIN t1 AS table2
ON (( table2.pk <> table1.pk ) AND
( table2.pk >= table1.col_int_nokey ) ) )
WHERE ( table1.pk > 226 AND
table1.pk < ( 226 + 102 ) OR
( table1.col_int_key > 226 AND
table1.col_int_key < ( 226 + 36 ) OR
( table1.col_varchar_key <= 'h' OR
table1.col_int_key > 226 AND
table1.col_int_key < ( 226 + 227 ) )
) 
)
);
field1	field2
1900-01-01	qb
1900-01-01	qc
1900-01-01	qd
1900-01-01	qd
1900-01-01	qd
1900-01-01	qe
1900-01-01	qg
1900-01-01	rb
1900-01-01	rc
1900-01-01	rd
1900-01-01	rd
1900-01-01	rd
1900-01-01	re
1900-01-01	rg
1959-04-25	mb
1959-04-25	mc
1959-04-25	md
1959-04-25	md
1959-04-25	md
1959-04-25	me
1959-04-25	mg
2000-03-14	dc
2000-03-14	dd
2000-03-14	dd
2000-04-02	eb
2000-04-02	ec
2000-04-02	ed
2000-04-02	ed
2000-04-02	ed
2000-04-02	eg
2001-04-19	pb
2001-04-19	pc
2001-04-19	pd
2001-04-19	pd
2001-04-19	pd
2001-04-19	pe
2001-04-19	pg
2001-06-05	xb
2001-06-05	xc
2001-06-05	xd
2001-06-05	xd
2001-06-05	xd
2001-06-05	xe
2001-06-05	xg
2002-10-13	sb
2002-10-13	sc
2002-10-13	sd
2002-10-13	sd
2002-10-13	sd
2002-10-13	se
2002-10-13	sg
2004-08-20	wb
2004-08-20	wc
2004-08-20	wd
2004-08-20	wd
2004-08-20	wd
2004-08-20	we
2004-08-20	wg
2004-09-18	vd
2004-10-10	db
2004-10-10	dc
2004-10-10	dd
2004-10-10	dd
2004-10-10	de
2004-10-10	dg
2004-12-17	mc
2004-12-17	md
2004-12-17	md
2004-12-17	md
2006-03-09	bc
2006-03-09	bd
2006-03-09	bd
2006-03-09	bd
2006-03-09	be
2006-03-09	bg
2006-05-25	yc
2006-05-25	yd
2006-05-25	yd
2006-05-25	yd
2006-05-28	gb
2006-05-28	gc
2006-05-28	gd
2006-05-28	gd
2006-05-28	gd
2006-05-28	ge
2007-06-18	db
2007-06-18	dc
2007-06-18	dd
2007-06-18	dd
2007-06-18	dg
2008-01-23	tc
2008-01-23	td
2008-01-23	td
2008-01-23	td
2008-01-23	tg
2009-12-01	cd
2009-12-01	cd
2009-12-01	cd
DROP TABLE t1, t2;
#
# BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET ==
# SAVE_READ_SET
#
CREATE TABLE t1 (
a INT,
b INT,
c INT,
PRIMARY KEY (c,a), KEY (a),KEY (a)
) ENGINE=INNODB PARTITION BY KEY () PARTITIONS 2;
Warnings:
Note	1831	Duplicate index 'a_2' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
INSERT INTO t1 VALUES (1,5,1),(2,4,1),(3,3,1),(4,2,1),(5,1,1);
UPDATE t1 SET b = 0, c=1 WHERE a <=>0;
SELECT * FROM t1;
a	b	c
1	5	1
2	4	1
3	3	1
4	2	1
5	1	1
DROP TABLE t1;
#
# BUG#13256446 - ASSERTION QUICK->HEAD->READ_SET ==
# SAVE_READ_SET' FAILED IN OPT_RANGE.CC:1606 
#
CREATE TABLE t1 (
f1 INT AUTO_INCREMENT,
f2 INT,
f3 INT,
f4 INT,
PRIMARY KEY (f1),KEY(f2)
) ENGINE=INNODB;
CREATE ALGORITHM=MERGE VIEW v2 AS SELECT f1,f2,f3,f4 FROM t1 WHERE f2=103;
INSERT INTO t1 VALUES (154,0,NULL,0),(0,NULL,9,0),
(NULL,102,NULL,3),(0,3,NULL,0), (9,0,NULL,0),(0,9,NULL,157);
SELECT * FROM v2;
f1	f2	f3	f4
UPDATE v2 SET f4=0, f2=NULL, f1=NULL WHERE f1 > 16 ORDER BY f1;
SELECT * FROM v2;
f1	f2	f3	f4
DROP TABLE t1;
DROP VIEW v2;
CREATE TABLE t1 (
f1 INT AUTO_INCREMENT,
f2 INT,
f3 INT,
f4 INT,
PRIMARY KEY (f1),KEY(f2)
) ENGINE=INNODB;
INSERT INTO t1 VALUES(1,NULL,NULL,0), (2,2,0,3), (9,0,107,18),
(10,0,0,0), (231,0,0,0), (232,0,8,0), (234,0,0,NULL), (235,8,0,3);
CREATE ALGORITHM=MERGE VIEW v3 AS SELECT f1,f2,f3,f4 FROM t1 WHERE f1<=85 ;
SELECT * FROM v3;
f1	f2	f3	f4
1	NULL	NULL	0
2	2	0	3
9	0	107	18
10	0	0	0
UPDATE v3 SET f3=0, f4=4 WHERE f2=68 ORDER BY f1;
SELECT * FROM v3;
f1	f2	f3	f4
1	NULL	NULL	0
2	2	0	3
9	0	107	18
10	0	0	0
DROP TABLE t1;
DROP VIEW v3;
#
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
#
CREATE TABLE t1 (pk INT PRIMARY KEY);
INSERT INTO t1 VALUES (1),(3),(5);
SELECT * FROM t1 WHERE pk <> 3 OR pk < 4;
pk
1
3
5
DROP TABLE t1;
#
# BUG#13803810: TOO FEW ROWS RETURNED FOR RANGE ACCESS IN 
#               VARCHAR INDEX USING DATETIME VALUE

CREATE TABLE t1 (a DATETIME);
INSERT INTO t1 VALUES ('2001-01-01 00:00:00');
INSERT INTO t1 VALUES ('2001-01-01 11:22:33');
CREATE TABLE t2 (b VARCHAR(64), KEY (b));
INSERT INTO t2 VALUES ('2001-01-01');
INSERT INTO t2 VALUES ('2001.01.01');
INSERT INTO t2 VALUES ('2001#01#01');
INSERT INTO t2 VALUES ('2001-01-01 00:00:00');
INSERT INTO t2 VALUES ('2001-01-01 11:22:33');

# range/ref access cannot be used for this query

EXPLAIN SELECT * FROM t2 WHERE b=CAST('2001-01-01' AS DATE);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t2	index	b	b	67	NULL	5	Using where; Using index
SELECT * FROM t2 WHERE b=CAST('2001-01-01' AS DATE);
b
2001#01#01
2001-01-01
2001-01-01 00:00:00
2001.01.01

# range/ref access cannot be used for any of the queries below.
# See BUG#13814468 about 'Range checked for each record'

EXPLAIN SELECT * FROM t1, t2 WHERE a=b ORDER BY BINARY a, BINARY b;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using temporary; Using filesort
1	SIMPLE	t2	ALL	b	NULL	NULL	NULL	5	Range checked for each record (index map: 0x1)
SELECT * FROM t1, t2 WHERE a=b ORDER BY BINARY a, BINARY b;
a	b
2001-01-01 00:00:00	2001#01#01
2001-01-01 00:00:00	2001-01-01
2001-01-01 00:00:00	2001-01-01 00:00:00
2001-01-01 00:00:00	2001.01.01
2001-01-01 11:22:33	2001-01-01 11:22:33

EXPLAIN SELECT * FROM t1, t2 WHERE b=a ORDER BY BINARY a, BINARY b;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using temporary; Using filesort
1	SIMPLE	t2	ALL	b	NULL	NULL	NULL	5	Range checked for each record (index map: 0x1)
SELECT * FROM t1, t2 WHERE b=a ORDER BY BINARY a, BINARY b;
a	b
2001-01-01 00:00:00	2001#01#01
2001-01-01 00:00:00	2001-01-01
2001-01-01 00:00:00	2001-01-01 00:00:00
2001-01-01 00:00:00	2001.01.01
2001-01-01 11:22:33	2001-01-01 11:22:33

DROP TABLE t1,t2;
#
# Bug #20229614: OR CONDITIONS ON MULTI-COLUMN INDEX MAY NOT USE ALL
#                INDEX COLUMNS TO FILTER ROWS
#
CREATE TABLE t1 (
c1 INT,
c2 INT,
c3 INT,
PRIMARY KEY(c1, c2, c3)
) ENGINE=INNODB;
INSERT INTO t1 VALUES (1, 1, 1), (1, 1, 2), (1, 1, 3),
(1, 1, 4), (1, 1, 5);
INSERT INTO t1 SELECT c1, 2, c3 FROM t1;
INSERT INTO t1 SELECT c1, 3, c3 FROM t1 WHERE c2 = 1;
SELECT COUNT(*) FROM t1;
COUNT(*)
15
EXPLAIN SELECT c1, c2, c3
FROM t1
WHERE (c1 = 1 AND c2 = 1 AND c3 = 1) OR
(c1 = 1 AND c2 = 2 AND c3 = 2) OR
(c1 = 1 AND c2 = 2 AND c3 = 3);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	PRIMARY	PRIMARY	12	NULL	3	Using where; Using index
DROP TABLE t1;
#
# Bug#21139683: ASSERTION FAILED: TYPE_ARG == MAYBE_KEY ||
#               TYPE_ARG == IMPOSSIBLE
#
CREATE TABLE t1 (
a BLOB,
PRIMARY KEY(a(1)),
KEY(a(1))
) ENGINE=INNODB;
SELECT 1 FROM t1 WHERE a <> 'a' OR a <> "";
1
DROP TABLE t1;
#
# Bug #23259872: OPTIMIZER CHOOSES TO USE NON PRIMARY
#                INDEX, EVEN THOUGH COST IS HIGHER
#
CREATE TABLE `giant_table` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`one_id` int(11) NOT NULL,
`other_id` bigint(20) NOT NULL DEFAULT '0',
`some_other_id` int(11) DEFAULT 0 NOT NULL,
`something` double NOT NULL DEFAULT '0',
`comment` text COLLATE utf8_unicode_ci,
`flags` int(11) NOT NULL DEFAULT '0',
`time_created` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `time_created` (`time_created`),
KEY `some_other_id` (`some_other_id`),
KEY `one_other_idx` (`one_id`,`other_id`),
KEY `other_id` (`other_id`,`time_created`)
) ENGINE=InnoDB AUTO_INCREMENT=101651329
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
CREATE TABLE t1 (c1 INT);
INSERT INTO t1 VALUES (66136540), (68983250), (89627210), (77869520),
(82543190), (67538270), (77282760), (77908170),
(70923370), (68066360);
CREATE PROCEDURE p()
BEGIN
SET @x = 1;
REPEAT
INSERT INTO giant_table(id,one_id)
SELECT c1 + @x, 0
FROM t1
WHERE c1 IN (66136540, 68985250, 89627210, 77869520 , 82543190, 67538270,
77282760, 77908170, 70923370, 68066360);
SET @x =  @x + 1;
UNTIL @x > 30 END REPEAT;
END $
CALL p();
SELECT count(*) FROM giant_table;
count(*)
270
INSERT INTO giant_table (id,one_id) VALUES (66136539, 0), (68983258,1),
(89628210,1), (77869520,2);
INSERT INTO giant_table (id,one_id, some_other_id) VALUES(84673401, 0, 1),
(61069031, 1, 1);
EXPLAIN SELECT id, something, comment, time_created, one_id, other_id,
some_other_id, flags
FROM giant_table
WHERE id IN (66136539, 68983258, 89628210, 77869520, 82543198, 67538272,
84673401, 61069031, 68214385, 77282865, 76991297, 64569216,
89481638, 74534074, 70396537, 80076375, 63308530, 77908270,
70923271, 68066180)
AND (giant_table.flags & 0x01) = 0 AND giant_table.some_other_id = 0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	giant_table	range	PRIMARY,some_other_id	some_other_id	8	NULL	20	Using index condition; Using where
DROP PROCEDURE p;
DROP TABLE giant_table, t1;
set optimizer_switch=default;

Filemanager

Name Type Size Permission Actions
1st.result File 483 B 0644
alias.result File 13.42 KB 0644
almost_full.result File 1.11 KB 0644
alter_table-big.result File 3.12 KB 0644
alter_table.result File 108.41 KB 0644
analyze.result File 2.21 KB 0644
ansi.result File 1.14 KB 0644
archive-big.result File 616 B 0644
archive.result File 525.38 KB 0644
archive_bitfield.result File 4.26 KB 0644
archive_debug.result File 355 B 0644
archive_gis.result File 23.13 KB 0644
archive_no_symlink.result File 882 B 0644
archive_plugin.result File 543 B 0644
archive_symlink.result File 2.07 KB 0644
audit_plugin.result File 744 B 0644
auth_rpl.result File 1.85 KB 0644
auto_increment.result File 11.72 KB 0644
backup.result File 4.29 KB 0644
bench_count_distinct.result File 462 B 0644
big_test.require File 17 B 0644
bigint.result File 20.72 KB 0644
binary.result File 5.67 KB 0644
binary_to_hex.result File 5.87 KB 0644
binlog_tx_isolation.result File 1.71 KB 0644
blackhole.result File 613 B 0644
blackhole_plugin.result File 571 B 0644
bool.result File 2.56 KB 0644
bootstrap.result File 267 B 0644
bug12427262.result File 1.86 KB 0644
bug12969156.result File 952 B 0644
bug17076131.result File 322 B 0644
bug33509.result File 2.31 KB 0644
bug39022.result File 1.2 KB 0644
bug46080.result File 669 B 0644
bug46261.result File 382 B 0644
bug46760.result File 1.26 KB 0644
bug47671.result File 287 B 0644
bug58669.result File 480 B 0644
bulk_replace.result File 281 B 0644
cache_innodb.result File 5.42 KB 0644
case.result File 10.06 KB 0644
case_insensitive_file_system.require File 46 B 0644
case_sensitive_file_system.require File 47 B 0644
cast.result File 15.75 KB 0644
change_user.result File 3.31 KB 0644
check.result File 1.42 KB 0644
check_auto_permission.result File 251 B 0644
check_var_limit.require File 8 B 0644
client_xml.result File 2.38 KB 0644
comment_column.result File 140.57 KB 0644
comment_column2.result File 355.68 KB 0644
comment_index.result File 173.03 KB 0644
comment_table.result File 28.72 KB 0644
comments.result File 2.34 KB 0644
commit.result File 13.32 KB 0644
commit_1innodb.result File 19.19 KB 0644
compare.result File 3.17 KB 0644
compress.result File 56.5 KB 0644
concurrent_innodb_safelog.result File 31.89 KB 0644
concurrent_innodb_unsafelog.result File 31.61 KB 0644
connect.result File 12.75 KB 0644
connect_debug.result File 1.48 KB 0644
consistent_snapshot.result File 1.14 KB 0644
constraints.result File 2.55 KB 0644
count_distinct.result File 7.89 KB 0644
count_distinct2.result File 2.21 KB 0644
count_distinct3.result File 278 B 0644
create-big.result File 7.6 KB 0644
create.result File 147.09 KB 0644
create_not_windows.result File 961 B 0644
create_select_tmp.result File 846 B 0644
csv.result File 58.88 KB 0644
csv_alter_table.result File 1.17 KB 0644
csv_not_null.result File 1.75 KB 0644
ctype_ascii.result File 2.11 KB 0644
ctype_big5.result File 33.85 KB 0644
ctype_binary.result File 82.34 KB 0644
ctype_collate.result File 13.5 KB 0644
ctype_cp1250_ch.result File 21.88 KB 0644
ctype_cp1251.result File 96.09 KB 0644
ctype_cp932.result File 996 B 0644
ctype_cp932_binlog_row.result File 607 B 0644
ctype_cp932_binlog_stm.result File 251.22 KB 0644
ctype_create.result File 3.12 KB 0644
ctype_errors.result File 1.66 KB 0644
ctype_eucjpms.result File 400.21 KB 0644
ctype_euckr.result File 434.59 KB 0644
ctype_filename.result File 324 B 0644
ctype_filesystem.result File 341 B 0644
ctype_gb2312.result File 33.29 KB 0644
ctype_gbk.result File 49.63 KB 0644
ctype_gbk_binlog.result File 647 B 0644
ctype_hebrew.result File 254 B 0644
ctype_latin1.result File 118.67 KB 0644
ctype_latin1_de.result File 15.74 KB 0644
ctype_latin2.result File 13.32 KB 0644
ctype_latin2_ch.result File 25.11 KB 0644
ctype_ldml.result File 28.05 KB 0644
ctype_like_range.result File 80.89 KB 0644
ctype_many.result File 42.67 KB 0644
ctype_mb.result File 2.13 KB 0644
ctype_recoding.result File 9.6 KB 0644
ctype_sjis.result File 195.68 KB 0644
ctype_tis620.result File 100.45 KB 0644
ctype_uca.result File 154.97 KB 0644
ctype_ucs.result File 142.4 KB 0644
ctype_ucs2_def.result File 1.05 KB 0644
ctype_ujis.result File 364.9 KB 0644
ctype_ujis_ucs2.result File 548.59 KB 0644
ctype_utf16.result File 44.96 KB 0644
ctype_utf16_def.result File 273 B 0644
ctype_utf16_uca.result File 72.28 KB 0644
ctype_utf16le.result File 50.54 KB 0644
ctype_utf32.result File 48.05 KB 0644
ctype_utf32_uca.result File 75.11 KB 0644
ctype_utf8.result File 167.06 KB 0644
ctype_utf8mb4.result File 80.38 KB 0644
ctype_utf8mb4_heap.result File 72.21 KB 0644
ctype_utf8mb4_innodb.result File 74.62 KB 0644
ctype_utf8mb4_myisam.result File 74.63 KB 0644
ctype_utf8mb4_uca.result File 38.82 KB 0644
date_formats.result File 24.96 KB 0644
ddl_i18n_koi8r.result File 113.33 KB 0644
ddl_i18n_utf8.result File 116.35 KB 0644
deadlock_innodb.result File 2.35 KB 0644
debug_sync.result File 11.85 KB 0644
debug_sync2.result File 434 B 0644
default.result File 8.02 KB 0644
delayed.result File 17.7 KB 0644
delete.result File 16 KB 0644
deprecated_features.result File 2.03 KB 0644
derived.result File 78.6 KB 0644
dirty_close.result File 345 B 0644
disabled_replication.result File 3.01 KB 0644
disconnect_on_expired_password_default.result File 1.4 KB 0644
disconnect_on_expired_password_off.result File 1.36 KB 0644
distinct.result File 30.85 KB 0644
drop-no_root.result File 454 B 0644
drop.result File 5.73 KB 0644
drop_debug.result File 485 B 0644
ds_mrr-big.result File 2.14 KB 0644
dynamic_tracing.result File 813 B 0644
empty_table.result File 229 B 0644
enable_cleartext_plugin.result File 1.35 KB 0644
endspace.result File 6.61 KB 0644
eq_range_idx_stat.result File 4.02 KB 0644
error_simulation.result File 3.23 KB 0644
errors.result File 5.93 KB 0644
events_1.result File 22.18 KB 0644
events_2.result File 17.23 KB 0644
events_bugs.result File 37.35 KB 0644
events_embedded.result File 86 B 0644
events_grant.result File 10.33 KB 0644
events_logs_tests.result File 2.37 KB 0644
events_microsec.result File 810 B 0644
events_restart.result File 4.15 KB 0644
events_scheduling.result File 3.11 KB 0644
events_stress.result File 2.39 KB 0644
events_time_zone.result File 5.4 KB 0644
events_trans.result File 3.49 KB 0644
events_trans_notembedded.result File 1.37 KB 0644
execution_constants.result File 1.05 KB 0644
explain.result File 28.33 KB 0644
explain_json_all.result File 63.13 KB 0644
explain_json_none.result File 64.7 KB 0644
file_contents.result File 181 B 0644
filesort_debug.result File 2.79 KB 0644
fix_priv_tables.result File 1.3 KB 0644
flush.result File 13.75 KB 0644
flush2.result File 882 B 0644
flush_block_commit.result File 1.47 KB 0644
flush_block_commit_notembedded.result File 770 B 0644
flush_read_lock.result File 72.07 KB 0644
flush_read_lock_kill.result File 1.12 KB 0644
flush_table.result File 11.22 KB 0644
foreign_key.result File 3.33 KB 0644
fulltext.result File 28.72 KB 0644
fulltext2.result File 7.54 KB 0644
fulltext3.result File 540 B 0644
fulltext_cache.result File 2.67 KB 0644
fulltext_distinct.result File 1.25 KB 0644
fulltext_left_join.result File 4 KB 0644
fulltext_multi.result File 766 B 0644
fulltext_order_by.result File 5.83 KB 0644
fulltext_plugin.result File 229 B 0644
fulltext_update.result File 930 B 0644
fulltext_var.result File 1.3 KB 0644
func_aes.result File 12.78 KB 0644
func_aes_cfb1.result File 4.5 KB 0644
func_aes_cfb128.result File 4.57 KB 0644
func_aes_cfb8.result File 4.5 KB 0644
func_aes_misc.result File 8.28 KB 0644
func_aes_ofb.result File 4.47 KB 0644
func_analyse.result File 19.01 KB 0644
func_compress.result File 4.84 KB 0644
func_concat.result File 4.03 KB 0644
func_crypt.result File 4.37 KB 0644
func_date_add.result File 3.62 KB 0644
func_default.result File 1.19 KB 0644
func_des_encrypt.result File 1018 B 0644
func_digest.result File 121.48 KB 0644
func_encrypt.result File 10.33 KB 0644
func_encrypt_nossl.result File 4.21 KB 0644
func_encrypt_ucs2.result File 765 B 0644
func_equal.result File 1.27 KB 0644
func_gconcat.result File 48.53 KB 0644
func_group.result File 54.64 KB 0644
func_group_innodb.result File 5.12 KB 0644
func_group_innodb_16k.result File 544 B 0644
func_if.result File 6.05 KB 0644
func_in_all.result File 27.62 KB 0644
func_in_icp.result File 27.26 KB 0644
func_in_icp_mrr.result File 27.57 KB 0644
func_in_mrr.result File 27.29 KB 0644
func_in_mrr_cost.result File 27.01 KB 0644
func_in_none.result File 26.96 KB 0644
func_isnull.result File 827 B 0644
func_like.result File 4.45 KB 0644
func_math.result File 28.06 KB 0644
func_misc.result File 28.2 KB 0644
func_op.result File 1.93 KB 0644
func_regexp.result File 4.37 KB 0644
func_rollback.result File 12.44 KB 0644
func_sapdb.result File 12.38 KB 0644
func_set.result File 8.51 KB 0644
func_str.result File 157.75 KB 0644
func_str_debug.result File 349 B 0644
func_str_no_ps.result File 1.07 KB 0644
func_system.result File 2.63 KB 0644
func_test.result File 13.44 KB 0644
func_time.result File 67.37 KB 0644
func_timestamp.result File 518 B 0644
func_weight_string.result File 3.44 KB 0644
function_defaults.result File 109.23 KB 0644
function_defaults_notembedded.result File 6.38 KB 0644
gcc296.result File 528 B 0644
get_diagnostics.result File 24.96 KB 0644
gis-debug.result File 16.13 KB 0644
gis-precise.result File 28.34 KB 0644
gis-rt-precise.result File 1.86 KB 0644
gis-rtree.result File 78.36 KB 0644
gis.result File 58.53 KB 0644
grant.result File 95.95 KB 0644
grant2.result File 31.12 KB 0644
grant3.result File 7.15 KB 0644
grant4.result File 8.85 KB 0644
grant_cache.result File 5.62 KB 0644
grant_explain_non_select.result File 9.5 KB 0644
grant_lowercase_fs.result File 557 B 0644
greedy_optimizer.result File 592.8 KB 0644
greedy_search.result File 12.42 KB 0644
group_by.result File 84.6 KB 0644
group_min_max.result File 115.33 KB 0644
group_min_max_innodb.result File 17.52 KB 0644
handler_innodb.result File 40.72 KB 0644
handler_myisam.result File 44.62 KB 0644
handler_read_last.result File 1.15 KB 0644
have_big5.require File 79 B 0644
have_binlog_format_mixed.require File 40 B 0644
have_binlog_format_row.require File 38 B 0644
have_binlog_format_statement.require File 44 B 0644
have_binlog_rows_query.require File 53 B 0644
have_compress.require File 38 B 0644
have_cp1250_ch.require File 79 B 0644
have_cp1251.require File 84 B 0644
have_cp866.require File 82 B 0644
have_cp932.require File 83 B 0644
have_crypt.require File 35 B 0644
have_debug.require File 8 B 0644
have_debug_sync.require File 13 B 0644
have_eucjpms.require File 87 B 0644
have_euckr.require File 81 B 0644
have_gb2312.require File 84 B 0644
have_gbk.require File 78 B 0644
have_geometry.require File 38 B 0644
have_koi8r.require File 81 B 0644
have_latin2_ch.require File 78 B 0644
have_local_infile.require File 36 B 0644
have_log_bin.require File 31 B 0644
have_met_timezone.require File 43 B 0644
have_moscow_leap_timezone.require File 46 B 0644
have_mysql_upgrade.result File 21 B 0644
have_ndb_extra.require File 14 B 0644
have_ndbapi_examples.require File 19 B 0644
have_nodebug.require File 8 B 0644
have_optimizer_switch.require File 19 B 0644
have_outfile.require File 55 B 0644
have_partition.require File 42 B 0644
have_perror.require File 14 B 0644
have_profiling.require File 39 B 0644
have_query_cache.require File 41 B 0644
have_sjis.require File 81 B 0644
have_ssl.require File 33 B 0644
have_ssl_is_yes_or_disabled_only.require File 43 B 0644
have_symlink.require File 37 B 0644
have_tis620.require File 81 B 0644
have_ucs2.require File 80 B 0644
have_ujis.require File 81 B 0644
have_utf16.require File 82 B 0644
have_utf32.require File 82 B 0644
have_utf8.require File 80 B 0644
have_utf8mb4.require File 86 B 0644
having.result File 19.72 KB 0644
heap.result File 20.86 KB 0644
heap_auto_increment.result File 894 B 0644
heap_btree.result File 9.32 KB 0644
heap_hash.result File 14.37 KB 0644
help.result File 6.46 KB 0644
host_cache_size_functionality.result File 3.32 KB 0644
implicit_char_to_num_conversion.result File 6.44 KB 0644
implicit_commit.result File 17.71 KB 0644
import_schema_mismatch.result File 538 B 0644
index_merge_delete.result File 25.88 KB 0644
index_merge_innodb.result File 61.63 KB 0644
index_merge_insert-and-replace.result File 12.55 KB 0644
index_merge_intersect_dml.result File 4.96 KB 0644
index_merge_myisam.result File 73.48 KB 0644
index_merge_update.result File 16.41 KB 0644
information_schema-big.result File 2.81 KB 0644
information_schema.result File 87.98 KB 0644
information_schema_chmod.result File 182 B 0644
information_schema_db.result File 9.29 KB 0644
information_schema_inno.result File 4.33 KB 0644
information_schema_parameters.result File 22.11 KB 0644
information_schema_part.result File 9.71 KB 0644
information_schema_routines.result File 28.64 KB 0644
init_connect.result File 2.53 KB 0644
init_file.result File 323 B 0644
innodb_explain_json_non_select_all.result File 220.92 KB 0644
innodb_explain_json_non_select_none.result File 225.15 KB 0644
innodb_explain_non_select_all.result File 119.15 KB 0644
innodb_explain_non_select_none.result File 119.03 KB 0644
innodb_icp.result File 26.73 KB 0644
innodb_icp_all.result File 26.79 KB 0644
innodb_icp_none.result File 26.63 KB 0644
innodb_ignore_builtin.result File 354 B 0644
innodb_log_file_size_functionality.result File 2.79 KB 0644
innodb_mrr.result File 20.3 KB 0644
innodb_mrr_all.result File 20.47 KB 0644
innodb_mrr_cost.result File 20.27 KB 0644
innodb_mrr_cost_all.result File 20.43 KB 0644
innodb_mrr_cost_icp.result File 20.38 KB 0644
innodb_mrr_icp.result File 20.41 KB 0644
innodb_mrr_none.result File 20.22 KB 0644
innodb_mysql_lock.result File 5.52 KB 0644
innodb_mysql_lock2.result File 21.27 KB 0644
innodb_mysql_sync.result File 17.65 KB 0644
innodb_pk_extension_off.result File 14.06 KB 0644
innodb_pk_extension_on.result File 14.33 KB 0644
innodb_recovery_with_upper_case_names.result File 1.21 KB 0644
insert.result File 26.41 KB 0644
insert_debug.result File 1.29 KB 0644
insert_notembedded.result File 5.72 KB 0644
insert_select.result File 14.04 KB 0644
insert_update.result File 9.64 KB 0644
ipv4_as_ipv6.result File 21.69 KB 0644
ipv6.result File 12.49 KB 0644
is_debug_build.require File 32 B 0644
is_embedded.require File 16 B 0644
isam.result File 15.65 KB 0644
join.result File 46.84 KB 0644
join_cache_bka.result File 88.08 KB 0644
join_cache_bka_nixbnl.result File 87.38 KB 0644
join_cache_bkaunique.result File 88.54 KB 0644
join_cache_bnl.result File 86.26 KB 0644
join_cache_nojb.result File 85.38 KB 0644
join_crash.result File 4.59 KB 0644
join_nested.result File 62.76 KB 0644
join_nested_bka.result File 66.92 KB 0644
join_nested_bka_nixbnl.result File 63.95 KB 0644
join_optimizer.result File 2.54 KB 0644
join_outer.result File 63.99 KB 0644
join_outer_bka.result File 64.28 KB 0644
join_outer_bka_nixbnl.result File 62.57 KB 0644
join_outer_innodb.result File 1.86 KB 0644
key.result File 20.98 KB 0644
key_cache.result File 10.91 KB 0644
key_diff.result File 853 B 0644
key_primary.result File 666 B 0644
keywords.result File 6.63 KB 0644
kill.result File 8.37 KB 0644
kill_debug.result File 1.56 KB 0644
limit.result File 4.12 KB 0644
loaddata.result File 16.91 KB 0644
loaddata_autocom_innodb.result File 637 B 0644
loadxml.result File 2.71 KB 0644
locale.result File 5.59 KB 0644
lock.result File 15.03 KB 0644
lock_multi.result File 11.53 KB 0644
lock_multi_bug38499.result File 691 B 0644
lock_multi_bug38691.result File 539 B 0644
lock_sync.result File 31.17 KB 0644
lock_tables_lost_commit.result File 150 B 0644
log_empty_name.result File 247 B 0644
log_errchk.result File 664 B 0644
log_state.result File 9.66 KB 0644
log_state_bug33693.result File 111 B 0644
log_tables-big.result File 996 B 0644
log_tables.result File 40.97 KB 0644
log_tables_debug.result File 838 B 0644
log_tables_upgrade.result File 2.48 KB 0644
long_tmpdir.result File 99 B 0644
lowercase0.require File 45 B 0644
lowercase1.require File 45 B 0644
lowercase2.require File 45 B 0644
lowercase_fs_off.result File 2.05 KB 0644
lowercase_fs_on.result File 75 B 0644
lowercase_mixed_tmpdir.result File 176 B 0644
lowercase_mixed_tmpdir_innodb.result File 190 B 0644
lowercase_table.result File 2.67 KB 0644
lowercase_table2.result File 8.66 KB 0644
lowercase_table4.result File 3.68 KB 0644
lowercase_table_grant.result File 1.5 KB 0644
lowercase_table_qcache.result File 649 B 0644
lowercase_utf8.result File 173 B 0644
lowercase_view.result File 10.22 KB 0644
mdl_sync.result File 89.85 KB 0644
merge-big.result File 728 B 0644
merge.result File 97.6 KB 0644
merge_innodb.result File 1.31 KB 0644
merge_mmap.result File 3.33 KB 0644
metadata.result File 13.88 KB 0644
mix2_myisam.result File 57.76 KB 0644
mix2_myisam_ucs2.result File 15.31 KB 0644
multi_plugin_load.result File 347 B 0644
multi_plugin_load_add.result File 455 B 0644
multi_plugin_load_add2.result File 455 B 0644
multi_statement.result File 563 B 0644
multi_update.result File 23.21 KB 0644
multi_update2.result File 1016 B 0644
multi_update_innodb.result File 2.56 KB 0644
multi_update_tiny_hash.result File 1.5 KB 0644
myisam-blob.result File 1.25 KB 0644
myisam-system.result File 391 B 0644
myisam.result File 90.78 KB 0644
myisam_crash_before_flush_keys.result File 1.15 KB 0644
myisam_debug.result File 1.21 KB 0644
myisam_explain_json_non_select_all.result File 217.3 KB 0644
myisam_explain_json_non_select_none.result File 221.32 KB 0644
myisam_explain_non_select_all.result File 116.26 KB 0644
myisam_explain_non_select_none.result File 115.98 KB 0644
myisam_icp.result File 26.57 KB 0644
myisam_icp_all.result File 26.63 KB 0644
myisam_icp_none.result File 26.45 KB 0644
myisam_mrr.result File 19.24 KB 0644
myisam_mrr_all.result File 19.44 KB 0644
myisam_mrr_cost.result File 19.19 KB 0644
myisam_mrr_cost_all.result File 19.39 KB 0644
myisam_mrr_cost_icp.result File 19.33 KB 0644
myisam_mrr_icp.result File 19.38 KB 0644
myisam_mrr_none.result File 19.14 KB 0644
myisam_recover.result File 4.57 KB 0644
myisam_row_rpl.result File 2.04 KB 0644
myisampack.result File 7.56 KB 0644
mysql-bug41486.result File 465 B 0644
mysql-bug45236.result File 329 B 0644
mysql.result File 8.67 KB 0644
mysql_binary_mode.result File 1.52 KB 0644
mysql_client_test.result File 8.92 KB 0644
mysql_client_test_embedded.result File 111 B 0644
mysql_client_test_qcache.result File 502 B 0644
mysql_comments.result File 5.02 KB 0644
mysql_config_editor.result File 6.6 KB 0644
mysql_cp932.result File 37 B 0644
mysql_embedded.result File 171 B 0644
mysql_embedded_client_test.result File 153 B 0644
mysql_locale_posix.result File 973 B 0644
mysql_not_windows.result File 80 B 0644
mysql_plugin.result File 3.88 KB 0644
mysql_protocols.result File 208 B 0644
mysql_upgrade.result File 26.82 KB 0644
mysql_upgrade_ssl.result File 1.99 KB 0644
mysqladmin.result File 872 B 0644
mysqladmin_shutdown.result File 157 B 0644
mysqlbinlog.result File 30.17 KB 0644
mysqlbinlog_debug.result File 235 B 0644
mysqlbinlog_mixed_or_statment.result File 855 B 0644
mysqlbinlog_raw_mode.result File 8.32 KB 0644
mysqlbinlog_raw_mode_win.result File 8.08 KB 0644
mysqlbinlog_row_big.result File 2.42 KB 0644
mysqlcheck.result File 15.2 KB 0644
mysqld--defaults-file.result File 710 B 0644
mysqld--help-notwin.result File 53.91 KB 0644
mysqld--help-win.result File 54.47 KB 0644
mysqldump-compat.result File 111 B 0644
mysqldump-max.result File 10.95 KB 0644
mysqldump-no-binlog.result File 50 B 0644
mysqldump.result File 280.61 KB 0644
mysqldump_restore.result File 3.78 KB 0644
mysqlhotcopy_archive.result File 1.8 KB 0644
mysqlhotcopy_myisam.result File 2.28 KB 0644
mysqlimport.result File 490 B 0644
mysqlshow.result File 7.56 KB 0644
mysqlslap.result File 6.88 KB 0644
mysqltest.result File 31.15 KB 0644
named_pipe.result File 56.25 KB 0644
ndb_default_cluster.require File 51 B 0644
negation_elimination.result File 8.72 KB 0644
no-threads.result File 329 B 0644
no_binlog.result File 64 B 0644
not_embedded.require File 16 B 0644
not_embedded_server.result File 5.63 KB 0644
not_ndb.require File 39 B 0644
not_openssl.require File 36 B 0644
not_partition.result File 4.14 KB 0644
not_ssl.require File 32 B 0644
not_true.require File 10 B 0644
not_valgrind.require File 17 B 0644
not_windows.require File 7 B 0644
null.result File 14.48 KB 0644
null_key_all.result File 15.6 KB 0644
null_key_icp.result File 15.53 KB 0644
null_key_none.result File 15.47 KB 0644
odbc.result File 954 B 0644
olap.result File 19.13 KB 0644
one_thread_per_connection.require File 44 B 0644
openssl.require File 37 B 0644
openssl_1.result File 8.04 KB 0644
optimizer_bug12837084.result File 13.97 KB 0644
optimizer_debug_sync.result File 1.32 KB 0644
optimizer_switch.result File 19.94 KB 0644
order_by_all.result File 61.42 KB 0644
order_by_icp_mrr.result File 61.37 KB 0644
order_by_none.result File 61.15 KB 0644
order_by_sortkey.result File 2.91 KB 0644
order_fill_sortbuf.result File 262 B 0644
outfile.result File 2.09 KB 0644
outfile_loaddata.result File 10.12 KB 0644
overflow.result File 235 B 0644
packet.result File 5 KB 0644
parser.result File 38.22 KB 0644
parser_bug21114_innodb.result File 25.39 KB 0644
parser_not_embedded.result File 4.42 KB 0644
parser_precedence.result File 23.96 KB 0644
parser_stack.result File 9.54 KB 0644
partition.result File 76.63 KB 0644
partition_archive.result File 4.51 KB 0644
partition_binlog.result File 2.3 KB 0644
partition_binlog_stmt.result File 442 B 0644
partition_blackhole.result File 174 B 0644
partition_bug18198.result File 8.07 KB 0644
partition_cache.result File 5.16 KB 0644
partition_charset.result File 434 B 0644
partition_column.result File 23.07 KB 0644
partition_column_prune.result File 2.83 KB 0644
partition_csv.result File 1.83 KB 0644
partition_datatype.result File 39.34 KB 0644
partition_debug_sync.result File 3.19 KB 0644
partition_disabled.result File 4.59 KB 0644
partition_error.result File 82.17 KB 0644
partition_exchange.result File 37.6 KB 0644
partition_explicit_prune.result File 55.63 KB 0644
partition_federated.result File 271 B 0644
partition_grant.result File 1.54 KB 0644
partition_hash.result File 7.12 KB 0644
partition_index_innodb.result File 4.04 KB 0644
partition_index_myisam.result File 3.21 KB 0644
partition_innodb.result File 30.66 KB 0644
partition_innodb_plugin.result File 5.26 KB 0644
partition_innodb_semi_consistent.result File 2.92 KB 0644
partition_innodb_stmt.result File 1.12 KB 0644
partition_innodb_tablespace.result File 12.76 KB 0644
partition_key_cache.result File 16.74 KB 0644
partition_list.result File 12.92 KB 0644
partition_locking.result File 238.13 KB 0644
partition_locking_4.result File 1.7 KB 0644
partition_mgm.result File 4.7 KB 0644
partition_mgm_err.result File 7.48 KB 0644
partition_mgm_err2.result File 43 B 0644
partition_myisam.result File 7.67 KB 0644
partition_not_blackhole.result File 456 B 0644
partition_not_windows.result File 3.47 KB 0644
partition_open_files_limit.result File 1.02 KB 0644
partition_order.result File 16.29 KB 0644
partition_pruning.result File 166.97 KB 0644
partition_range.result File 33.91 KB 0644
partition_rename_longfilename.result File 2.89 KB 0644
partition_symlink.result File 4.89 KB 0644
partition_sync.result File 1.34 KB 0644
partition_truncate.result File 751 B 0644
partition_utf8.result File 2 KB 0644
partition_windows.result File 1.18 KB 0644
perror-win.result File 453 B 0644
perror.result File 471 B 0644
plugin.result File 7.73 KB 0644
plugin_auth.result File 23.39 KB 0644
plugin_auth_qa.result File 20.77 KB 0644
plugin_auth_qa_1.result File 13.74 KB 0644
plugin_auth_qa_2.result File 8.87 KB 0644
plugin_auth_qa_3.result File 1.14 KB 0644
plugin_auth_sha256.result File 3.97 KB 0644
plugin_auth_sha256_2.result File 1.49 KB 0644
plugin_auth_sha256_server_default.result File 2.7 KB 0644
plugin_auth_sha256_server_default_tls.result File 2.83 KB 0644
plugin_auth_sha256_tls.result File 1.82 KB 0644
plugin_load.result File 76 B 0644
plugin_load_option.result File 321 B 0644
plugin_not_embedded.result File 474 B 0644
preload.result File 3.84 KB 0644
profiling.result File 16.13 KB 0644
ps.result File 116.73 KB 0644
ps_10nestset.result File 2.08 KB 0644
ps_11bugs.result File 5.92 KB 0644
ps_1general.result File 35.91 KB 0644
ps_2myisam.result File 103.82 KB 0644
ps_3innodb.result File 103.36 KB 0644
ps_4heap.result File 103.28 KB 0644
ps_5merge.result File 202.34 KB 0644
ps_ddl.result File 53.68 KB 0644
ps_ddl1.result File 11.06 KB 0644
ps_grant.result File 3.71 KB 0644
ps_not_windows.result File 516 B 0644
python_with_json.require File 27 B 0644
query_cache.result File 75.57 KB 0644
query_cache_28249.result File 2.29 KB 0644
query_cache_debug.result File 8.63 KB 0644
query_cache_disabled.result File 639 B 0644
query_cache_merge.result File 32.41 KB 0644
query_cache_notembedded.result File 6.61 KB 0644
query_cache_ps_no_prot.result File 11.1 KB 0644
query_cache_ps_ps_prot.result File 11.09 KB 0644
query_cache_size_functionality.result File 6.64 KB 0644
query_cache_type_functionality.result File 6.79 KB 0644
query_cache_with_views.result File 4.96 KB 0644
range_all.result File 81.48 KB 0644
range_icp.result File 81.08 KB 0644
range_icp_mrr.result File 81.42 KB 0644
range_mrr.result File 80.98 KB 0644
range_mrr_cost.result File 80.67 KB 0644
range_none.result File 80.63 KB 0644
read_many_rows_innodb.result File 2.83 KB 0644
read_only.result File 6.3 KB 0644
read_only_innodb.result File 4.76 KB 0644
rename.result File 1.58 KB 0644
renamedb.result File 880 B 0644
repair.result File 7.02 KB 0644
replace.result File 1.09 KB 0644
rewrite_general_log.result File 8.33 KB 0644
rewrite_slow_log.result File 2.92 KB 0644
rollback.result File 582 B 0644
round.result File 6.74 KB 0644
row.result File 15.91 KB 0644
rowid_order_innodb.result File 3.32 KB 0644
rpl_colSize.result File 4.39 KB 0644
rpl_extraColmaster_innodb.result File 23.85 KB 0644
rpl_extraColmaster_myisam.result File 23.85 KB 0644
rpl_mysqldump_slave.result File 867 B 0644
schema.result File 2.37 KB 0644
secure_file_priv_win.result File 1.43 KB 0644
select_all.result File 150.09 KB 0644
select_all_bka.result File 150.86 KB 0644
select_all_bka_nixbnl.result File 150.11 KB 0644
select_found.result File 6.17 KB 0644
select_icp_mrr.result File 150.04 KB 0644
select_icp_mrr_bka.result File 150.8 KB 0644
select_icp_mrr_bka_nixbnl.result File 150.06 KB 0644
select_none.result File 149.37 KB 0644
select_none_bka.result File 149.46 KB 0644
select_none_bka_nixbnl.result File 148.66 KB 0644
select_safe.result File 3.92 KB 0644
server_id.require File 32 B 0644
server_id1.require File 34 B 0644
server_uuid.result File 755 B 0644
server_uuid_embedded.result File 325 B 0644
shm.result File 56.74 KB 0644
show_check.result File 71.33 KB 0644
show_processlist.result File 1.84 KB 0644
show_processlist_state.result File 146 B 0644
show_profile.result File 491 B 0644
signal.result File 63.09 KB 0644
signal_code.result File 1020 B 0644
signal_demo1.result File 6.06 KB 0644
signal_demo2.result File 3.86 KB 0644
signal_demo3.result File 3.33 KB 0644
signal_sqlmode.result File 2.51 KB 0644
single_delete_update.result File 24.41 KB 0644
skip_grants.result File 2.47 KB 0644
skip_log_bin.result File 167 B 0644
skip_name_resolve.result File 1.28 KB 0644
slave-running.result File 71 B 0644
slave-stopped.result File 72 B 0644
sort_buffer_size_functionality.result File 6.48 KB 0644
sp-big.result File 1.47 KB 0644
sp-bugs.result File 7.66 KB 0644
sp-code.result File 28.23 KB 0644
sp-destruct.result File 6.84 KB 0644
sp-dynamic.result File 9.55 KB 0644
sp-error.result File 81.43 KB 0644
sp-fib.result File 656 B 0644
sp-lock.result File 21.45 KB 0644
sp-no-code.result File 307 B 0644
sp-prelocking.result File 7.09 KB 0644
sp-security.result File 23.51 KB 0644
sp-threads.result File 2.01 KB 0644
sp-ucs2.result File 4.78 KB 0644
sp-vars.result File 28.09 KB 0644
sp.result File 183.74 KB 0644
sp_debug.result File 735 B 0644
sp_gis.result File 829 B 0644
sp_notembedded.result File 10 KB 0644
sp_stress_case.result File 2.53 KB 0644
sp_sync.result File 3.17 KB 0644
sp_trans.result File 14.3 KB 0644
sp_trans_log.result File 891 B 0644
sp_validation.result File 34.67 KB 0644
sql_mode.result File 17.53 KB 0644
ssl-big.result File 69 B 0644
ssl-crl-revoked-crl.result File 76 B 0644
ssl-sha512.result File 376 B 0644
ssl.result File 56.89 KB 0644
ssl_8k_key.result File 42 B 0644
ssl_and_innodb.result File 183 B 0644
ssl_ca.result File 857 B 0644
ssl_cipher.result File 254 B 0644
ssl_compress.result File 56.52 KB 0644
ssl_connect.result File 10 B 0644
ssl_crl.result File 1.14 KB 0644
ssl_crl_clients-valid.result File 1.01 KB 0644
ssl_crl_clients.result File 427 B 0644
ssl_crl_clients_valid.result File 620 B 0644
ssl_crl_crlpath.result File 728 B 0644
ssl_mode.result File 1.29 KB 0644
ssl_mode_no_ssl.result File 1.06 KB 0644
ssl_verify_identity.result File 1 KB 0644
status.result File 9.83 KB 0644
status2.result File 1.35 KB 0644
status_bug17954.result File 582 B 0644
status_debug.result File 1.06 KB 0644
strict.result File 64.41 KB 0644
strict_autoinc_1myisam.result File 654 B 0644
strict_autoinc_2innodb.result File 654 B 0644
strict_autoinc_3heap.result File 654 B 0644
subquery_all.result File 258.33 KB 0644
subquery_all_bka.result File 258.65 KB 0644
subquery_all_bka_nixbnl.result File 258.42 KB 0644
subquery_bugs.result File 3.05 KB 0644
subquery_mat.result File 94.96 KB 0644
subquery_mat_all.result File 87.69 KB 0644
subquery_mat_none.result File 89.71 KB 0644
subquery_nomat_nosj.result File 258.39 KB 0644
subquery_nomat_nosj_bka.result File 258.64 KB 0644
subquery_nomat_nosj_bka_nixbnl.result File 258.21 KB 0644
subquery_none.result File 258.29 KB 0644
subquery_none_bka.result File 258.38 KB 0644
subquery_none_bka_nixbnl.result File 257.96 KB 0644
subquery_sj_all.result File 368.6 KB 0644
subquery_sj_all_bka.result File 370.21 KB 0644
subquery_sj_all_bka_nixbnl.result File 359 KB 0644
subquery_sj_all_bkaunique.result File 370.58 KB 0644
subquery_sj_dupsweed.result File 370.17 KB 0644
subquery_sj_dupsweed_bka.result File 370.42 KB 0644
subquery_sj_dupsweed_bka_nixbnl.result File 352.52 KB 0644
subquery_sj_dupsweed_bkaunique.result File 370.45 KB 0644
subquery_sj_firstmatch.result File 363.23 KB 0644
subquery_sj_firstmatch_bka.result File 363.32 KB 0644
subquery_sj_firstmatch_bka_nixbnl.result File 351.28 KB 0644
subquery_sj_firstmatch_bkaunique.result File 363.35 KB 0644
subquery_sj_innodb_all.result File 4.74 KB 0644
subquery_sj_innodb_all_bka.result File 4.93 KB 0644
subquery_sj_innodb_all_bka_nixbnl.result File 4.95 KB 0644
subquery_sj_innodb_all_bkaunique.result File 4.99 KB 0644
subquery_sj_innodb_none.result File 4.62 KB 0644
subquery_sj_innodb_none_bka.result File 4.71 KB 0644
subquery_sj_innodb_none_bka_nixbnl.result File 4.7 KB 0644
subquery_sj_innodb_none_bkaunique.result File 4.75 KB 0644
subquery_sj_loosescan.result File 370.08 KB 0644
subquery_sj_loosescan_bka.result File 370.33 KB 0644
subquery_sj_loosescan_bka_nixbnl.result File 352.5 KB 0644
subquery_sj_loosescan_bkaunique.result File 370.36 KB 0644
subquery_sj_mat.result File 378.77 KB 0644
subquery_sj_mat_bka.result File 378.85 KB 0644
subquery_sj_mat_bka_nixbnl.result File 362.06 KB 0644
subquery_sj_mat_bkaunique.result File 378.88 KB 0644
subquery_sj_mat_nosj.result File 376.23 KB 0644
subquery_sj_none.result File 374.82 KB 0644
subquery_sj_none_bka.result File 374.92 KB 0644
subquery_sj_none_bka_nixbnl.result File 367.91 KB 0644
subquery_sj_none_bkaunique.result File 374.95 KB 0644
subselect_debug.result File 409 B 0644
subselect_gis.result File 305 B 0644
subselect_innodb.result File 28.1 KB 0644
subselect_notembedded.result File 752 B 0644
sum_distinct-big.result File 2 KB 0644
sum_distinct.result File 3.14 KB 0644
symlink.result File 7.75 KB 0644
symlink_windows.result File 321 B 0644
synchronization.result File 4.05 KB 0644
sysdate_is_now.result File 76 B 0644
system_mysql_db.result File 13.5 KB 0644
system_mysql_db_refs.result File 2.96 KB 0644
table_definition_cache_functionality.result File 6.9 KB 0644
table_open_cache_functionality.result File 12.78 KB 0644
tablelock.result File 1.5 KB 0644
tablespace.result File 10.13 KB 0644
temp_pool.result File 538 B 0644
temp_table.result File 7.39 KB 0644
temporal_literal.result File 13.16 KB 0644
testdb_only.require File 45 B 0644
thread_cache_size_functionality.result File 5.26 KB 0644
timezone.result File 1.8 KB 0644
timezone2.result File 11.81 KB 0644
timezone3.result File 2.21 KB 0644
timezone4.result File 148 B 0644
timezone_grant.result File 3.76 KB 0644
trans_read_only.result File 1.03 KB 0644
trigger-compat.result File 7.75 KB 0644
trigger-trans.result File 6.46 KB 0644
trigger.result File 68.46 KB 0644
trigger_notembedded.result File 17.03 KB 0644
true.require File 7 B 0644
truncate.result File 3.58 KB 0644
truncate_coverage.result File 2.4 KB 0644
type_binary.result File 3.62 KB 0644
type_bit.result File 16.92 KB 0644
type_bit_innodb.result File 7.31 KB 0644
type_blob.result File 28.87 KB 0644
type_date.result File 18.46 KB 0644
type_datetime.result File 31.24 KB 0644
type_decimal.result File 36.1 KB 0644
type_enum.result File 101.19 KB 0644
type_float.result File 11.97 KB 0644
type_nchar.result File 1.44 KB 0644
type_newdecimal-big.result File 678 B 0644
type_newdecimal.result File 61.46 KB 0644
type_ranges.result File 17.38 KB 0644
type_set.result File 3.99 KB 0644
type_temporal_fractional.result File 635.43 KB 0644
type_temporal_upgrade.result File 9.9 KB 0644
type_time.result File 109.27 KB 0644
type_timestamp.result File 24.69 KB 0644
type_timestamp_explicit.result File 27.35 KB 0644
type_uint.result File 366 B 0644
type_varchar.result File 16.66 KB 0644
type_year.result File 7.78 KB 0644
udf.result File 16.03 KB 0644
udf_services.result File 499 B 0644
udf_skip_grants.result File 223 B 0644
union.result File 52.6 KB 0644
unsafe_binlog_innodb.result File 4.36 KB 0644
update.result File 16.63 KB 0644
upgrade.result File 4.91 KB 0644
user_limits.result File 3.54 KB 0644
user_var-binlog.result File 2.17 KB 0644
user_var.result File 15.34 KB 0644
validate_password_plugin.result File 12.09 KB 0644
varbinary.result File 3.34 KB 0644
variables-big.result File 972 B 0644
variables-notembedded.result File 5.78 KB 0644
variables-win.result File 347 B 0644
variables.result File 61.67 KB 0644
variables_community.result File 182 B 0644
variables_debug.result File 2.13 KB 0644
view.result File 178.72 KB 0644
view_alias.result File 6.19 KB 0644
view_grant.result File 76.69 KB 0644
wait_timeout.result File 1.07 KB 0644
warnings.result File 11.21 KB 0644
warnings_engine_disabled.result File 475 B 0644
windows.require File 7 B 0644
windows.result File 1.86 KB 0644
wl6219-csv.result File 7.23 KB 0644
wl6219-innodb.result File 7.27 KB 0644
wl6219-memory.result File 7.27 KB 0644
wl6219-merge.result File 5.99 KB 0644
wl6219-myisam.result File 7.27 KB 0644
wl6219-upgrade.result File 7.33 KB 0644
wl6301_1_not_windows.result File 44 B 0644
wl6301_2_not_windows.result File 46 B 0644
wl6301_3.result File 89 B 0644
wl6443_deprecation.result File 10.71 KB 0644
xa.result File 7.13 KB 0644
xml.result File 41.78 KB 0644