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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5452a154
Commit
5452a154
authored
Dec 05, 2007
by
mattiasj@witty
Browse files
Options
Browse Files
Download
Plain Diff
Merge witty.:/Users/mattiasj/clones/mysql-5.1-bug30822
into witty.:/Users/mattiasj/clones/51to_push
parents
1d7ac774
eac847f3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
1 deletion
+38
-1
mysql-test/r/partition_hash.result
mysql-test/r/partition_hash.result
+12
-0
mysql-test/t/partition_hash.test
mysql-test/t/partition_hash.test
+16
-0
sql/ha_partition.cc
sql/ha_partition.cc
+8
-0
sql/sql_partition.cc
sql/sql_partition.cc
+1
-1
sql/sql_partition.h
sql/sql_partition.h
+1
-0
No files found.
mysql-test/r/partition_hash.result
View file @
5452a154
drop table if exists t1;
CREATE TABLE t1 (c1 INT)
PARTITION BY HASH (c1)
PARTITIONS 15;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
ALTER TABLE t1 COALESCE PARTITION 13;
DROP TABLE t1;
CREATE TABLE t1 (c1 INT)
PARTITION BY LINEAR HASH (c1)
PARTITIONS 5;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
ALTER TABLE t1 COALESCE PARTITION 3;
DROP TABLE t1;
create table t1 (a int unsigned)
partition by hash(a div 2)
partitions 4;
...
...
mysql-test/t/partition_hash.test
View file @
5452a154
...
...
@@ -9,6 +9,22 @@
drop
table
if
exists
t1
;
--
enable_warnings
#
# Bug#30822: crash when COALESCE
#
CREATE
TABLE
t1
(
c1
INT
)
PARTITION
BY
HASH
(
c1
)
PARTITIONS
15
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
ALTER
TABLE
t1
COALESCE
PARTITION
13
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
c1
INT
)
PARTITION
BY
LINEAR
HASH
(
c1
)
PARTITIONS
5
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
);
ALTER
TABLE
t1
COALESCE
PARTITION
3
;
DROP
TABLE
t1
;
#
# More partition pruning tests, especially on interval walking
#
...
...
sql/ha_partition.cc
View file @
5452a154
...
...
@@ -1531,6 +1531,14 @@ int ha_partition::copy_partitions(ulonglong *copied, ulonglong *deleted)
longlong
func_value
;
DBUG_ENTER
(
"ha_partition::copy_partitions"
);
if
(
m_part_info
->
linear_hash_ind
)
{
if
(
m_part_info
->
part_type
==
HASH_PARTITION
)
set_linear_hash_mask
(
m_part_info
,
m_part_info
->
no_parts
);
else
set_linear_hash_mask
(
m_part_info
,
m_part_info
->
no_subparts
);
}
while
(
reorg_part
<
m_reorged_parts
)
{
handler
*
file
=
m_reorged_file
[
reorg_part
];
...
...
sql/sql_partition.cc
View file @
5452a154
...
...
@@ -1402,7 +1402,7 @@ static void set_up_partition_func_pointers(partition_info *part_info)
NONE
*/
static
void
set_linear_hash_mask
(
partition_info
*
part_info
,
uint
no_parts
)
void
set_linear_hash_mask
(
partition_info
*
part_info
,
uint
no_parts
)
{
uint
mask
;
...
...
sql/sql_partition.h
View file @
5452a154
...
...
@@ -65,6 +65,7 @@ int get_part_for_delete(const uchar *buf, const uchar *rec0,
void
prune_partition_set
(
const
TABLE
*
table
,
part_id_range
*
part_spec
);
bool
check_partition_info
(
partition_info
*
part_info
,
handlerton
**
eng_type
,
TABLE
*
table
,
handler
*
file
,
HA_CREATE_INFO
*
info
);
void
set_linear_hash_mask
(
partition_info
*
part_info
,
uint
no_parts
);
bool
fix_partition_func
(
THD
*
thd
,
TABLE
*
table
,
bool
create_table_ind
);
char
*
generate_partition_syntax
(
partition_info
*
part_info
,
uint
*
buf_length
,
bool
use_sql_alloc
,
...
...
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