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
eb69278b
Commit
eb69278b
authored
Sep 19, 2012
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 to mysql-5.5.
parents
e86a7cbc
b3e0fa54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
6 deletions
+36
-6
storage/innobase/btr/btr0cur.c
storage/innobase/btr/btr0cur.c
+1
-1
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+2
-2
storage/innobase/ibuf/ibuf0ibuf.c
storage/innobase/ibuf/ibuf0ibuf.c
+32
-2
storage/innobase/include/btr0cur.h
storage/innobase/include/btr0cur.h
+1
-1
No files found.
storage/innobase/btr/btr0cur.c
View file @
eb69278b
...
...
@@ -2886,7 +2886,7 @@ btr_cur_set_deleted_flag_for_ibuf(
when the tablespace is
uncompressed */
ibool
val
,
/*!< in: value to set */
mtr_t
*
mtr
)
/*!< in
: mtr
*/
mtr_t
*
mtr
)
/*!< in
/out: mini-transaction
*/
{
/* We do not need to reserve btr_search_latch, as the page
has just been read to the buffer pool and there cannot be
...
...
storage/innobase/handler/ha_innodb.cc
View file @
eb69278b
...
...
@@ -11660,8 +11660,8 @@ static MYSQL_SYSVAR_ENUM(stats_method, srv_innodb_stats_method,
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
static
MYSQL_SYSVAR_UINT
(
change_buffering_debug
,
ibuf_debug
,
PLUGIN_VAR_RQCMDARG
,
"Debug flags for InnoDB change buffering (0=none)"
,
NULL
,
NULL
,
0
,
0
,
1
,
0
);
"Debug flags for InnoDB change buffering (0=none
, 2=crash at merge
)"
,
NULL
,
NULL
,
0
,
0
,
2
,
0
);
#endif
/* UNIV_DEBUG || UNIV_IBUF_DEBUG */
static
MYSQL_SYSVAR_BOOL
(
random_read_ahead
,
srv_random_read_ahead
,
...
...
storage/innobase/ibuf/ibuf0ibuf.c
View file @
eb69278b
...
...
@@ -2868,6 +2868,14 @@ ibuf_get_volume_buffered_count_func(
ut_a
(
len
==
1
);
ut_ad
(
trx_sys_multiple_tablespace_format
);
if
(
rec_get_deleted_flag
(
rec
,
0
))
{
/* This record has been merged already,
but apparently the system crashed before
the change was discarded from the buffer.
Pretend that the record does not exist. */
return
(
0
);
}
types
=
rec_get_nth_field_old
(
rec
,
IBUF_REC_FIELD_METADATA
,
&
len
);
switch
(
UNIV_EXPECT
(
len
%
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
,
...
...
@@ -4285,6 +4293,22 @@ ibuf_delete_rec(
ut_ad
(
ibuf_rec_get_page_no
(
mtr
,
btr_pcur_get_rec
(
pcur
))
==
page_no
);
ut_ad
(
ibuf_rec_get_space
(
mtr
,
btr_pcur_get_rec
(
pcur
))
==
space
);
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
if
(
ibuf_debug
==
2
)
{
/* Inject a fault (crash). We do this before trying
optimistic delete, because a pessimistic delete in the
change buffer would require a larger test case. */
/* Flag the buffered record as processed, to avoid
an assertion failure after crash recovery. */
btr_cur_set_deleted_flag_for_ibuf
(
btr_pcur_get_rec
(
pcur
),
NULL
,
TRUE
,
mtr
);
ibuf_mtr_commit
(
mtr
);
log_make_checkpoint_at
(
IB_ULONGLONG_MAX
,
TRUE
);
DBUG_SUICIDE
();
}
#endif
/* UNIV_DEBUG || UNIV_IBUF_DEBUG */
success
=
btr_cur_optimistic_delete
(
btr_pcur_get_btr_cur
(
pcur
),
mtr
);
if
(
success
)
{
...
...
@@ -4319,7 +4343,13 @@ ibuf_delete_rec(
ut_ad
(
ibuf_rec_get_page_no
(
mtr
,
btr_pcur_get_rec
(
pcur
))
==
page_no
);
ut_ad
(
ibuf_rec_get_space
(
mtr
,
btr_pcur_get_rec
(
pcur
))
==
space
);
/* We have to resort to a pessimistic delete from ibuf */
/* We have to resort to a pessimistic delete from ibuf.
Delete-mark the record so that it will not be applied again,
in case the server crashes before the pessimistic delete is
made persistent. */
btr_cur_set_deleted_flag_for_ibuf
(
btr_pcur_get_rec
(
pcur
),
NULL
,
TRUE
,
mtr
);
btr_pcur_store_position
(
pcur
,
mtr
);
ibuf_btr_pcur_commit_specify_mtr
(
pcur
,
mtr
);
...
...
@@ -4600,7 +4630,7 @@ ibuf_merge_or_delete_for_page(
fputs
(
"InnoDB: Discarding record
\n
"
,
stderr
);
rec_print_old
(
stderr
,
rec
);
fputs
(
"
\n
InnoDB: from the insert buffer!
\n\n
"
,
stderr
);
}
else
if
(
block
)
{
}
else
if
(
block
&&
!
rec_get_deleted_flag
(
rec
,
0
)
)
{
/* Now we have at pcur a record which should be
applied on the index page; NOTE that the call below
copies pointers to fields in rec, and we must
...
...
storage/innobase/include/btr0cur.h
View file @
eb69278b
...
...
@@ -635,7 +635,7 @@ btr_cur_set_deleted_flag_for_ibuf(
when the tablespace is
uncompressed */
ibool
val
,
/*!< in: value to set */
mtr_t
*
mtr
);
/*!< in
: mtr
*/
mtr_t
*
mtr
);
/*!< in
/out: mini-transaction
*/
/*######################################################################*/
/** In the pessimistic delete, if the page data size drops below this
...
...
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