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
33aec68a
Commit
33aec68a
authored
Mar 02, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
18535a40
01b44c05
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
12 deletions
+40
-12
mysql-test/main/query_cache.result
mysql-test/main/query_cache.result
+4
-0
mysql-test/main/query_cache.test
mysql-test/main/query_cache.test
+7
-0
mysys/my_malloc.c
mysys/my_malloc.c
+1
-1
storage/innobase/btr/btr0cur.cc
storage/innobase/btr/btr0cur.cc
+5
-3
storage/innobase/fil/fil0crypt.cc
storage/innobase/fil/fil0crypt.cc
+15
-6
storage/innobase/fsp/fsp0fsp.cc
storage/innobase/fsp/fsp0fsp.cc
+4
-0
storage/innobase/ibuf/ibuf0ibuf.cc
storage/innobase/ibuf/ibuf0ibuf.cc
+1
-0
storage/innobase/lock/lock0lock.cc
storage/innobase/lock/lock0lock.cc
+2
-2
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+1
-0
No files found.
mysql-test/main/query_cache.result
View file @
33aec68a
...
...
@@ -2207,6 +2207,10 @@ Variable_name Value
Qcache_queries_in_cache 0
DROP FUNCTION foo;
drop table t1;
#
# MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
#
set global Query_cache_size=18446744073709547520;
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
mysql-test/main/query_cache.test
View file @
33aec68a
...
...
@@ -1800,6 +1800,13 @@ show status like "Qcache_queries_in_cache";
DROP
FUNCTION
foo
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
--
echo
#
--
disable_warnings
set
global
Query_cache_size
=
18446744073709547520
;
--
enable_warnings
--
echo
restore
defaults
SET
GLOBAL
query_cache_type
=
default
;
SET
GLOBAL
query_cache_size
=@
save_query_cache_size
;
mysys/my_malloc.c
View file @
33aec68a
...
...
@@ -79,7 +79,7 @@ void *my_malloc(PSI_memory_key key, size_t size, myf my_flags)
if
(
!
size
)
size
=
1
;
if
(
size
>
SIZE_T_MAX
-
1024L
*
1024L
*
16L
)
/* Wrong call */
return
0
;
DBUG_RETURN
(
0
)
;
/* We have to align size as we store MY_THREAD_SPECIFIC flag in the LSB */
size
=
ALIGN_SIZE
(
size
);
...
...
storage/innobase/btr/btr0cur.cc
View file @
33aec68a
...
...
@@ -803,11 +803,13 @@ btr_cur_optimistic_latch_leaves(
mode
,
nullptr
,
BUF_GET_POSSIBLY_FREED
,
mtr
,
&
err
);
if
(
err
==
DB_DECRYPTION_FAILED
)
{
if
(
!
cursor
->
left_block
)
{
cursor
->
index
->
table
->
file_unreadable
=
true
;
}
if
(
btr_page_get_next
(
cursor
->
left_block
->
frame
)
if
(
cursor
->
left_block
->
page
.
status
==
buf_page_t
::
FREED
||
btr_page_get_next
(
cursor
->
left_block
->
frame
)
!=
curr_page_no
)
{
/* release the left block */
btr_leaf_page_release
(
...
...
@@ -6067,7 +6069,7 @@ btr_estimate_n_rows_in_range_on_level(
ut_ad
((
block
!=
NULL
)
==
(
err
==
DB_SUCCESS
));
if
(
err
!=
DB_SUCCESS
)
{
if
(
!
block
)
{
if
(
err
==
DB_DECRYPTION_FAILED
)
{
ib_push_warning
((
void
*
)
NULL
,
DB_DECRYPTION_FAILED
,
...
...
storage/innobase/fil/fil0crypt.cc
View file @
33aec68a
...
...
@@ -1000,6 +1000,9 @@ fil_crypt_read_crypt_data(fil_space_t* space)
nullptr
,
BUF_GET_POSSIBLY_FREED
,
&
mtr
))
{
if
(
block
->
page
.
status
==
buf_page_t
::
FREED
)
{
goto
func_exit
;
}
mysql_mutex_lock
(
&
fil_system
.
mutex
);
if
(
!
space
->
crypt_data
&&
!
space
->
is_stopping
())
{
space
->
crypt_data
=
fil_space_read_crypt_data
(
...
...
@@ -1007,6 +1010,7 @@ fil_crypt_read_crypt_data(fil_space_t* space)
}
mysql_mutex_unlock
(
&
fil_system
.
mutex
);
}
func_exit:
mtr
.
commit
();
}
...
...
@@ -1059,6 +1063,9 @@ static bool fil_crypt_start_encrypting_space(fil_space_t* space)
page_id_t
(
space
->
id
,
0
),
space
->
zip_size
(),
RW_X_LATCH
,
NULL
,
BUF_GET_POSSIBLY_FREED
,
&
mtr
,
&
err
))
{
if
(
block
->
page
.
status
==
buf_page_t
::
FREED
)
{
goto
abort
;
}
crypt_data
->
type
=
CRYPT_SCHEME_1
;
crypt_data
->
min_key_version
=
0
;
// all pages are unencrypted
...
...
@@ -1798,7 +1805,10 @@ fil_crypt_rotate_page(
const
lsn_t
block_lsn
=
mach_read_from_8
(
FIL_PAGE_LSN
+
frame
);
uint
kv
=
buf_page_get_key_version
(
frame
,
space
->
flags
);
if
(
space
->
is_stopping
())
{
if
(
block
->
page
.
status
==
buf_page_t
::
FREED
)
{
/* Do not modify freed pages to avoid an assertion
failure on recovery.*/
}
else
if
(
space
->
is_stopping
())
{
/* The tablespace is closing (in DROP TABLE or
TRUNCATE TABLE or similar): avoid further access */
}
else
if
(
!
kv
&&
!*
reinterpret_cast
<
uint16_t
*>
...
...
@@ -1827,9 +1837,6 @@ fil_crypt_rotate_page(
some dummy pages will be allocated, with 0 in
the FIL_PAGE_TYPE. Those pages should be
skipped from key rotation forever. */
}
else
if
(
block
->
page
.
status
==
buf_page_t
::
FREED
)
{
/* Do not modify freed pages to avoid an assertion
failure on recovery.*/
}
else
if
(
fil_crypt_needs_rotation
(
crypt_data
,
kv
,
...
...
@@ -1982,8 +1989,10 @@ fil_crypt_flush_space(
if
(
buf_block_t
*
block
=
buf_page_get_gen
(
page_id_t
(
space
->
id
,
0
),
space
->
zip_size
(),
RW_X_LATCH
,
NULL
,
BUF_GET_POSSIBLY_FREED
,
&
mtr
))
{
mtr
.
set_named_space
(
space
);
crypt_data
->
write_page0
(
block
,
&
mtr
);
if
(
block
->
page
.
status
!=
buf_page_t
::
FREED
)
{
mtr
.
set_named_space
(
space
);
crypt_data
->
write_page0
(
block
,
&
mtr
);
}
}
mtr
.
commit
();
...
...
storage/innobase/fsp/fsp0fsp.cc
View file @
33aec68a
...
...
@@ -411,6 +411,10 @@ xdes_get_descriptor_const(
nullptr
,
BUF_GET_POSSIBLY_FREED
,
mtr
))
{
if
(
block
->
page
.
status
==
buf_page_t
::
FREED
)
{
return
nullptr
;
}
ut_ad
(
page
!=
0
||
space
->
free_limit
==
mach_read_from_4
(
FSP_FREE_LIMIT
+
FSP_HEADER_OFFSET
+
block
->
frame
));
...
...
storage/innobase/ibuf/ibuf0ibuf.cc
View file @
33aec68a
...
...
@@ -4195,6 +4195,7 @@ void ibuf_merge_or_delete_for_page(buf_block_t *block, const page_id_t page_id,
if
(
bitmap_bits
&&
fseg_page_is_free
(
space
,
page_id
.
page_no
()))
{
ibuf_mtr_start
(
&
mtr
);
mtr
.
set_named_space
(
space
);
ibuf_reset_bitmap
(
block
,
page_id
,
zip_size
,
&
mtr
);
ibuf_mtr_commit
(
&
mtr
);
bitmap_bits
=
0
;
...
...
storage/innobase/lock/lock0lock.cc
View file @
33aec68a
...
...
@@ -4631,8 +4631,8 @@ static void lock_rec_block_validate(const page_id_t page_id)
<<
page_id
<<
" err "
<<
err
;
}
ut_ad
(
!
block
||
lock_rec_validate_page
(
block
,
space
->
is_latched
()));
ut_ad
(
!
block
||
block
->
page
.
status
==
buf_page_t
::
FREED
||
lock_rec_validate_page
(
block
,
space
->
is_latched
()));
mtr_commit
(
&
mtr
);
...
...
storage/innobase/log/log0recv.cc
View file @
33aec68a
...
...
@@ -2425,6 +2425,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
any buffered changes. */
init
->
created
=
false
;
ut_ad
(
!
mtr
.
has_modifications
());
block
->
page
.
status
=
buf_page_t
::
FREED
;
}
/* Make sure that committing mtr does not change the modification
...
...
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