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
5dceabc9
Commit
5dceabc9
authored
Jan 23, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_page_get_gen(): Remove the unused mode BUF_GET_NOWAIT.
This was noticed while investigating Issue #160.
parent
0bd67bdb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
35 deletions
+15
-35
ChangeLog
ChangeLog
+5
-0
buf/buf0buf.c
buf/buf0buf.c
+10
-27
include/buf0buf.h
include/buf0buf.h
+0
-8
No files found.
ChangeLog
View file @
5dceabc9
2009-01-23 The InnoDB Team
* include/buf0buf.h, buf/buf0buf.c:
Remove the unused mode BUF_GET_NOWAIT of buf_page_get_gen()
2009-01-20 The InnoDB Team
* include/rem0rec.h, include/rem0rec.ic:
...
...
buf/buf0buf.c
View file @
5dceabc9
...
...
@@ -1799,7 +1799,7 @@ buf_page_get_gen(
ulint
rw_latch
,
/* in: RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH */
buf_block_t
*
guess
,
/* in: guessed block or NULL */
ulint
mode
,
/* in: BUF_GET, BUF_GET_IF_IN_POOL,
BUF_GET_NO_LATCH
, BUF_GET_NOWAIT
*/
BUF_GET_NO_LATCH */
const
char
*
file
,
/* in: file name */
ulint
line
,
/* in: line where called */
mtr_t
*
mtr
)
/* in: mini-transaction */
...
...
@@ -1815,7 +1815,7 @@ buf_page_get_gen(
||
(
rw_latch
==
RW_NO_LATCH
));
ut_ad
((
mode
!=
BUF_GET_NO_LATCH
)
||
(
rw_latch
==
RW_NO_LATCH
));
ut_ad
((
mode
==
BUF_GET
)
||
(
mode
==
BUF_GET_IF_IN_POOL
)
||
(
mode
==
BUF_GET_NO_LATCH
)
||
(
mode
==
BUF_GET_NOWAIT
)
);
||
(
mode
==
BUF_GET_NO_LATCH
));
ut_ad
(
zip_size
==
fil_space_get_zip_size
(
space
));
#ifndef UNIV_LOG_DEBUG
ut_ad
(
!
ibuf_inside
()
||
ibuf_page
(
space
,
zip_size
,
offset
,
NULL
));
...
...
@@ -2065,29 +2065,8 @@ wait_until_unfixed:
ut_a
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
#endif
/* UNIV_DEBUG || UNIV_BUF_DEBUG */
if
(
mode
==
BUF_GET_NOWAIT
)
{
ibool
success
;
if
(
rw_latch
==
RW_S_LATCH
)
{
success
=
rw_lock_s_lock_func_nowait
(
&
(
block
->
lock
),
file
,
line
);
fix_type
=
MTR_MEMO_PAGE_S_FIX
;
}
else
{
ut_ad
(
rw_latch
==
RW_X_LATCH
);
success
=
rw_lock_x_lock_func_nowait
(
&
(
block
->
lock
),
file
,
line
);
fix_type
=
MTR_MEMO_PAGE_X_FIX
;
}
if
(
!
success
)
{
mutex_enter
(
&
block
->
mutex
);
buf_block_buf_fix_dec
(
block
);
mutex_exit
(
&
block
->
mutex
);
return
(
NULL
);
}
}
else
if
(
rw_latch
==
RW_NO_LATCH
)
{
switch
(
rw_latch
)
{
case
RW_NO_LATCH
:
if
(
must_read
)
{
/* Let us wait until the read operation
completes */
...
...
@@ -2109,15 +2088,19 @@ wait_until_unfixed:
}
fix_type
=
MTR_MEMO_BUF_FIX
;
}
else
if
(
rw_latch
==
RW_S_LATCH
)
{
break
;
case
RW_S_LATCH
:
rw_lock_s_lock_func
(
&
(
block
->
lock
),
0
,
file
,
line
);
fix_type
=
MTR_MEMO_PAGE_S_FIX
;
}
else
{
break
;
case
RW_X_LATCH
:
rw_lock_x_lock_func
(
&
(
block
->
lock
),
0
,
file
,
line
);
fix_type
=
MTR_MEMO_PAGE_X_FIX
;
break
;
}
mtr_memo_push
(
mtr
,
block
,
fix_type
);
...
...
include/buf0buf.h
View file @
5dceabc9
...
...
@@ -36,8 +36,6 @@ Created 11/5/1995 Heikki Tuuri
/* Modes for buf_page_get_gen */
#define BUF_GET 10
/* get always */
#define BUF_GET_IF_IN_POOL 11
/* get if in pool */
#define BUF_GET_NOWAIT 12
/* get if can set the latch without
waiting */
#define BUF_GET_NO_LATCH 14
/* get and bufferfix, but set no latch;
we have separated this case, because
it is error-prone programming not to
...
...
@@ -172,12 +170,6 @@ with care. */
SP, ZS, OF, RW_NO_LATCH, NULL,\
BUF_GET_NO_LATCH, __FILE__, __LINE__, MTR)
/******************************************************************
NOTE! The following macros should be used instead of buf_page_get_gen, to
improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed as LA! */
#define buf_page_get_nowait(SP, ZS, OF, LA, MTR) buf_page_get_gen(\
SP, ZS, OF, LA, NULL,\
BUF_GET_NOWAIT, __FILE__, __LINE__, MTR)
/******************************************************************
NOTE! The following macros should be used instead of
buf_page_optimistic_get_func, to improve debugging. Only values RW_S_LATCH and
RW_X_LATCH are allowed as LA! */
...
...
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