List:Commits« Previous MessageNext Message »
From:igor Date:May 18 2006 6:30pm
Subject:bk commit into 5.0 tree (igor:1.2132)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of igor. When igor 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
  1.2132 06/05/18 11:30:42 igor@stripped +4 -0
  Merge rurik.mysql.com:/home/igor/mysql-5.0
  into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2

  mysql-test/t/view.test
    1.145 06/05/18 11:30:36 igor@stripped +0 -0
    SCCS merged

  mysql-test/r/view.result
    1.158 06/05/18 11:30:36 igor@stripped +0 -0
    SCCS merged

  sql/item_cmpfunc.cc
    1.202 06/05/18 11:25:38 igor@stripped +0 -0
    Auto merged

  sql/item.cc
    1.224 06/05/18 11:25:38 igor@stripped +0 -0
    Auto merged

# 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:	igor
# Host:	rurik.mysql.com
# Root:	/home/igor/dev/mysql-5.0-2/RESYNC

--- 1.223/sql/item.cc	2006-05-16 22:19:36 -07:00
+++ 1.224/sql/item.cc	2006-05-18 11:25:38 -07:00
@@ -304,6 +304,7 @@
   marker= 0;
   maybe_null=null_value=with_sum_func=unsigned_flag=0;
   decimals= 0; max_length= 0;
+  with_subselect= 0;
 
   /* Put item in free list so that we can free all items at end */
   THD *thd= current_thd;

--- 1.201/sql/item_cmpfunc.cc	2006-05-17 13:52:19 -07:00
+++ 1.202/sql/item_cmpfunc.cc	2006-05-18 11:25:38 -07:00
@@ -2588,7 +2588,9 @@
 	(item= *li.ref())->check_cols(1))
       return TRUE; /* purecov: inspected */
     used_tables_cache|=     item->used_tables();
-    if (!item->const_item())
+    if (item->const_item())
+      and_tables_cache= (table_map) 0;
+    else
     {
       tmp_table_map= item->not_null_tables();
       not_null_tables_cache|= tmp_table_map;

--- 1.157/mysql-test/r/view.result	2006-05-16 22:19:36 -07:00
+++ 1.158/mysql-test/r/view.result	2006-05-18 11:30:36 -07:00
@@ -2660,6 +2660,15 @@
 id	t	COUNT(*)
 DROP VIEW v1;
 DROP TABLE t1;
+CREATE TABLE t1 (i INT, j BIGINT);
+INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2);
+CREATE VIEW v1 AS SELECT MIN(j) AS j FROM t1;
+CREATE VIEW v2 AS SELECT MIN(i) FROM t1 WHERE j = ( SELECT * FROM v1 );
+SELECT * FROM v2;
+MIN(i)
+1
+DROP VIEW v2, v1;
+DROP TABLE t1;
 CREATE TABLE t1(
 fName varchar(25) NOT NULL,
 lName varchar(25) NOT NULL,

--- 1.144/mysql-test/t/view.test	2006-05-16 22:19:36 -07:00
+++ 1.145/mysql-test/t/view.test	2006-05-18 11:30:36 -07:00
@@ -2530,6 +2530,17 @@
 DROP TABLE t1;
 
 #
+# Bug#19077: A nested materialized view is used before being populated.
+#
+CREATE TABLE t1 (i INT, j BIGINT);
+INSERT INTO t1 VALUES (1, 2), (2, 2), (3, 2);
+CREATE VIEW v1 AS SELECT MIN(j) AS j FROM t1;
+CREATE VIEW v2 AS SELECT MIN(i) FROM t1 WHERE j = ( SELECT * FROM v1 );
+SELECT * FROM v2;
+DROP VIEW v2, v1;
+DROP TABLE t1;
+
+#
 # Bug #19573: VIEW with HAVING that refers an alias name
 # 
 
Thread
bk commit into 5.0 tree (igor:1.2132)igor18 May