Below is the list of changes that have just been committed into a local
5.1 repository of svoj. When svoj 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-12-26 22:10:02+04:00, svoj@stripped +2 -0
After merge fix.
mysql-test/r/index_merge_myisam.result@stripped, 2006-12-26 22:09:59+04:00, svoj@stripped +12 -1
After merge fix.
sql/opt_range.cc@stripped, 2006-12-26 22:09:59+04:00, svoj@stripped +10 -5
After merge fix.
# 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: svoj
# Host: june.mysql.com
# Root: /home/svoj/devel/mysql/BUG25048/mysql-5.1-engines
--- 1.253/sql/opt_range.cc 2006-12-26 18:04:25 +04:00
+++ 1.254/sql/opt_range.cc 2006-12-26 22:09:59 +04:00
@@ -1002,6 +1002,11 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT(
if (file)
{
range_end();
+ if (head->key_read)
+ {
+ head->key_read= 0;
+ file->extra(HA_EXTRA_NO_KEYREAD);
+ }
if (free_file)
{
DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file,
@@ -1010,10 +1015,6 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT(
file->close();
delete file;
}
- else
- {
- file->extra(HA_EXTRA_NO_KEYREAD);
- }
}
delete_dynamic(&ranges); /* ranges are allocated in alloc */
free_root(&alloc,MYF(0));
@@ -1195,7 +1196,11 @@ end:
org_file= head->file;
head->file= file;
/* We don't have to set 'head->keyread' here as the 'file' is unique */
- head->mark_columns_used_by_index(index);
+ if (!head->no_keyread)
+ {
+ head->key_read= 1;
+ head->mark_columns_used_by_index(index);
+ }
head->prepare_for_position();
head->file= org_file;
bitmap_copy(&column_bitmap, head->read_set);
--- 1.4/mysql-test/r/index_merge_myisam.result 2006-09-18 19:55:52 +05:00
+++ 1.5/mysql-test/r/index_merge_myisam.result 2006-12-26 22:09:59 +04:00
@@ -286,7 +286,7 @@ NULL UNION RESULT <union1,2> ALL NULL NU
explain select * from (select * from t1 where key1 = 3 or key2 =3) as Z where key8 >5;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
-2 DERIVED t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
+2 DERIVED t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where; Using index
create table t3 like t0;
insert into t3 select * from t0;
alter table t3 add key9 int not null, add index i9(key9);
@@ -696,6 +696,17 @@ explain select a from t2 where a='ab';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref a a 6 const 1 Using where
drop table t2;
+CREATE TABLE t1(c1 INT, c2 INT DEFAULT 0, c3 CHAR(255) DEFAULT '',
+KEY(c1), KEY(c2), KEY(c3));
+INSERT INTO t1(c1) VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),
+(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0);
+INSERT INTO t1 VALUES(0,0,0);
+CREATE TABLE t2(c1 int);
+INSERT INTO t2 VALUES(1);
+DELETE t1 FROM t1,t2 WHERE t1.c1=0 AND t1.c2=0;
+SELECT * FROM t1;
+c1 c2 c3
+DROP TABLE t1,t2;
#---------------- Index merge test 2 -------------------------------------------
SET SESSION STORAGE_ENGINE = MyISAM;
drop table if exists t1,t2;
| Thread |
|---|
| • bk commit into 5.1 tree (svoj:1.2368) | Sergey Vojtovich | 26 Dec |