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
18b2c777
Commit
18b2c777
authored
Jul 29, 2015
by
Thirunarayanan Balathandayuthapani
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mysql-5.1' into mysql-5.5
parents
9cbd6d74
641ab6f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
storage/innobase/btr/btr0cur.c
storage/innobase/btr/btr0cur.c
+26
-5
No files found.
storage/innobase/btr/btr0cur.c
View file @
18b2c777
/*****************************************************************************
Copyright (c) 1994, 201
3
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1994, 201
5
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
...
...
@@ -1995,6 +1995,7 @@ btr_cur_optimistic_update(
ulint
max_size
;
ulint
new_rec_size
;
ulint
old_rec_size
;
ulint
max_ins_size
=
0
;
dtuple_t
*
new_entry
;
roll_ptr_t
roll_ptr
;
trx_t
*
trx
;
...
...
@@ -2105,6 +2106,11 @@ any_extern:
:
(
old_rec_size
+
page_get_max_insert_size_after_reorganize
(
page
,
1
));
if
(
!
page_zip
)
{
max_ins_size
=
page_get_max_insert_size_after_reorganize
(
page
,
1
);
}
if
(
!
(((
max_size
>=
BTR_CUR_PAGE_REORGANIZE_LIMIT
)
&&
(
max_size
>=
new_rec_size
))
||
(
page_get_n_recs
(
page
)
<=
1
)))
{
...
...
@@ -2156,10 +2162,14 @@ any_extern:
rec
=
btr_cur_insert_if_possible
(
cursor
,
new_entry
,
0
/*n_ext*/
,
mtr
);
ut_a
(
rec
);
/* <- We calculated above the insert would fit */
if
(
page_zip
&&
!
dict_index_is_clust
(
index
)
if
(
!
dict_index_is_clust
(
index
)
&&
page_is_leaf
(
page
))
{
/* Update the free bits in the insert buffer. */
ibuf_update_free_bits_zip
(
block
,
mtr
);
if
(
page_zip
)
{
ibuf_update_free_bits_zip
(
block
,
mtr
);
}
else
{
ibuf_update_free_bits_low
(
block
,
max_ins_size
,
mtr
);
}
}
/* Restore the old explicit lock state on the record */
...
...
@@ -2268,6 +2278,7 @@ btr_cur_pessimistic_update(
ulint
n_reserved
;
ulint
n_ext
;
ulint
*
offsets
=
NULL
;
ulint
max_ins_size
=
0
;
*
big_rec
=
NULL
;
...
...
@@ -2405,6 +2416,11 @@ make_external:
ut_ad
(
flags
&
BTR_KEEP_POS_FLAG
);
}
if
(
!
page_zip
)
{
max_ins_size
=
page_get_max_insert_size_after_reorganize
(
page
,
1
);
}
/* Store state of explicit locks on rec on the page infimum record,
before deleting rec. The page infimum acts as a dummy carrier of the
locks, taking care also of lock releases, before we can move the locks
...
...
@@ -2450,10 +2466,15 @@ make_external:
big_rec_vec
!=
NULL
&&
(
flags
&
BTR_KEEP_POS_FLAG
),
mtr
);
if
(
page_zip
&&
!
dict_index_is_clust
(
index
)
if
(
!
dict_index_is_clust
(
index
)
&&
page_is_leaf
(
page
))
{
/* Update the free bits in the insert buffer. */
ibuf_update_free_bits_zip
(
block
,
mtr
);
if
(
page_zip
)
{
ibuf_update_free_bits_zip
(
block
,
mtr
);
}
else
{
ibuf_update_free_bits_low
(
block
,
max_ins_size
,
mtr
);
}
}
err
=
DB_SUCCESS
;
...
...
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