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
2c693033
Commit
2c693033
authored
Jun 19, 2001
by
heikki@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsp0fsp.c Fix a bug in freeing of a segment in the tablespace
parent
58616ff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
innobase/fsp/fsp0fsp.c
innobase/fsp/fsp0fsp.c
+21
-7
No files found.
innobase/fsp/fsp0fsp.c
View file @
2c693033
...
@@ -127,11 +127,9 @@ typedef byte fseg_inode_t;
...
@@ -127,11 +127,9 @@ typedef byte fseg_inode_t;
page number within space, FIL_NULL
page number within space, FIL_NULL
means that the slot is not in use */
means that the slot is not in use */
/*-------------------------------------*/
/*-------------------------------------*/
#define FSEG_INODE_SIZE (16 + 3 * FLST_BASE_NODE_SIZE +\
#define FSEG_INODE_SIZE (16 + 3 * FLST_BASE_NODE_SIZE + FSEG_FRAG_ARR_N_SLOTS * FSEG_FRAG_SLOT_SIZE)
FSEG_FRAG_ARR_N_SLOTS * FSEG_FRAG_SLOT_SIZE)
#define FSP_SEG_INODES_PER_PAGE ((UNIV_PAGE_SIZE - FSEG_ARR_OFFSET - 10)\
#define FSP_SEG_INODES_PER_PAGE ((UNIV_PAGE_SIZE - FSEG_ARR_OFFSET - 10) / FSEG_INODE_SIZE)
/ FSEG_INODE_SIZE)
/* Number of segment inodes which fit on a
/* Number of segment inodes which fit on a
single page */
single page */
...
@@ -198,8 +196,7 @@ the extent are free and which contain old tuple version to clean. */
...
@@ -198,8 +196,7 @@ the extent are free and which contain old tuple version to clean. */
/* File extent data structure size in bytes. The "+ 7 ) / 8" part in the
/* File extent data structure size in bytes. The "+ 7 ) / 8" part in the
definition rounds the number of bytes upward. */
definition rounds the number of bytes upward. */
#define XDES_SIZE (XDES_BITMAP +\
#define XDES_SIZE (XDES_BITMAP + (FSP_EXTENT_SIZE * XDES_BITS_PER_PAGE + 7) / 8)
(FSP_EXTENT_SIZE * XDES_BITS_PER_PAGE + 7) / 8)
/* Offset of the descriptor array on a descriptor page */
/* Offset of the descriptor array on a descriptor page */
#define XDES_ARR_OFFSET (FSP_HEADER_OFFSET + FSP_HEADER_SIZE)
#define XDES_ARR_OFFSET (FSP_HEADER_OFFSET + FSP_HEADER_SIZE)
...
@@ -2633,6 +2630,14 @@ fseg_free_step(
...
@@ -2633,6 +2630,14 @@ fseg_free_step(
MTR_MEMO_X_LOCK
));
MTR_MEMO_X_LOCK
));
mtr_x_lock
(
fil_space_get_latch
(
space
),
mtr
);
mtr_x_lock
(
fil_space_get_latch
(
space
),
mtr
);
descr
=
xdes_get_descriptor
(
space
,
buf_frame_get_page_no
(
header
),
mtr
);
/* Check that the header resides on a page which has not been
freed yet */
ut_a
(
descr
);
ut_a
(
xdes_get_bit
(
descr
,
XDES_FREE_BIT
,
buf_frame_get_page_no
(
header
)
%
FSP_EXTENT_SIZE
,
mtr
)
==
FALSE
);
inode
=
fseg_inode_get
(
header
,
mtr
);
inode
=
fseg_inode_get
(
header
,
mtr
);
descr
=
fseg_get_first_extent
(
inode
,
mtr
);
descr
=
fseg_get_first_extent
(
inode
,
mtr
);
...
@@ -2647,7 +2652,6 @@ fseg_free_step(
...
@@ -2647,7 +2652,6 @@ fseg_free_step(
}
}
/* Free a frag page */
/* Free a frag page */
n
=
fseg_find_last_used_frag_page_slot
(
inode
,
mtr
);
n
=
fseg_find_last_used_frag_page_slot
(
inode
,
mtr
);
if
(
n
==
ULINT_UNDEFINED
)
{
if
(
n
==
ULINT_UNDEFINED
)
{
...
@@ -2659,6 +2663,16 @@ fseg_free_step(
...
@@ -2659,6 +2663,16 @@ fseg_free_step(
fseg_free_page_low
(
inode
,
space
,
fseg_free_page_low
(
inode
,
space
,
fseg_get_nth_frag_page_no
(
inode
,
n
,
mtr
),
mtr
);
fseg_get_nth_frag_page_no
(
inode
,
n
,
mtr
),
mtr
);
n
=
fseg_find_last_used_frag_page_slot
(
inode
,
mtr
);
if
(
n
==
ULINT_UNDEFINED
)
{
/* Freeing completed: free the segment inode */
fsp_free_seg_inode
(
space
,
inode
,
mtr
);
return
(
TRUE
);
}
return
(
FALSE
);
return
(
FALSE
);
}
}
...
...
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