[Commits] Rev 2996: Fixed typo that caused printing 'range' instead of 'index_merge' as the type in file:///home/igor/maria/maria-5.1-wl21/

Igor Babaev igor at askmonty.org
Sat Jan 22 06:08:39 EET 2011


At file:///home/igor/maria/maria-5.1-wl21/

------------------------------------------------------------
revno: 2996
revision-id: igor at askmonty.org-20110122040838-iba5blia8f2tq9e7
parent: igor at askmonty.org-20101228045433-g6xcpaa64450jn9e
committer: Igor Babaev <igor at askmonty.org>
branch nick: maria-5.1-wl21
timestamp: Fri 2011-01-21 20:08:38 -0800
message:
  Fixed typo that caused printing 'range' instead of 'index_merge' as the type
  of sort_intersect scans.
   
-------------- next part --------------
=== modified file 'mysql-test/r/index_intersect.result'
--- a/mysql-test/r/index_intersect.result	2010-12-23 02:45:44 +0000
+++ b/mysql-test/r/index_intersect.result	2011-01-22 04:08:38 +0000
@@ -64,12 +64,12 @@
 SELECT * FROM City WHERE
 Name LIKE 'C%' AND Population > 1000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Name,Population	35,4	NULL	9	Using sort_intersect(Name,Population); Using where
+1	SIMPLE	City	index_merge	Population,Name	Name,Population	35,4	NULL	9	Using sort_intersect(Name,Population); Using where
 EXPLAIN
 SELECT * FROM City WHERE
 Name LIKE 'M%' AND Population > 1500000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Population,Name	4,35	NULL	5	Using sort_intersect(Population,Name); Using where
+1	SIMPLE	City	index_merge	Population,Name	Population,Name	4,35	NULL	5	Using sort_intersect(Population,Name); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Name LIKE 'M%' AND Population > 300000;
@@ -358,12 +358,12 @@
 SELECT * FROM City
 WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country,Name	Name,Population	35,4	NULL	9	Using sort_intersect(Name,Population); Using where
+1	SIMPLE	City	index_merge	Population,Country,Name	Name,Population	35,4	NULL	9	Using sort_intersect(Name,Population); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country,Name	Population,Country	4,3	NULL	19	Using sort_intersect(Population,Country); Using where
+1	SIMPLE	City	index_merge	Population,Country,Name	Population,Country	4,3	NULL	19	Using sort_intersect(Population,Country); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
@@ -456,7 +456,7 @@
 SELECT * FROM City
 WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	Country,Population	3,4	NULL	6	Using sort_intersect(Country,Population); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	Country,Population	3,4	NULL	6	Using sort_intersect(Country,Population); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'L%';
@@ -467,7 +467,7 @@
 WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
 AND Country BETWEEN 'S' AND 'Z';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	Population,PRIMARY	4,4	NULL	17	Using sort_intersect(Population,PRIMARY); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	Population,PRIMARY	4,4	NULL	17	Using sort_intersect(Population,PRIMARY); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
@@ -721,12 +721,12 @@
 SELECT * FROM City WHERE
 Name LIKE 'C%' AND Population > 1000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Name,Population	35,4	NULL	9	Using sort_intersect(Name,Population); Using where
+1	SIMPLE	City	index_merge	Population,Name	Name,Population	35,4	NULL	9	Using sort_intersect(Name,Population); Using where
 EXPLAIN
 SELECT * FROM City WHERE
 Name LIKE 'M%' AND Population > 1500000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Population,Name	4,35	NULL	5	Using sort_intersect(Population,Name); Using where
+1	SIMPLE	City	index_merge	Population,Name	Population,Name	4,35	NULL	5	Using sort_intersect(Population,Name); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE  Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
@@ -741,7 +741,7 @@
 SELECT * FROM City
 WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	Country,Population	3,4	NULL	6	Using sort_intersect(Country,Population); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	Country,Population	3,4	NULL	6	Using sort_intersect(Country,Population); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
@@ -888,17 +888,17 @@
 SELECT * FROM City 
 WHERE Country LIKE 'M%' AND Population > 1000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	15	Using sort_intersect(Population,CountryID); Using where
+1	SIMPLE	City	index_merge	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	15	Using sort_intersect(Population,CountryID); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Country='CHN' AND Population > 1500000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	11	Using sort_intersect(Population,CountryID); Using where
+1	SIMPLE	City	index_merge	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	11	Using sort_intersect(Population,CountryID); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name,CountryID,CountryName	CountryName,Population	38,4	NULL	1	Using sort_intersect(CountryName,Population); Using where
+1	SIMPLE	City	index_merge	Population,Name,CountryID,CountryName	CountryName,Population	38,4	NULL	1	Using sort_intersect(CountryName,Population); Using where
 SELECT * FROM City USE INDEX ()
 WHERE Country LIKE 'M%' AND Population > 1000000;
 ID	Name	Country	Population

=== modified file 'mysql-test/r/index_intersect_innodb.result'
--- a/mysql-test/r/index_intersect_innodb.result	2010-12-23 02:45:44 +0000
+++ b/mysql-test/r/index_intersect_innodb.result	2011-01-22 04:08:38 +0000
@@ -65,22 +65,22 @@
 SELECT * FROM City WHERE
 Name LIKE 'C%' AND Population > 1000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Population,Name	4,35	NULL	16	Using sort_intersect(Population,Name); Using where
+1	SIMPLE	City	index_merge	Population,Name	Population,Name	4,35	NULL	16	Using sort_intersect(Population,Name); Using where
 EXPLAIN
 SELECT * FROM City WHERE
 Name LIKE 'M%' AND Population > 1500000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Population,Name	4,35	NULL	9	Using sort_intersect(Population,Name); Using where
+1	SIMPLE	City	index_merge	Population,Name	Population,Name	4,35	NULL	9	Using sort_intersect(Population,Name); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Name LIKE 'M%' AND Population > 300000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Name,Population	35,4	NULL	79	Using sort_intersect(Name,Population); Using where
+1	SIMPLE	City	index_merge	Population,Name	Name,Population	35,4	NULL	79	Using sort_intersect(Name,Population); Using where
 EXPLAIN
 SELECT * FROM City
 WHERE Name LIKE 'M%' AND Population > 5000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Population,Name	4,35	NULL	1	Using sort_intersect(Population,Name); Using where
+1	SIMPLE	City	index_merge	Population,Name	Population,Name	4,35	NULL	1	Using sort_intersect(Population,Name); Using where
 SELECT * FROM City USE INDEX ()
 WHERE Name LIKE 'C%' AND Population > 1000000;
 ID	Name	Country	Population
@@ -359,17 +359,17 @@
 SELECT * FROM City
 WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country,Name	Population,Name,Country	4,35,3	NULL	2	Using sort_intersect(Population,Name,Country); Using where
+1	SIMPLE	City	index_merge	Population,Country,Name	Population,Name,Country	4,35,3	NULL	2	Using sort_intersect(Population,Name,Country); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country,Name	Population,Country,Name	4,3,35	NULL	2	Using sort_intersect(Population,Country,Name); Using where
+1	SIMPLE	City	index_merge	Population,Country,Name	Population,Country,Name	4,3,35	NULL	2	Using sort_intersect(Population,Country,Name); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country,Name	Name,Population,Country	35,4,3	NULL	7	Using sort_intersect(Name,Population,Country); Using where
+1	SIMPLE	City	index_merge	Population,Country,Name	Name,Population,Country	35,4,3	NULL	7	Using sort_intersect(Name,Population,Country); Using where
 SELECT * FROM City USE INDEX ()
 WHERE Name BETWEEN 'M' AND 'N' AND Population > 1000000 AND Country LIKE 'C%';
 ID	Name	Country	Population
@@ -452,29 +452,29 @@
 SELECT * FROM City
 WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	PRIMARY,Country,Population	4,3,4	NULL	11	Using sort_intersect(PRIMARY,Country,Population); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	PRIMARY,Country,Population	4,3,4	NULL	11	Using sort_intersect(PRIMARY,Country,Population); Using where
 EXPLAIN
 SELECT * FROM City
 WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	PRIMARY,Population,Country	4,4,3	NULL	1	Using sort_intersect(PRIMARY,Population,Country); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	PRIMARY,Population,Country	4,4,3	NULL	1	Using sort_intersect(PRIMARY,Population,Country); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE ID BETWEEN 2001 AND 2500 AND Population > 300000 AND Country LIKE 'L%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	PRIMARY,Country	4,3	NULL	10	Using sort_intersect(PRIMARY,Country); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	PRIMARY,Country	4,3	NULL	10	Using sort_intersect(PRIMARY,Country); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE ID BETWEEN 3701 AND 4000 AND Population > 1000000
 AND Country BETWEEN 'S' AND 'Z';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	PRIMARY,Country,Population	4,3,4	NULL	2	Using sort_intersect(PRIMARY,Country,Population); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	PRIMARY,Country,Population	4,3,4	NULL	2	Using sort_intersect(PRIMARY,Country,Population); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
 AND Country BETWEEN 'S' AND 'Z' ;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	PRIMARY,Population,Country	4,4,3	NULL	30	Using sort_intersect(PRIMARY,Population,Country); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	PRIMARY,Population,Country	4,4,3	NULL	30	Using sort_intersect(PRIMARY,Population,Country); Using where
 SELECT * FROM City USE INDEX ()
 WHERE ID BETWEEN 501 AND 1000 AND Population > 700000 AND Country LIKE 'C%';
 ID	Name	Country	Population
@@ -722,33 +722,33 @@
 SELECT * FROM City WHERE
 Name LIKE 'C%' AND Population > 1000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Population,Name	4,35	NULL	16	Using sort_intersect(Population,Name); Using where
+1	SIMPLE	City	index_merge	Population,Name	Population,Name	4,35	NULL	16	Using sort_intersect(Population,Name); Using where
 EXPLAIN
 SELECT * FROM City WHERE
 Name LIKE 'M%' AND Population > 1500000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name	Population,Name	4,35	NULL	9	Using sort_intersect(Population,Name); Using where
+1	SIMPLE	City	index_merge	Population,Name	Population,Name	4,35	NULL	9	Using sort_intersect(Population,Name); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE  Name BETWEEN 'G' AND 'J' AND Population > 1000000 AND Country LIKE 'B%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country,Name	Population,Country,Name	4,3,35	NULL	2	Using sort_intersect(Population,Country,Name); Using where
+1	SIMPLE	City	index_merge	Population,Country,Name	Population,Country,Name	4,3,35	NULL	2	Using sort_intersect(Population,Country,Name); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE  Name BETWEEN 'G' AND 'J' AND Population > 500000 AND Country LIKE 'C%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Country,Name	Name,Population,Country	35,4,3	NULL	7	Using sort_intersect(Name,Population,Country); Using where
+1	SIMPLE	City	index_merge	Population,Country,Name	Name,Population,Country	35,4,3	NULL	7	Using sort_intersect(Name,Population,Country); Using where
 EXPLAIN
 SELECT * FROM City
 WHERE ID BETWEEN 1 AND 500 AND Population > 1000000 AND Country LIKE 'A%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	PRIMARY,Population,Country	4,4,3	NULL	1	Using sort_intersect(PRIMARY,Population,Country); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	PRIMARY,Population,Country	4,4,3	NULL	1	Using sort_intersect(PRIMARY,Population,Country); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE ID BETWEEN 3001 AND 4000 AND Population > 600000
 AND Country BETWEEN 'S' AND 'Z';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	PRIMARY,Population,Country	PRIMARY,Country,Population	4,3,4	NULL	30	Using sort_intersect(PRIMARY,Country,Population); Using where
+1	SIMPLE	City	index_merge	PRIMARY,Population,Country	PRIMARY,Country,Population	4,3,4	NULL	30	Using sort_intersect(PRIMARY,Country,Population); Using where
 SELECT * FROM City WHERE
 Name LIKE 'C%' AND Population > 1000000;
 ID	Name	Country	Population
@@ -889,17 +889,17 @@
 SELECT * FROM City 
 WHERE Country LIKE 'M%' AND Population > 1000000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	16	Using sort_intersect(Population,CountryID); Using where
+1	SIMPLE	City	index_merge	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	16	Using sort_intersect(Population,CountryID); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Country='CHN' AND Population > 1500000;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	11	Using sort_intersect(Population,CountryID); Using where
+1	SIMPLE	City	index_merge	Population,CountryID,CountryName	Population,CountryID	4,3	NULL	11	Using sort_intersect(Population,CountryID); Using where
 EXPLAIN
 SELECT * FROM City 
 WHERE Country='CHN' AND Population > 1500000 AND Name LIKE 'C%';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	range	Population,Name,CountryID,CountryName	CountryName,Population	38,4	NULL	1	Using sort_intersect(CountryName,Population); Using where
+1	SIMPLE	City	index_merge	Population,Name,CountryID,CountryName	CountryName,Population	38,4	NULL	1	Using sort_intersect(CountryName,Population); Using where
 SELECT * FROM City USE INDEX ()
 WHERE Country LIKE 'M%' AND Population > 1000000;
 ID	Name	Country	Population
@@ -1029,7 +1029,7 @@
 SELECT * FROM t1
 WHERE (f1 < 535  OR  f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	PRIMARY,f4	PRIMARY,f4	4,35	NULL	1	Using sort_intersect(PRIMARY,f4); Using where
+1	SIMPLE	t1	index_merge	PRIMARY,f4	PRIMARY,f4	4,35	NULL	1	Using sort_intersect(PRIMARY,f4); Using where
 SELECT * FROM t1
 WHERE (f1 < 535  OR  f1 > 985) AND ( f4='r' OR f4 LIKE 'a%' ) ;
 f1	f4	f5

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-12-23 02:45:44 +0000
+++ b/sql/sql_select.cc	2011-01-22 04:08:38 +0000
@@ -16885,7 +16885,7 @@
       {
         quick_type= tab->select->quick->get_type();
         if ((quick_type == QUICK_SELECT_I::QS_TYPE_INDEX_MERGE) ||
-            (quick_type == QUICK_SELECT_I::QS_TYPE_ROR_INTERSECT) ||
+            (quick_type == QUICK_SELECT_I::QS_TYPE_INDEX_INTERSECT) ||
             (quick_type == QUICK_SELECT_I::QS_TYPE_ROR_INTERSECT) ||
             (quick_type == QUICK_SELECT_I::QS_TYPE_ROR_UNION))
           tab->type = JT_INDEX_MERGE;



More information about the commits mailing list