Commit 41aaa0f0 authored by unknown's avatar unknown
Browse files

Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  rakia.(none):/home/kgeorge/mysql/autopush/B21772-5.0-opt

parents 0eb5442f 5371adca
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1136,12 +1136,12 @@ ALTER TABLE t1 ADD INDEX (code);
CREATE TABLE t2 (id varchar(10) PRIMARY KEY);
INSERT INTO t2 VALUES ('a11'), ('a12'), ('a13'), ('a14');
SELECT * FROM t1 INNER JOIN t2 ON t1.code=t2.id 
WHERE t2.id='a12' AND (code < 'a00' OR LENGTH(code)=5);
WHERE t2.id='a12' AND (LENGTH(code)=5 OR code < 'a00');
code	id
A12  	a12
EXPLAIN EXTENDED 
SELECT * FROM t1 INNER JOIN t2 ON code=id 
WHERE id='a12' AND (code < 'a00' OR LENGTH(code)=5);
WHERE id='a12' AND (LENGTH(code)=5 OR code < 'a00');
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	code	code	13	const	3	Using where; Using index
1	SIMPLE	t2	ref	PRIMARY	PRIMARY	12	const	1	Using where; Using index
+2 −2
Original line number Diff line number Diff line
@@ -807,8 +807,8 @@ explain
SELECT straight_join sql_no_cache v1.a, v1.b, v1.real_b from t2, v1
where t2.b=v1.a GROUP BY t2.b;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	PRIMARY	t2	index	b	b	2	NULL	10	Using index
1	PRIMARY	t1	eq_ref	PRIMARY	PRIMARY	1	test.t2.b	1	
1	SIMPLE	t2	index	b	b	2	NULL	10	Using index
1	SIMPLE	t1	eq_ref	PRIMARY	PRIMARY	1	test.t2.b	1	
SELECT straight_join sql_no_cache v1.a, v1.b, v1.real_b from t2, v1
where t2.b=v1.a GROUP BY t2.b;
a	b	real_b
+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ mysql
test
explain select * from v0;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	PRIMARY	#	ALL	NULL	NULL	NULL	NULL	2	
1	SIMPLE	#	ALL	NULL	NULL	NULL	NULL	2	
create view v1 (c) as select table_name from information_schema.tables
where table_name="v1";
select * from v1;
+1 −1
Original line number Diff line number Diff line
@@ -611,7 +611,7 @@ C
NULL
EXPLAIN SELECT type FROM v1 GROUP BY type WITH ROLLUP;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	10	Using filesort
1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	10	Using filesort
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a int(11) NOT NULL);
+4 −4
Original line number Diff line number Diff line
@@ -750,13 +750,13 @@ 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	PRIMARY	t1	range	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
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	PRIMARY	t1	range	PRIMARY	PRIMARY	4	NULL	4	Using where; Using index
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
@@ -799,13 +799,13 @@ 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	PRIMARY	t1	range	PRIMARY	PRIMARY	8	NULL	#	Using where; Using index
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	PRIMARY	t1	range	PRIMARY	PRIMARY	8	NULL	#	Using where; Using index
1	SIMPLE	t1	range	PRIMARY	PRIMARY	8	NULL	#	Using where; Using index
drop view v1;
drop table t1;
create table t3 (a int);
Loading