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
f2bd662f
Commit
f2bd662f
authored
Nov 22, 2023
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.6 into 10.11
parents
7443ad1c
d963584d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
storage/innobase/buf/buf0buf.cc
storage/innobase/buf/buf0buf.cc
+7
-4
storage/innobase/buf/buf0flu.cc
storage/innobase/buf/buf0flu.cc
+1
-1
storage/innobase/include/buf0buf.h
storage/innobase/include/buf0buf.h
+3
-2
tpool/tpool_structs.h
tpool/tpool_structs.h
+2
-3
No files found.
storage/innobase/buf/buf0buf.cc
View file @
f2bd662f
...
...
@@ -404,7 +404,7 @@ static bool buf_page_decrypt_after_read(buf_page_t *bpage,
if
(
id
.
space
()
==
SRV_TMP_SPACE_ID
&&
innodb_encrypt_temporary_tables
)
{
slot
=
buf_pool
.
io_buf_reserve
();
slot
=
buf_pool
.
io_buf_reserve
(
false
);
slot
->
allocate
();
bool
ok
=
buf_tmp_page_decrypt
(
slot
->
crypt_buf
,
dst_frame
);
slot
->
release
();
...
...
@@ -426,7 +426,7 @@ static bool buf_page_decrypt_after_read(buf_page_t *bpage,
return
false
;
}
slot
=
buf_pool
.
io_buf_reserve
();
slot
=
buf_pool
.
io_buf_reserve
(
false
);
slot
->
allocate
();
decompress_with_slot:
...
...
@@ -449,7 +449,7 @@ static bool buf_page_decrypt_after_read(buf_page_t *bpage,
return
false
;
}
slot
=
buf_pool
.
io_buf_reserve
();
slot
=
buf_pool
.
io_buf_reserve
(
false
);
slot
->
allocate
();
/* decrypt using crypt_buf to dst_frame */
...
...
@@ -1517,14 +1517,17 @@ void buf_pool_t::io_buf_t::close()
n_slots
=
0
;
}
buf_tmp_buffer_t
*
buf_pool_t
::
io_buf_t
::
reserve
()
buf_tmp_buffer_t
*
buf_pool_t
::
io_buf_t
::
reserve
(
bool
wait_for_reads
)
{
for
(;;)
{
for
(
buf_tmp_buffer_t
*
s
=
slots
,
*
e
=
slots
+
n_slots
;
s
!=
e
;
s
++
)
if
(
s
->
acquire
())
return
s
;
buf_dblwr
.
flush_buffered_writes
();
os_aio_wait_until_no_pending_writes
(
true
);
if
(
!
wait_for_reads
)
continue
;
for
(
buf_tmp_buffer_t
*
s
=
slots
,
*
e
=
slots
+
n_slots
;
s
!=
e
;
s
++
)
if
(
s
->
acquire
())
return
s
;
...
...
storage/innobase/buf/buf0flu.cc
View file @
f2bd662f
...
...
@@ -655,7 +655,7 @@ static byte *buf_page_encrypt(fil_space_t* space, buf_page_t* bpage, byte* s,
ut_ad
(
!
bpage
->
zip_size
()
||
!
page_compressed
);
/* Find free slot from temporary memory array */
*
slot
=
buf_pool
.
io_buf_reserve
();
*
slot
=
buf_pool
.
io_buf_reserve
(
true
);
ut_a
(
*
slot
);
(
*
slot
)
->
allocate
();
...
...
storage/innobase/include/buf0buf.h
View file @
f2bd662f
...
...
@@ -1900,7 +1900,8 @@ class buf_pool_t
a delete-buffering operation is pending. Protected by mutex. */
buf_page_t
watch
[
innodb_purge_threads_MAX
+
1
];
/** Reserve a buffer. */
buf_tmp_buffer_t
*
io_buf_reserve
()
{
return
io_buf
.
reserve
();
}
buf_tmp_buffer_t
*
io_buf_reserve
(
bool
wait_for_reads
)
{
return
io_buf
.
reserve
(
wait_for_reads
);
}
/** Remove a block from flush_list.
@param bpage buffer pool page */
...
...
@@ -1935,7 +1936,7 @@ class buf_pool_t
void
close
();
/** Reserve a buffer */
buf_tmp_buffer_t
*
reserve
();
buf_tmp_buffer_t
*
reserve
(
bool
wait_for_reads
);
}
io_buf
;
/** whether resize() is in the critical path */
...
...
tpool/tpool_structs.h
View file @
f2bd662f
...
...
@@ -155,12 +155,11 @@ template<typename T> class cache
{
mysql_mutex_lock
(
&
m_mtx
);
assert
(
!
is_full
());
const
bool
was_empty
=
is_empty
();
// put element to the logical end of the array
m_cache
[
--
m_pos
]
=
ele
;
/* Notify waiters when the cache becomes
not empty, or when it becomes full */
if
(
m_pos
==
1
||
(
m_waiters
&&
is_full
()))
if
(
was_empty
||
(
is_full
()
&&
m_waiters
))
pthread_cond_broadcast
(
&
m_cv
);
mysql_mutex_unlock
(
&
m_mtx
);
}
...
...
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