Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh 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.2091 06/02/09 17:40:32 gluh@stripped +3 -0
Fix for bug#16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
If partition has subpartitions then part_id is sub part position
in the list of partitions. So to get part_no of this sub part
we need to divide part_id by no_subparts.
sql/sql_partition.cc
1.31 06/02/09 17:38:54 gluh@stripped +2 -1
Fix for bug#16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
If partition has subpartitions then part_id is sub part position
in the list of partitions. So to get part_no of this sub part
we need to divide part_id by no_subparts.
mysql-test/t/partition.test
1.12 06/02/09 17:38:54 gluh@stripped +12 -0
Fix for bug#16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
test case
mysql-test/r/partition.result
1.11 06/02/09 17:38:54 gluh@stripped +11 -0
Fix for bug#16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
test case
# 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: gluh
# Host: eagle.intranet.mysql.r18.ru
# Root: /home/gluh/MySQL/Bugs/5.1.16907
--- 1.10/mysql-test/r/partition.result Wed Jan 18 14:56:17 2006
+++ 1.11/mysql-test/r/partition.result Thu Feb 9 17:38:54 2006
@@ -278,3 +278,14 @@ partition p1 values in (14)
insert into t1 values (10,1);
ERROR HY000: Table has no partition for value 11
drop table t1;
+create table t1 (f1 integer,f2 integer, unique index(f1))
+partition by range(f1 div 2)
+subpartition by hash(f1) subpartitions 2
+(partition partb values less than (2),
+partition parte values less than (4),
+partition partf values less than (10000));
+insert into t1 values(10,1);
+select * from t1 where f1 = 10;
+f1 f2
+10 1
+drop table t1;
--- 1.11/mysql-test/t/partition.test Wed Jan 18 15:09:00 2006
+++ 1.12/mysql-test/t/partition.test Thu Feb 9 17:38:54 2006
@@ -353,3 +353,15 @@ insert into t1 values (10,1);
drop table t1;
+#
+# Bug #16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
+#
+create table t1 (f1 integer,f2 integer, unique index(f1))
+partition by range(f1 div 2)
+subpartition by hash(f1) subpartitions 2
+(partition partb values less than (2),
+partition parte values less than (4),
+partition partf values less than (10000));
+insert into t1 values(10,1);
+select * from t1 where f1 = 10;
+drop table t1;
--- 1.30/sql/sql_partition.cc Tue Feb 7 19:31:10 2006
+++ 1.31/sql/sql_partition.cc Thu Feb 9 17:38:54 2006
@@ -6007,7 +6007,8 @@ static uint32 get_next_partition_via_wal
longlong dummy;
if (!part_iter->part_info->get_partition_id(part_iter->part_info,
&part_id, &dummy))
- return part_id;
+ return part_iter->part_info->no_subparts ?
+ part_id/part_iter->part_info->no_subparts : part_id;
}
return NOT_A_PARTITION_ID;
}
| Thread |
|---|
| • bk commit into 5.1 tree (gluh:1.2091) BUG#16907 | gluh | 9 Feb |