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
a37418bc
Commit
a37418bc
authored
Oct 01, 2010
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
199fb365
cddd0d68
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
7 deletions
+48
-7
mysql-test/r/partition.result
mysql-test/r/partition.result
+15
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+22
-0
sql/ha_partition.cc
sql/ha_partition.cc
+11
-7
No files found.
mysql-test/r/partition.result
View file @
a37418bc
drop table if exists t1, t2;
drop table if exists t1, t2;
#
#
# Bug#57113: ha_partition::extra(ha_extra_function):
# Assertion `m_extra_cache' failed
CREATE TABLE t1
(id INT NOT NULL PRIMARY KEY,
name VARCHAR(16) NOT NULL,
year YEAR,
INDEX name (name(8))
)
PARTITION BY HASH(id) PARTITIONS 2;
INSERT INTO t1 VALUES ( 1, 'FooBar', '1924' );
CREATE TABLE t2 (id INT);
INSERT INTO t2 VALUES (1),(2);
UPDATE t1, t2 SET t1.year = '1955' WHERE t1.name = 'FooBar';
DROP TABLE t1, t2;
#
# Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
# Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
#
#
CREATE TABLE t1 (
CREATE TABLE t1 (
...
...
mysql-test/t/partition.test
View file @
a37418bc
...
@@ -14,6 +14,28 @@
...
@@ -14,6 +14,28 @@
drop
table
if
exists
t1
,
t2
;
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
--
enable_warnings
--
echo
#
--
echo
# Bug#57113: ha_partition::extra(ha_extra_function):
--
echo
# Assertion `m_extra_cache' failed
CREATE
TABLE
t1
(
id
INT
NOT
NULL
PRIMARY
KEY
,
name
VARCHAR
(
16
)
NOT
NULL
,
year
YEAR
,
INDEX
name
(
name
(
8
))
)
PARTITION
BY
HASH
(
id
)
PARTITIONS
2
;
INSERT
INTO
t1
VALUES
(
1
,
'FooBar'
,
'1924'
);
CREATE
TABLE
t2
(
id
INT
);
INSERT
INTO
t2
VALUES
(
1
),(
2
);
UPDATE
t1
,
t2
SET
t1
.
year
=
'1955'
WHERE
t1
.
name
=
'FooBar'
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
#
--
echo
# Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
--
echo
# Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
--
echo
#
--
echo
#
...
...
sql/ha_partition.cc
View file @
a37418bc
...
@@ -5698,7 +5698,6 @@ int ha_partition::extra(enum ha_extra_function operation)
...
@@ -5698,7 +5698,6 @@ int ha_partition::extra(enum ha_extra_function operation)
DBUG_RETURN
(
prepare_for_rename
());
DBUG_RETURN
(
prepare_for_rename
());
break
;
break
;
case
HA_EXTRA_PREPARE_FOR_UPDATE
:
case
HA_EXTRA_PREPARE_FOR_UPDATE
:
DBUG_ASSERT
(
m_extra_cache
);
/*
/*
Needs to be run on the first partition in the range now, and
Needs to be run on the first partition in the range now, and
later in late_extra_cache, when switching to a new partition to scan.
later in late_extra_cache, when switching to a new partition to scan.
...
@@ -5706,6 +5705,8 @@ int ha_partition::extra(enum ha_extra_function operation)
...
@@ -5706,6 +5705,8 @@ int ha_partition::extra(enum ha_extra_function operation)
m_extra_prepare_for_update
=
TRUE
;
m_extra_prepare_for_update
=
TRUE
;
if
(
m_part_spec
.
start_part
!=
NO_CURRENT_PART_ID
)
if
(
m_part_spec
.
start_part
!=
NO_CURRENT_PART_ID
)
{
{
if
(
!
m_extra_cache
)
m_extra_cache_part_id
=
m_part_spec
.
start_part
;
DBUG_ASSERT
(
m_extra_cache_part_id
==
m_part_spec
.
start_part
);
DBUG_ASSERT
(
m_extra_cache_part_id
==
m_part_spec
.
start_part
);
(
void
)
m_file
[
m_part_spec
.
start_part
]
->
extra
(
HA_EXTRA_PREPARE_FOR_UPDATE
);
(
void
)
m_file
[
m_part_spec
.
start_part
]
->
extra
(
HA_EXTRA_PREPARE_FOR_UPDATE
);
}
}
...
@@ -5977,19 +5978,22 @@ void ha_partition::late_extra_cache(uint partition_id)
...
@@ -5977,19 +5978,22 @@ void ha_partition::late_extra_cache(uint partition_id)
{
{
handler
*
file
;
handler
*
file
;
DBUG_ENTER
(
"ha_partition::late_extra_cache"
);
DBUG_ENTER
(
"ha_partition::late_extra_cache"
);
DBUG_PRINT
(
"info"
,
(
"extra_cache %u partid %u size %u"
,
m_extra_cache
,
DBUG_PRINT
(
"info"
,
(
"extra_cache %u prepare %u partid %u size %u"
,
m_extra_cache
,
m_extra_prepare_for_update
,
partition_id
,
m_extra_cache_size
));
partition_id
,
m_extra_cache_size
));
if
(
!
m_extra_cache
&&
!
m_extra_prepare_for_update
)
if
(
!
m_extra_cache
&&
!
m_extra_prepare_for_update
)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
file
=
m_file
[
partition_id
];
file
=
m_file
[
partition_id
];
if
(
m_extra_cache
)
{
if
(
m_extra_cache_size
==
0
)
if
(
m_extra_cache_size
==
0
)
(
void
)
file
->
extra
(
HA_EXTRA_CACHE
);
(
void
)
file
->
extra
(
HA_EXTRA_CACHE
);
else
else
(
void
)
file
->
extra_opt
(
HA_EXTRA_CACHE
,
m_extra_cache_size
);
(
void
)
file
->
extra_opt
(
HA_EXTRA_CACHE
,
m_extra_cache_size
);
}
if
(
m_extra_prepare_for_update
)
if
(
m_extra_prepare_for_update
)
{
{
DBUG_ASSERT
(
m_extra_cache
);
(
void
)
file
->
extra
(
HA_EXTRA_PREPARE_FOR_UPDATE
);
(
void
)
file
->
extra
(
HA_EXTRA_PREPARE_FOR_UPDATE
);
}
}
m_extra_cache_part_id
=
partition_id
;
m_extra_cache_part_id
=
partition_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