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
2ea882e9
Commit
2ea882e9
authored
Apr 29, 2011
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
c7b12ecc
163807cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
mysql-test/r/partition_myisam.result
mysql-test/r/partition_myisam.result
+9
-0
mysql-test/t/partition_myisam.test
mysql-test/t/partition_myisam.test
+11
-2
sql/ha_partition.cc
sql/ha_partition.cc
+6
-3
No files found.
mysql-test/r/partition_myisam.result
View file @
2ea882e9
...
...
@@ -239,3 +239,12 @@ a
DROP TABLE t1;
# Should not be any files left here
# End of bug#30102 test.
# Test of post-push fix for bug#11766249/59316
CREATE TABLE t1 (a INT, b VARCHAR(255), PRIMARY KEY (a))
ENGINE = MyISAM
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (0) MAX_ROWS=100,
PARTITION p1 VALUES LESS THAN (100) MAX_ROWS=100,
PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row");
DROP TABLE t1;
mysql-test/t/partition_myisam.test
View file @
2ea882e9
--
source
include
/
have_partition
.
inc
--
source
include
/
have_partition
.
inc
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
;
--
enable_warnings
...
...
@@ -171,3 +170,13 @@ DROP TABLE t1;
--
list_files
$MYSQLD_DATADIR
/
test
t1
*
--
list_files
$MYSQLD_DATADIR
/
test
t2
*
--
echo
# End of bug#30102 test.
--
echo
# Test of post-push fix for bug#11766249/59316
CREATE
TABLE
t1
(
a
INT
,
b
VARCHAR
(
255
),
PRIMARY
KEY
(
a
))
ENGINE
=
MyISAM
PARTITION
BY
RANGE
(
a
)
(
PARTITION
p0
VALUES
LESS
THAN
(
0
)
MAX_ROWS
=
100
,
PARTITION
p1
VALUES
LESS
THAN
(
100
)
MAX_ROWS
=
100
,
PARTITION
pMax
VALUES
LESS
THAN
MAXVALUE
);
INSERT
INTO
t1
VALUES
(
1
,
"Partition p1, first row"
);
DROP
TABLE
t1
;
sql/ha_partition.cc
View file @
2ea882e9
...
...
@@ -2739,7 +2739,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
(
PARTITION_ENABLED_TABLE_FLAGS
));
while
(
*
(
++
file
))
{
DBUG_ASSERT
(
ref_length
>=
(
*
file
)
->
ref_length
);
/* MyISAM can have smaller ref_length for partitions with MAX_ROWS set */
set_if_bigger
(
ref_length
,
((
*
file
)
->
ref_length
));
/*
Verify that all partitions have the same set of table flags.
...
...
@@ -4089,12 +4089,15 @@ int ha_partition::rnd_next(uchar *buf)
void
ha_partition
::
position
(
const
uchar
*
record
)
{
handler
*
file
=
m_file
[
m_last_part
];
uint
pad_length
;
DBUG_ENTER
(
"ha_partition::position"
);
file
->
position
(
record
);
int2store
(
ref
,
m_last_part
);
memcpy
((
ref
+
PARTITION_BYTES_IN_POS
),
file
->
ref
,
(
ref_length
-
PARTITION_BYTES_IN_POS
));
memcpy
((
ref
+
PARTITION_BYTES_IN_POS
),
file
->
ref
,
file
->
ref_length
);
pad_length
=
m_ref_length
-
PARTITION_BYTES_IN_POS
-
file
->
ref_length
;
if
(
pad_length
)
memset
((
ref
+
PARTITION_BYTES_IN_POS
+
file
->
ref_length
),
0
,
pad_length
);
#ifdef SUPPORTING_PARTITION_OVER_DIFFERENT_ENGINES
#ifdef HAVE_purify
...
...
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