mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1
This commit is contained in:
commit
44a6b536d2
3 changed files with 29 additions and 1 deletions
|
@ -87,3 +87,13 @@ partition by list (b*a)
|
||||||
partition x2 values in (3, 11, 5, 7) tablespace ts2,
|
partition x2 values in (3, 11, 5, 7) tablespace ts2,
|
||||||
partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
|
partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a int not null)
|
||||||
|
partition by key(a);
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
insert into t1 values (1);
|
||||||
|
insert into t1 values (2);
|
||||||
|
insert into t1 values (3);
|
||||||
|
insert into t1 values (4);
|
||||||
|
UNLOCK TABLES;
|
||||||
|
drop table t1;
|
||||||
|
|
|
@ -134,3 +134,21 @@ partition by list (b*a)
|
||||||
partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
|
partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug 13154: Insert crashes due to bad calculation of partition id
|
||||||
|
# for PARTITION BY KEY and SUBPARTITION BY KEY
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a int not null)
|
||||||
|
partition by key(a);
|
||||||
|
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
insert into t1 values (1);
|
||||||
|
insert into t1 values (2);
|
||||||
|
insert into t1 values (3);
|
||||||
|
insert into t1 values (4);
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
|
|
@ -2305,7 +2305,7 @@ static uint32 get_part_id_key(Field **field_array,
|
||||||
uint no_parts)
|
uint no_parts)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("get_part_id_key");
|
DBUG_ENTER("get_part_id_key");
|
||||||
DBUG_RETURN(calculate_key_value(field_array) & no_parts);
|
DBUG_RETURN(calculate_key_value(field_array) % no_parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue