Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3573c2cf
Commit
3573c2cf
authored
Jan 16, 2006
by
reggie@linux.site
Browse files
Options
Browse Files
Download
Plain Diff
Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into linux.site:/home/reggie/work/mysql-5.1-bug15968
parents
74c475b2
557a6832
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
mysql-test/r/partition_hash.result
mysql-test/r/partition_hash.result
+6
-0
mysql-test/t/partition_hash.test
mysql-test/t/partition_hash.test
+9
-0
sql/sql_partition.cc
sql/sql_partition.cc
+2
-1
No files found.
mysql-test/r/partition_hash.result
View file @
3573c2cf
...
@@ -64,3 +64,9 @@ primary key(a,b))
...
@@ -64,3 +64,9 @@ primary key(a,b))
partition by key (a)
partition by key (a)
(partition x1);
(partition x1);
drop table t1;
drop table t1;
CREATE TABLE t1 (f1 INTEGER, f2 char(20)) ENGINE = 'MYISAM' PARTITION BY HASH(f1) PARTITIONS 2;
INSERT INTO t1 SET f1 = 0 - 1, f2 = '#######';
select * from t1;
f1 f2
-1 #######
drop table t1;
mysql-test/t/partition_hash.test
View file @
3573c2cf
...
@@ -75,3 +75,12 @@ partition by key (a)
...
@@ -75,3 +75,12 @@ partition by key (a)
(
partition
x1
);
(
partition
x1
);
drop
table
t1
;
drop
table
t1
;
#
# Bug# 15968 - crash when INSERT with f1 = -1 into partition by hash(f1)
#
CREATE
TABLE
t1
(
f1
INTEGER
,
f2
char
(
20
))
ENGINE
=
'MYISAM'
PARTITION
BY
HASH
(
f1
)
PARTITIONS
2
;
INSERT
INTO
t1
SET
f1
=
0
-
1
,
f2
=
'#######'
;
select
*
from
t1
;
drop
table
t1
;
sql/sql_partition.cc
View file @
3573c2cf
...
@@ -2332,7 +2332,8 @@ static uint32 get_part_id_hash(uint no_parts,
...
@@ -2332,7 +2332,8 @@ static uint32 get_part_id_hash(uint no_parts,
Item
*
part_expr
)
Item
*
part_expr
)
{
{
DBUG_ENTER
(
"get_part_id_hash"
);
DBUG_ENTER
(
"get_part_id_hash"
);
DBUG_RETURN
((
uint32
)(
part_expr
->
val_int
()
%
no_parts
));
longlong
int_hash_id
=
part_expr
->
val_int
()
%
no_parts
;
DBUG_RETURN
(
int_hash_id
<
0
?
-
int_hash_id
:
int_hash_id
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment