List:Internals« Previous MessageNext Message »
From:sanja Date:July 23 2005 12:07am
Subject:bk commit into 5.0 tree (bell:1.1891) BUG#12122
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell 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.1891 05/07/23 01:07:45 bell@stripped +3 -0
  ORDER BY should not prevent MERGE algorithm (BUG#12122)

  sql/sql_lex.cc
    1.159 05/07/23 01:07:41 bell@stripped +0 -1
    ORDER BY should not prevent MERGE algorithm

  mysql-test/t/view.test
    1.90 05/07/23 01:07:41 bell@stripped +10 -0
    ORDER BY do not prevent MERGE algorithm

  mysql-test/r/view.result
    1.96 05/07/23 01:07:40 bell@stripped +8 -0
    ORDER BY do not prevent MERGE algorithm

# 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:	bell
# Host:	sanja.is.com.ua
# Root:	/home/bell/mysql/bk/work-order-5.0

--- 1.158/sql/sql_lex.cc	2005-07-14 23:41:52 +03:00
+++ 1.159/sql/sql_lex.cc	2005-07-23 01:07:41 +03:00
@@ -1641,7 +1641,6 @@
   }
 
   return (selects_allow_merge &&
-	  select_lex.order_list.elements == 0 &&
 	  select_lex.group_list.elements == 0 &&
 	  select_lex.having == 0 &&
           select_lex.with_sum_func == 0 &&

--- 1.95/mysql-test/r/view.result	2005-07-20 05:59:29 +03:00
+++ 1.96/mysql-test/r/view.result	2005-07-23 01:07:40 +03:00
@@ -2024,3 +2024,11 @@
 2005-01-01 12:00:00	2005-01-01 10:58:59
 drop view v1;
 drop table t1;
+create table t1 (a int);
+create view v1 as select a from t1 order by 1;
+insert into t1 values (1), (2);
+explain select * from v1 where a=1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	2	Using where
+drop view v1;
+drop table t1;

--- 1.89/mysql-test/t/view.test	2005-07-20 05:59:29 +03:00
+++ 1.90/mysql-test/t/view.test	2005-07-23 01:07:41 +03:00
@@ -1863,3 +1863,13 @@
 select * from v1;
 drop view v1;
 drop table t1; 
+
+#
+# ORDER BY do not prevent MERGE algorithm (BUG#12122)
+#
+create table t1 (a int);
+create view v1 as select a from t1 order by 1;
+insert into t1 values (1), (2);
+explain select * from v1 where a=1;
+drop view v1;
+drop table t1;
Thread
bk commit into 5.0 tree (bell:1.1891) BUG#12122sanja23 Jul