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
f02f1eda
Commit
f02f1eda
authored
Feb 16, 2018
by
Eugene Kosov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review fixes
parent
6de8f79b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
50 deletions
+40
-50
storage/innobase/fut/fut0lst.cc
storage/innobase/fut/fut0lst.cc
+1
-1
storage/innobase/include/btr0btr.h
storage/innobase/include/btr0btr.h
+19
-4
storage/innobase/include/btr0btr.ic
storage/innobase/include/btr0btr.ic
+0
-26
storage/innobase/include/buf0buf.h
storage/innobase/include/buf0buf.h
+3
-2
storage/innobase/include/lock0lock.h
storage/innobase/include/lock0lock.h
+1
-1
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+16
-16
No files found.
storage/innobase/fut/fut0lst.cc
View file @
f02f1eda
...
...
@@ -49,7 +49,7 @@ flst_add_to_empty(
ut_ad
(
mtr_memo_contains_page_flagged
(
mtr
,
node
,
MTR_MEMO_PAGE_X_FIX
|
MTR_MEMO_PAGE_SX_FIX
));
ut_a
d
(
!
flst_get_len
(
base
));
ut_a
(
!
flst_get_len
(
base
));
buf_ptr_get_fsp_addr
(
node
,
&
space
,
&
node_addr
);
...
...
storage/innobase/include/btr0btr.h
View file @
f02f1eda
...
...
@@ -37,6 +37,12 @@ Created 6/2/1994 Heikki Tuuri
#include "btr0types.h"
#include "gis0type.h"
#define BTR_MAX_NODE_LEVEL 50
/*!< Maximum B-tree page level
(not really a hard limit).
Used in debug assertions
in btr_page_set_level and
btr_page_get_level */
/** Maximum record size which can be stored on a page, without using the
special big record storage structure */
#define BTR_PAGE_MAX_REC_SIZE (UNIV_PAGE_SIZE / 2 - 200)
...
...
@@ -285,13 +291,22 @@ btr_page_get_index_id(
MY_ATTRIBUTE
((
warn_unused_result
));
/********************************************************//**
Gets the node level field in an index page.
@param[in] page index page
@return level, leaf level == 0 */
UNIV_INLINE
ulint
btr_page_get_level
(
/*===================*/
const
page_t
*
page
)
/*!< in: index page */
MY_ATTRIBUTE
((
warn_unused_result
));
btr_page_get_level
(
const
page_t
*
page
)
{
ulint
level
;
ut_ad
(
page
);
level
=
mach_read_from_2
(
page
+
PAGE_HEADER
+
PAGE_LEVEL
);
ut_ad
(
level
<=
BTR_MAX_NODE_LEVEL
);
return
(
level
);
}
MY_ATTRIBUTE
((
warn_unused_result
))
/********************************************************//**
Gets the next index page number.
@return next page number */
...
...
storage/innobase/include/btr0btr.ic
View file @
f02f1eda
...
...
@@ -29,12 +29,6 @@ Created 6/2/1994 Heikki Tuuri
#include "mtr0log.h"
#include "page0zip.h"
#define BTR_MAX_NODE_LEVEL 50 /*!< Maximum B-tree page level
(not really a hard limit).
Used in debug assertions
in btr_page_set_level and
btr_page_get_level */
/** Gets a buffer page and declares its latching order level.
@param[in] page_id page id
@param[in] mode latch mode
...
...
@@ -143,26 +137,6 @@ btr_page_get_index_id(
return(mach_read_from_8(page + PAGE_HEADER + PAGE_INDEX_ID));
}
/********************************************************//**
Gets the node level field in an index page.
@return level, leaf level == 0 */
UNIV_INLINE
ulint
btr_page_get_level(
/*===================*/
const page_t* page) /*!< in: index page */
{
ulint level;
ut_ad(page);
level = mach_read_from_2(page + PAGE_HEADER + PAGE_LEVEL);
ut_ad(level <= BTR_MAX_NODE_LEVEL);
return(level);
}
/********************************************************//**
Sets the node level field in an index page. */
UNIV_INLINE
...
...
storage/innobase/include/buf0buf.h
View file @
f02f1eda
...
...
@@ -2351,8 +2351,9 @@ Use these instead of accessing buf_pool->mutex directly. */
/** Get appropriate page_hash_lock. */
inline
rw_lock_t
*
buf_page_hash_lock_get
(
const
buf_pool_t
*
buf_pool
,
page_id_t
page_id
)
UNIV_INLINE
rw_lock_t
*
buf_page_hash_lock_get
(
const
buf_pool_t
*
buf_pool
,
const
page_id_t
&
page_id
)
{
return
hash_get_lock
(
buf_pool
->
page_hash
,
page_id
.
fold
());
}
...
...
storage/innobase/include/lock0lock.h
View file @
f02f1eda
...
...
@@ -555,7 +555,7 @@ lock_rec_find_set_bit(
/*********************************************************************//**
Checks if a lock request lock1 has to wait for request lock2.
@return
true if
lock1 has to wait for lock2 to be removed */
@return
whether
lock1 has to wait for lock2 to be removed */
bool
lock_has_to_wait
(
/*=============*/
...
...
storage/innobase/lock/lock0lock.cc
View file @
f02f1eda
...
...
@@ -765,7 +765,7 @@ lock_rec_has_to_wait(
||
lock_mode_compatible
(
static_cast
<
lock_mode
>
(
LOCK_MODE_MASK
&
type_mode
),
lock_get_mode
(
lock2
)))
{
return
(
false
)
;
return
false
;
}
/* We have somewhat complex rules when gap type record locks
...
...
@@ -779,7 +779,7 @@ lock_rec_has_to_wait(
different users can have conflicting lock types
on gaps. */
return
(
false
)
;
return
false
;
}
if
(
!
(
type_mode
&
LOCK_INSERT_INTENTION
)
&&
lock_rec_get_gap
(
lock2
))
{
...
...
@@ -787,7 +787,7 @@ lock_rec_has_to_wait(
/* Record lock (LOCK_ORDINARY or LOCK_REC_NOT_GAP
does not need to wait for a gap type lock */
return
(
false
)
;
return
false
;
}
if
((
type_mode
&
LOCK_GAP
)
&&
lock_rec_get_rec_not_gap
(
lock2
))
{
...
...
@@ -795,7 +795,7 @@ lock_rec_has_to_wait(
/* Lock on gap does not need to wait for
a LOCK_REC_NOT_GAP type lock */
return
(
false
)
;
return
false
;
}
if
(
lock_rec_get_insert_intention
(
lock2
))
{
...
...
@@ -811,7 +811,7 @@ lock_rec_has_to_wait(
Also, insert intention locks do not disturb each
other. */
return
(
false
)
;
return
false
;
}
if
((
type_mode
&
LOCK_GAP
||
lock_rec_get_gap
(
lock2
))
...
...
@@ -836,7 +836,7 @@ lock_rec_has_to_wait(
transaction and retry it. But it can save some
unnecessary rollbacks and retries. */
return
(
false
)
;
return
false
;
}
#ifdef WITH_WSREP
...
...
@@ -881,7 +881,7 @@ lock_rec_has_to_wait(
lock2
->
trx
->
mysql_thd
);
if
(
for_locking
)
{
return
FALSE
;
return
false
;
}
}
}
else
{
...
...
@@ -905,12 +905,12 @@ lock_rec_has_to_wait(
<<
wsrep_thd_query
(
lock2
->
trx
->
mysql_thd
);
}
return
FALSE
;
return
false
;
}
}
#endif
/* WITH_WSREP */
return
(
true
)
;
return
true
;
}
/*********************************************************************//**
...
...
@@ -930,24 +930,24 @@ lock_has_to_wait(
if
(
lock1
->
trx
==
lock2
->
trx
||
lock_mode_compatible
(
lock_get_mode
(
lock1
),
lock_get_mode
(
lock2
)))
{
return
(
false
)
;
return
false
;
}
if
(
lock_get_type_low
(
lock1
)
!=
LOCK_REC
)
{
return
(
true
)
;
return
true
;
}
ut_ad
(
lock_get_type_low
(
lock2
)
==
LOCK_REC
);
if
(
lock1
->
type_mode
&
(
LOCK_PREDICATE
|
LOCK_PRDT_PAGE
))
{
return
(
lock_prdt_has_to_wait
(
lock1
->
trx
,
lock1
->
type_mode
,
return
lock_prdt_has_to_wait
(
lock1
->
trx
,
lock1
->
type_mode
,
lock_get_prdt_from_lock
(
lock1
),
lock2
)
)
;
lock2
);
}
return
(
lock_rec_has_to_wait
(
false
,
lock1
->
trx
,
lock1
->
type_mode
,
lock2
,
lock_rec_get_nth_bit
(
lock1
,
PAGE_HEAP_NO_SUPREMUM
)
));
return
lock_rec_has_to_wait
(
false
,
lock1
->
trx
,
lock1
->
type_mode
,
lock2
,
lock_rec_get_nth_bit
(
lock1
,
PAGE_HEAP_NO_SUPREMUM
));
}
/*============== RECORD LOCK BASIC FUNCTIONS ============================*/
...
...
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