List:Commits« Previous MessageNext Message »
From:igor Date:June 16 2006 3:40am
Subject:bk commit into 5.0 tree (igor:1.2169)
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.2169 06/06/15 18:40:18 igor@stripped +4 -0
  Merge rurik.mysql.com:/home/igor/mysql-4.1-opt
  into  rurik.mysql.com:/home/igor/mysql-5.0-opt

  mysql-test/r/func_group.result
    1.50 06/06/15 18:40:13 igor@stripped +0 -0
    SCCS merged

  sql/opt_sum.cc
    1.55 06/06/15 18:39:14 igor@stripped +0 -0
    Auto merged

  sql/field.cc
    1.310 06/06/15 18:39:14 igor@stripped +0 -0
    Auto merged

  mysql-test/t/func_group.test
    1.48 06/06/15 18:39:14 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/mysql-5.0-opt/RESYNC

--- 1.54/sql/opt_sum.cc	2006-06-15 18:36:39 -07:00
+++ 1.55/sql/opt_sum.cc	2006-06-15 18:39:14 -07:00
@@ -710,8 +710,10 @@
       if (!(table->file->index_flags(idx, jdx, 0) & HA_READ_ORDER))
         return 0;
 
-        /* Check whether the index component is partial */
-      if (part->length < table->field[part->fieldnr-1]->pack_length())
+      /* Check whether the index component is partial */
+      Field *part_field= table->field[part->fieldnr-1];
+      if ((part_field->flags & BLOB_FLAG) ||
+          part->length < part_field->key_length())
         break;
 
       if (field->eq(part->field))

--- 1.49/mysql-test/r/func_group.result	2006-06-02 17:06:05 -07:00
+++ 1.50/mysql-test/r/func_group.result	2006-06-15 18:40:13 -07:00
@@ -845,6 +845,19 @@
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	
 DROP TABLE t1;
+CREATE TABLE t1 (id int , b varchar(512), INDEX(b(250))) COLLATE latin1_bin;
+Warnings:
+Warning	1246	Converting column 'b' from CHAR to TEXT
+INSERT INTO t1 VALUES
+(1,CONCAT(REPEAT('_', 250), "qq")), (1,CONCAT(REPEAT('_', 250), "zz")),
+(1,CONCAT(REPEAT('_', 250), "aa")), (1,CONCAT(REPEAT('_', 250), "ff"));
+SELECT MAX(b) FROM t1;
+MAX(b)
+__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________zz
+EXPLAIN SELECT MAX(b) FROM t1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	4	
+DROP TABLE t1;
 create table t2 (ff double);
 insert into t2 values (2.2);
 select cast(sum(distinct ff) as decimal(5,2)) from t2;

--- 1.47/mysql-test/t/func_group.test	2006-06-02 17:06:05 -07:00
+++ 1.48/mysql-test/t/func_group.test	2006-06-15 18:39:14 -07:00
@@ -558,6 +558,15 @@
 EXPLAIN SELECT MAX(b) FROM t1;
 DROP TABLE t1;
 
+CREATE TABLE t1 (id int , b varchar(512), INDEX(b(250))) COLLATE latin1_bin;
+INSERT INTO t1 VALUES
+  (1,CONCAT(REPEAT('_', 250), "qq")), (1,CONCAT(REPEAT('_', 250), "zz")),
+  (1,CONCAT(REPEAT('_', 250), "aa")), (1,CONCAT(REPEAT('_', 250), "ff"));
+
+SELECT MAX(b) FROM t1;
+EXPLAIN SELECT MAX(b) FROM t1;
+DROP TABLE t1;
+
 # End of 4.1 tests
 
 #
Thread
bk commit into 5.0 tree (igor:1.2169)igor16 Jun