Below is the list of changes that have just been committed into a local
5.1 repository of evgen. When evgen 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-07-31 23:49:52+04:00, evgen@stripped +3 -0
Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
MERGE: 1.1810.1696.100
mysql-test/r/func_group.result@stripped, 2006-07-31 23:49:15+04:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.47.1.7
mysql-test/r/select.result@stripped, 2006-07-31 23:49:50+04:00, evgen@stripped +0 -0
SCCS merged
MERGE: 1.121.1.16
sql/sql_select.cc@stripped, 2006-07-31 23:49:15+04:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.312.1.130
# 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: evgen
# Host: sunlight.local
# Root: /local_work/tmp_merge-5.1-opt-mysql/RESYNC
--- 1.425/sql/sql_select.cc 2006-07-31 23:49:57 +04:00
+++ 1.426/sql/sql_select.cc 2006-07-31 23:49:57 +04:00
@@ -697,8 +697,9 @@
Notice that make_cond_for_table() will always succeed to remove all
computed conditions, because opt_sum_query() is applicable only to
conjunctions.
+ Preserve conditions for EXPLAIN.
*/
- if (conds)
+ if (conds && !(thd->lex->describe & DESCRIBE_EXTENDED))
{
COND *table_independent_conds=
make_cond_for_table(conds, PSEUDO_TABLE_BITS, 0);
--- 1.52/mysql-test/r/func_group.result 2006-07-31 23:49:57 +04:00
+++ 1.53/mysql-test/r/func_group.result 2006-07-31 23:49:57 +04:00
@@ -812,144 +812,6 @@
MAX(id)
NULL
DROP TABLE t1;
-create table t1m (a int) engine=myisam;
-create table t1i (a int) engine=innodb;
-create table t2m (a int) engine=myisam;
-create table t2i (a int) engine=innodb;
-insert into t2m values (5);
-insert into t2i values (5);
-select min(a) from t1m;
-min(a)
-NULL
-select min(7) from t1m;
-min(7)
-NULL
-select min(7) from DUAL;
-min(7)
-NULL
-explain select min(7) from t2m join t1m;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-select min(7) from t2m join t1m;
-min(7)
-NULL
-select max(a) from t1m;
-max(a)
-NULL
-select max(7) from t1m;
-max(7)
-NULL
-select max(7) from DUAL;
-max(7)
-NULL
-explain select max(7) from t2m join t1m;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-select max(7) from t2m join t1m;
-max(7)
-NULL
-select 1, min(a) from t1m where a=99;
-1 min(a)
-1 NULL
-select 1, min(a) from t1m where 1=99;
-1 min(a)
-1 NULL
-select 1, min(1) from t1m where a=99;
-1 min(1)
-1 NULL
-select 1, min(1) from t1m where 1=99;
-1 min(1)
-1 NULL
-select 1, max(a) from t1m where a=99;
-1 max(a)
-1 NULL
-select 1, max(a) from t1m where 1=99;
-1 max(a)
-1 NULL
-select 1, max(1) from t1m where a=99;
-1 max(1)
-1 NULL
-select 1, max(1) from t1m where 1=99;
-1 max(1)
-1 NULL
-select min(a) from t1i;
-min(a)
-NULL
-select min(7) from t1i;
-min(7)
-NULL
-select min(7) from DUAL;
-min(7)
-NULL
-explain select min(7) from t2i join t1i;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2i ALL NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
-select min(7) from t2i join t1i;
-min(7)
-NULL
-select max(a) from t1i;
-max(a)
-NULL
-select max(7) from t1i;
-max(7)
-NULL
-select max(7) from DUAL;
-max(7)
-NULL
-explain select max(7) from t2i join t1i;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2i ALL NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
-select max(7) from t2i join t1i;
-max(7)
-NULL
-select 1, min(a) from t1i where a=99;
-1 min(a)
-1 NULL
-select 1, min(a) from t1i where 1=99;
-1 min(a)
-1 NULL
-select 1, min(1) from t1i where a=99;
-1 min(1)
-1 NULL
-select 1, min(1) from t1i where 1=99;
-1 min(1)
-1 NULL
-select 1, max(a) from t1i where a=99;
-1 max(a)
-1 NULL
-select 1, max(a) from t1i where 1=99;
-1 max(a)
-1 NULL
-select 1, max(1) from t1i where a=99;
-1 max(1)
-1 NULL
-select 1, max(1) from t1i where 1=99;
-1 max(1)
-1 NULL
-explain select count(*), min(7), max(7) from t1m, t1i;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
-select count(*), min(7), max(7) from t1m, t1i;
-count(*) min(7) max(7)
-0 NULL NULL
-explain select count(*), min(7), max(7) from t1m, t2i;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found
-1 SIMPLE t2i ALL NULL NULL NULL NULL 1
-select count(*), min(7), max(7) from t1m, t2i;
-count(*) min(7) max(7)
-0 NULL NULL
-explain select count(*), min(7), max(7) from t2m, t1i;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2m system NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
-select count(*), min(7), max(7) from t2m, t1i;
-count(*) min(7) max(7)
-0 NULL NULL
-drop table t1m, t1i, t2m, t2i;
CREATE TABLE t1 (id int PRIMARY KEY, b char(3), INDEX(b));
INSERT INTO t1 VALUES (1,'xx'), (2,'aa');
SELECT * FROM t1;
--- 1.133/mysql-test/r/select.result 2006-07-31 23:49:57 +04:00
+++ 1.134/mysql-test/r/select.result 2006-07-31 23:49:57 +04:00
@@ -2756,6 +2756,55 @@
1 NULL 4 10
2 10 4 10
DROP TABLE IF EXISTS t1,t2;
+CREATE TABLE t1 (key1 float default NULL, UNIQUE KEY key1 (key1));
+CREATE TABLE t2 (key2 float default NULL, UNIQUE KEY key2 (key2));
+INSERT INTO t1 VALUES (0.3762),(0.3845),(0.6158),(0.7941);
+INSERT INTO t2 VALUES (1.3762),(1.3845),(1.6158),(1.7941);
+explain select max(key1) from t1 where key1 <= 0.6158;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+explain select max(key2) from t2 where key2 <= 1.6158;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+explain select min(key1) from t1 where key1 >= 0.3762;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+explain select min(key2) from t2 where key2 >= 1.3762;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+explain select max(key1), min(key2) from t1, t2
+where key1 <= 0.6158 and key2 >= 1.3762;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+select max(key1) from t1 where key1 <= 0.6158;
+max(key1)
+0.61580002307892
+select max(key2) from t2 where key2 <= 1.6158;
+max(key2)
+1.6158000230789
+select min(key1) from t1 where key1 >= 0.3762;
+min(key1)
+0.37619999051094
+select min(key2) from t2 where key2 >= 1.3762;
+min(key2)
+1.3761999607086
+select max(key1), min(key2) from t1, t2
+where key1 <= 0.6158 and key2 >= 1.3762;
+max(key1) min(key2)
+0.61580002307892 1.3761999607086
+select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
+max(key1)
+0.61580002307892
+select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
+min(key1)
+0.37619999051094
+DROP TABLE t1,t2;
CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
INSERT INTO t1 VALUES (10);
SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
@@ -3151,55 +3200,6 @@
from t1 inner join (t2 right join t3 on t2.id = t3.b_id) on t1.id = t3.a_id;
count(*)
6
-CREATE TABLE t1 (key1 float default NULL, UNIQUE KEY key1 (key1));
-CREATE TABLE t2 (key2 float default NULL, UNIQUE KEY key2 (key2));
-INSERT INTO t1 VALUES (0.3762),(0.3845),(0.6158),(0.7941);
-INSERT INTO t2 VALUES (1.3762),(1.3845),(1.6158),(1.7941);
-explain select max(key1) from t1 where key1 <= 0.6158;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-explain select max(key2) from t2 where key2 <= 1.6158;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-explain select min(key1) from t1 where key1 >= 0.3762;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-explain select min(key2) from t2 where key2 >= 1.3762;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-explain select max(key1), min(key2) from t1, t2
-where key1 <= 0.6158 and key2 >= 1.3762;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-explain select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-explain select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
-select max(key1) from t1 where key1 <= 0.6158;
-max(key1)
-0.61580002307892
-select max(key2) from t2 where key2 <= 1.6158;
-max(key2)
-1.6158000230789
-select min(key1) from t1 where key1 >= 0.3762;
-min(key1)
-0.37619999051094
-select min(key2) from t2 where key2 >= 1.3762;
-min(key2)
-1.3761999607086
-select max(key1), min(key2) from t1, t2
-where key1 <= 0.6158 and key2 >= 1.3762;
-max(key1) min(key2)
-0.61580002307892 1.3761999607086
-select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5;
-max(key1)
-0.61580002307892
-select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
-min(key1)
-0.37619999051094
-DROP TABLE t1,t2;
drop table t1,t2,t3;
create table t1 (a int);
create table t2 (b int);
| Thread |
|---|
| • bk commit into 5.1 tree (evgen:1.2248) | eugene | 1 Aug |