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
05c6614d
Commit
05c6614d
authored
Aug 09, 2012
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-5.1 to mysql-5.5.
parents
17c5725c
bb849479
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
36 deletions
+45
-36
storage/innobase/btr/btr0pcur.c
storage/innobase/btr/btr0pcur.c
+31
-36
storage/innobase/row/row0merge.c
storage/innobase/row/row0merge.c
+14
-0
No files found.
storage/innobase/btr/btr0pcur.c
View file @
05c6614d
...
...
@@ -348,44 +348,39 @@ btr_pcur_restore_position_func(
/* Restore the old search mode */
cursor
->
search_mode
=
old_mode
;
if
(
btr_pcur_is_on_user_rec
(
cursor
))
{
switch
(
cursor
->
rel_pos
)
{
case
BTR_PCUR_ON
:
if
(
!
cmp_dtuple_rec
(
tuple
,
btr_pcur_get_rec
(
cursor
),
rec_get_offsets
(
btr_pcur_get_rec
(
cursor
),
index
,
NULL
,
ULINT_UNDEFINED
,
&
heap
)))
{
/* We have to store the NEW value for
the modify clock, since the cursor can
now be on a different page! But we can
retain the value of old_rec */
cursor
->
block_when_stored
=
btr_pcur_get_block
(
cursor
);
cursor
->
modify_clock
=
buf_block_get_modify_clock
(
cursor
->
block_when_stored
);
cursor
->
old_stored
=
BTR_PCUR_OLD_STORED
;
mem_heap_free
(
heap
);
return
(
TRUE
);
}
break
;
case
BTR_PCUR_BEFORE
:
page_cur_move_to_next
(
btr_pcur_get_page_cur
(
cursor
));
break
;
case
BTR_PCUR_AFTER
:
page_cur_move_to_prev
(
btr_pcur_get_page_cur
(
cursor
));
break
;
switch
(
cursor
->
rel_pos
)
{
case
BTR_PCUR_ON
:
if
(
btr_pcur_is_on_user_rec
(
cursor
)
&&
!
cmp_dtuple_rec
(
tuple
,
btr_pcur_get_rec
(
cursor
),
rec_get_offsets
(
btr_pcur_get_rec
(
cursor
),
index
,
NULL
,
ULINT_UNDEFINED
,
&
heap
)))
{
/* We have to store the NEW value for
the modify clock, since the cursor can
now be on a different page! But we can
retain the value of old_rec */
cursor
->
block_when_stored
=
btr_pcur_get_block
(
cursor
);
cursor
->
modify_clock
=
buf_block_get_modify_clock
(
cursor
->
block_when_stored
);
cursor
->
old_stored
=
BTR_PCUR_OLD_STORED
;
mem_heap_free
(
heap
);
return
(
TRUE
);
}
#ifdef UNIV_DEBUG
default:
ut_error
;
/* fall through */
case
BTR_PCUR_BEFORE
:
case
BTR_PCUR_AFTER
:
break
;
default:
ut_error
;
#endif
/* UNIV_DEBUG */
}
}
mem_heap_free
(
heap
);
...
...
storage/innobase/row/row0merge.c
View file @
05c6614d
...
...
@@ -1235,11 +1235,25 @@ row_merge_read_clustered_index(
goto
err_exit
;
}
/* Store the cursor position on the last user
record on the page. */
btr_pcur_move_to_prev_on_page
(
&
pcur
);
/* Leaf pages must never be empty, unless
this is the only page in the index tree. */
ut_ad
(
btr_pcur_is_on_user_rec
(
&
pcur
)
||
buf_block_get_page_no
(
btr_pcur_get_block
(
&
pcur
))
==
clust_index
->
page
);
btr_pcur_store_position
(
&
pcur
,
&
mtr
);
mtr_commit
(
&
mtr
);
mtr_start
(
&
mtr
);
/* Restore position on the record, or its
predecessor if the record was purged
meanwhile. */
btr_pcur_restore_position
(
BTR_SEARCH_LEAF
,
&
pcur
,
&
mtr
);
/* Move to the successor of the original record. */
has_next
=
btr_pcur_move_to_next_user_rec
(
&
pcur
,
&
mtr
);
}
...
...
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