List:Commits« Previous MessageNext Message »
From:Joerg Bruehe Date:September 26 2006 10:00am
Subject:bk commit into 5.0 tree (joerg:1.2285)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of joerg. When joerg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-09-26 12:00:18+02:00, joerg@trift2. +8 -0
  Merge trift2.:/MySQL/M50/clone-5.0
  into  trift2.:/MySQL/M50/push-5.0
  MERGE: 1.2258.2.5

  mysql-test/r/func_time.result@stripped, 2006-09-26 11:55:16+02:00, joerg@trift2. +0 -11
    Null-merge, the change in the 5.0 general tree supersedes the 5.0.25 patch.
    MERGE: 1.67.1.2

  mysql-test/r/query_cache.result@stripped, 2006-09-26 11:57:50+02:00, joerg@trift2. +0 -6
    Auto merged
    MERGE: 1.73.1.2

  mysql-test/r/type_date.result@stripped, 2006-09-26 11:57:50+02:00, joerg@trift2. +0 -8
    Auto merged
    MERGE: 1.13.1.1

  mysql-test/r/view.result@stripped, 2006-09-26 11:58:36+02:00, joerg@trift2. +0 -2
    Null-merge, the change in the 5.0 general tree supersedes the 5.0.25 patch.
    MERGE: 1.174.1.2

  mysql-test/t/func_time.test@stripped, 2006-09-26 11:59:29+02:00, joerg@trift2. +0 -11
    Null-merge, the change in the 5.0 general tree supersedes the 5.0.25 patch.
    MERGE: 1.55.1.2

  mysql-test/t/type_date.test@stripped, 2006-09-26 11:59:33+02:00, joerg@trift2. +0 -9
    Auto merged
    MERGE: 1.11.1.1

  mysql-test/t/view.test@stripped, 2006-09-26 11:59:46+02:00, joerg@trift2. +0 -2
    Null-merge, the change in the 5.0 general tree supersedes the 5.0.25 patch.
    MERGE: 1.161.1.2

  sql/item_cmpfunc.cc@stripped, 2006-09-26 12:00:09+02:00, joerg@trift2. +0 -7
    Null-merge, the change in the 5.0 general tree supersedes the 5.0.25 patch.
    MERGE: 1.217.1.1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	joerg
# Host:	trift2.
# Root:	/MySQL/M50/push-5.0/RESYNC

--- 1.175/mysql-test/r/view.result	2006-09-26 12:00:30 +02:00
+++ 1.176/mysql-test/r/view.result	2006-09-26 12:00:30 +02:00
@@ -49,7 +49,7 @@
 ERROR 42S22: Unknown column 'v1.b' in 'field list'
 explain extended select c from v1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	5	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
 Warnings:
 Note	1003	select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1`
 create algorithm=temptable view v2 (c) as select b+1 from t1;
@@ -83,7 +83,7 @@
 12
 explain extended select c from v3;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	5	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	
 Warnings:
 Note	1003	select ((`test`.`t1`.`b` + 1) + 1) AS `c` from `test`.`t1`
 create algorithm=temptable view v4 (c) as select c+1 from v2;
@@ -376,7 +376,7 @@
 30
 explain extended select * from v1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	5	Using where
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	Using where
 Warnings:
 Note	1003	select `test`.`t1`.`b` AS `c` from `test`.`t1` where (`test`.`t1`.`a` < 3)
 update v1 set c=c+1;
@@ -1391,9 +1391,9 @@
 4	NULL	NULL
 explain extended select * from t3 left join v3 on (t3.a = v3.a);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t3	ALL	NULL	NULL	NULL	NULL	3	
-1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	
-1	PRIMARY	t2	ALL	NULL	NULL	NULL	NULL	2	
+1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	3	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	2	
 Warnings:
 Note	1003	select `test`.`t3`.`a` AS `a`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `b` from `test`.`t3` left join (`test`.`t1` left join `test`.`t2` on((`test`.`t1`.`a` = `test`.`t2`.`a`))) on((`test`.`t3`.`a` = `test`.`t1`.`a`)) where 1
 create view v1 (a) as select a from t1;
@@ -1406,9 +1406,9 @@
 4	NULL	NULL
 explain extended select * from t3 left join v4 on (t3.a = v4.a);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t3	ALL	NULL	NULL	NULL	NULL	3	
-1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	
-1	PRIMARY	t2	ALL	NULL	NULL	NULL	NULL	2	
+1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	3	
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	2	
 Warnings:
 Note	1003	select `test`.`t3`.`a` AS `a`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `b` from `test`.`t3` left join (`test`.`t1` left join (`test`.`t2`) on((`test`.`t1`.`a` = `test`.`t2`.`a`))) on((`test`.`t3`.`a` = `test`.`t1`.`a`)) where 1
 prepare stmt1 from "select * from t3 left join v4 on (t3.a = v4.a);";
@@ -2321,12 +2321,12 @@
 1	SIMPLE	t2	ref	a	a	10	const,test.t1.b	2	Using where; Using index
 EXPLAIN SELECT * FROM v1 WHERE a=1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	ref	a	a	5	const	1	Using where; Using index
-1	PRIMARY	t2	ref	a	a	10	const,test.t1.b	2	Using where; Using index
+1	SIMPLE	t1	ref	a	a	5	const	1	Using where; Using index
+1	SIMPLE	t2	ref	a	a	10	const,test.t1.b	2	Using where; Using index
 EXPLAIN SELECT * FROM v2 WHERE a=1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	ref	a	a	5	const	1	Using where; Using index
-1	PRIMARY	t3	ALL	NULL	NULL	NULL	NULL	3	Using where
+1	SIMPLE	t1	ref	a	a	5	const	1	Using where; Using index
+1	SIMPLE	t3	ALL	NULL	NULL	NULL	NULL	3	Using where
 DROP VIEW v1,v2;
 DROP TABLE t1,t2,t3;
 create table t1 (f1 int);
@@ -2409,7 +2409,7 @@
 create view v1 as select * from t1;
 explain select id from v1 order by id;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	index	NULL	PRIMARY	4	NULL	2	Using index
+1	SIMPLE	t1	index	NULL	PRIMARY	4	NULL	2	Using index
 drop view v1;
 drop table t1;
 create table t1(f1 int, f2 int);
@@ -2480,7 +2480,7 @@
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 EXPLAIN SELECT MAX(a) FROM v1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 SELECT MIN(a) FROM t1;
 MIN(a)
 0
@@ -2492,7 +2492,7 @@
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 EXPLAIN SELECT MIN(a) FROM v1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (x varchar(10));
@@ -2915,5 +2915,24 @@
 DROP FUNCTION f1;
 DROP FUNCTION f2;
 DROP VIEW v1, v2;
+DROP TABLE t1;
+CREATE TABLE t1 (s1 int);
+CREATE VIEW v1 AS SELECT * FROM t1;
+EXPLAIN SELECT * FROM t1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	0	const row not found
+EXPLAIN SELECT * FROM v1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	0	const row not found
+INSERT INTO t1 VALUES (1), (3), (2);
+EXPLAIN SELECT * FROM t1 t WHERE t.s1+1 < (SELECT MAX(t1.s1) FROM t1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t	ALL	NULL	NULL	NULL	NULL	3	Using where
+2	SUBQUERY	t1	ALL	NULL	NULL	NULL	NULL	3	
+EXPLAIN SELECT * FROM v1 t WHERE t.s1+1 < (SELECT MAX(t1.s1) FROM t1);
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	3	Using where
+2	SUBQUERY	t1	ALL	NULL	NULL	NULL	NULL	3	
+DROP VIEW v1;
 DROP TABLE t1;
 End of 5.0 tests.

--- 1.162/mysql-test/t/view.test	2006-09-26 12:00:30 +02:00
+++ 1.163/mysql-test/t/view.test	2006-09-26 12:00:30 +02:00
@@ -2833,5 +2833,21 @@
 DROP VIEW v1, v2;
 DROP TABLE t1;
 
+#
+# Bug #5500: wrong select_type in EXPLAIN output for queries over views
+#
 
+CREATE TABLE t1 (s1 int); 
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+EXPLAIN SELECT * FROM t1;
+EXPLAIN SELECT * FROM v1;
+
+INSERT INTO t1 VALUES (1), (3), (2);
+
+EXPLAIN SELECT * FROM t1 t WHERE t.s1+1 < (SELECT MAX(t1.s1) FROM t1); 
+EXPLAIN SELECT * FROM v1 t WHERE t.s1+1 < (SELECT MAX(t1.s1) FROM t1); 
+
+DROP VIEW v1;
+DROP TABLE t1;
 --echo End of 5.0 tests.

--- 1.68/mysql-test/r/func_time.result	2006-09-26 12:00:30 +02:00
+++ 1.69/mysql-test/r/func_time.result	2006-09-26 12:00:30 +02:00
@@ -867,9 +867,11 @@
 select f1 from t1 where cast("2006-1-1" as date) between date(f1) and date(f3);
 f1
 2006-01-01
-select f1 from t1 where cast("2006-1-1" as date) between f1 and 'zzz';
+select f1 from t1 where cast("2006-1-1" as date) between f1 and cast('zzz' as date);
 f1
-2006-01-01
+Warnings:
+Warning	1292	Truncated incorrect datetime value: 'zzz'
+Warning	1292	Truncated incorrect datetime value: 'zzz'
 select f1 from t1 where makedate(2006,1) between date(f1) and date(f3);
 f1
 2006-01-01

--- 1.56/mysql-test/t/func_time.test	2006-09-26 12:00:30 +02:00
+++ 1.57/mysql-test/t/func_time.test	2006-09-26 12:00:30 +02:00
@@ -432,7 +432,7 @@
 select f3 from t1 where timestamp(f3) between cast("2006-1-1 12:1:1" as datetime) and cast("2006-1-1 12:1:2" as datetime);
 select f1 from t1 where cast("2006-1-1" as date) between f1 and f3;
 select f1 from t1 where cast("2006-1-1" as date) between date(f1) and date(f3);
-select f1 from t1 where cast("2006-1-1" as date) between f1 and 'zzz';
+select f1 from t1 where cast("2006-1-1" as date) between f1 and cast('zzz' as date);
 select f1 from t1 where makedate(2006,1) between date(f1) and date(f3);
 select f1 from t1 where makedate(2006,2) between date(f1) and date(f3);
 drop table t1;
Thread
bk commit into 5.0 tree (joerg:1.2285)Joerg Bruehe26 Sep