Skip to content

Commit beae2cf

Browse files
committed
Merge 10.4 into 10.5
2 parents bacdc4d + 4beace3 commit beae2cf

File tree

4 files changed

+62
-56
lines changed

4 files changed

+62
-56
lines changed

mysql-test/main/ssl_crl.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-new-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-new-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'"
88

99
--echo # try logging in with a certificate in the server's --ssl-crl : should fail
10-
# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is wrong
11-
--replace_result "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0" "ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked"
10+
# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is different
11+
--replace_regex /ERROR 2013 \(HY000\): Lost connection to MySQL server at '.*', system error: [0-9]+/ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked/
1212
--error 1
1313
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1

storage/innobase/fsp/fsp0fsp.cc

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ fsp_fill_free_list(
932932
buf_block_t* desc_block = NULL;
933933
descr = xdes_get_descriptor_with_space_hdr(
934934
header, space, i, mtr, init_space, &desc_block);
935-
if (desc_block != NULL) {
935+
if (desc_block && !space->full_crc32()) {
936936
fil_block_check_type(
937937
*desc_block, FIL_PAGE_TYPE_XDES, mtr);
938938
}
@@ -990,7 +990,7 @@ fsp_alloc_free_extent(
990990
descr = xdes_get_descriptor_with_space_hdr(
991991
header, space, hint, mtr, false, &desc_block);
992992

993-
if (desc_block != NULL) {
993+
if (desc_block && !space->full_crc32()) {
994994
fil_block_check_type(*desc_block, FIL_PAGE_TYPE_XDES, mtr);
995995
}
996996

@@ -1483,7 +1483,9 @@ fsp_alloc_seg_inode(
14831483

14841484
block = buf_page_get(page_id, space->zip_size(), RW_SX_LATCH, mtr);
14851485
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
1486-
fil_block_check_type(*block, FIL_PAGE_INODE, mtr);
1486+
if (!space->full_crc32()) {
1487+
fil_block_check_type(*block, FIL_PAGE_INODE, mtr);
1488+
}
14871489

14881490
page = buf_block_get_frame(block);
14891491

@@ -1783,12 +1785,13 @@ fseg_create(
17831785

17841786
header = byte_offset + buf_block_get_frame(block);
17851787

1786-
const ulint type = space->id == TRX_SYS_SPACE
1787-
&& page == TRX_SYS_PAGE_NO
1788-
? FIL_PAGE_TYPE_TRX_SYS
1789-
: FIL_PAGE_TYPE_SYS;
1790-
1791-
fil_block_check_type(*block, type, mtr);
1788+
if (!space->full_crc32()) {
1789+
fil_block_check_type(*block, space->id == TRX_SYS_SPACE
1790+
&& page == TRX_SYS_PAGE_NO
1791+
? FIL_PAGE_TYPE_TRX_SYS
1792+
: FIL_PAGE_TYPE_SYS,
1793+
mtr);
1794+
}
17921795
}
17931796

17941797
if (!has_done_reservation
@@ -2330,7 +2333,9 @@ fseg_alloc_free_page_general(
23302333
space = mtr_x_lock_space(space_id, mtr);
23312334
inode = fseg_inode_get(seg_header, space_id, space->zip_size(),
23322335
mtr, &iblock);
2333-
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2336+
if (!space->full_crc32()) {
2337+
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2338+
}
23342339

23352340
if (!has_done_reservation
23362341
&& !fsp_reserve_free_extents(&n_reserved, space, 2,
@@ -2746,7 +2751,9 @@ fseg_free_page_func(
27462751
seg_inode = fseg_inode_get(seg_header, space->id, space->zip_size(),
27472752
mtr,
27482753
&iblock);
2749-
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2754+
if (!space->full_crc32()) {
2755+
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2756+
}
27502757

27512758
fseg_free_page_low(seg_inode, space, offset, ahi, log, mtr);
27522759

@@ -2918,7 +2925,9 @@ fseg_free_step_func(
29182925
DBUG_RETURN(TRUE);
29192926
}
29202927

2921-
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2928+
if (!space->full_crc32()) {
2929+
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2930+
}
29222931
descr = fseg_get_first_extent(inode, space, mtr);
29232932

29242933
if (descr != NULL) {
@@ -2984,7 +2993,9 @@ fseg_free_step_not_header_func(
29842993

29852994
inode = fseg_inode_get(header, space_id, space->zip_size(), mtr,
29862995
&iblock);
2987-
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2996+
if (!space->full_crc32()) {
2997+
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
2998+
}
29882999

29893000
descr = fseg_get_first_extent(inode, space, mtr);
29903001

storage/innobase/include/trx0sys.h

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,13 @@ trx_sys_rseg_find_free(const buf_block_t* sys_header);
6868
@param[in] rw whether to lock the page for writing
6969
@return the TRX_SYS page
7070
@retval NULL if the page cannot be read */
71-
inline
72-
buf_block_t*
73-
trx_sysf_get(mtr_t* mtr, bool rw = true)
71+
inline buf_block_t *trx_sysf_get(mtr_t* mtr, bool rw= true)
7472
{
75-
buf_block_t* block = buf_page_get(
76-
page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
77-
0, rw ? RW_X_LATCH : RW_S_LATCH, mtr);
78-
if (block) {
79-
buf_block_dbg_add_level(block, SYNC_TRX_SYS_HEADER);
80-
}
81-
return block;
73+
buf_block_t* block = buf_page_get(page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
74+
0, rw ? RW_X_LATCH : RW_S_LATCH, mtr);
75+
if (block)
76+
buf_block_dbg_add_level(block, SYNC_TRX_SYS_HEADER);
77+
return block;
8278
}
8379

8480
#ifdef UNIV_DEBUG
@@ -200,14 +196,13 @@ trx_sysf_rseg_get_space(const buf_block_t* sys_header, ulint rseg_id)
200196
@param[in] sys_header TRX_SYS page
201197
@param[in] rseg_id rollback segment identifier
202198
@return undo page number */
203-
inline
204-
uint32_t
205-
trx_sysf_rseg_get_page_no(const buf_block_t* sys_header, ulint rseg_id)
199+
inline uint32_t
200+
trx_sysf_rseg_get_page_no(const buf_block_t *sys_header, ulint rseg_id)
206201
{
207-
ut_ad(rseg_id < TRX_SYS_N_RSEGS);
208-
return mach_read_from_4(TRX_SYS + TRX_SYS_RSEGS + TRX_SYS_RSEG_PAGE_NO
209-
+ rseg_id * TRX_SYS_RSEG_SLOT_SIZE
210-
+ sys_header->frame);
202+
ut_ad(rseg_id < TRX_SYS_N_RSEGS);
203+
return mach_read_from_4(TRX_SYS + TRX_SYS_RSEGS + TRX_SYS_RSEG_PAGE_NO +
204+
rseg_id * TRX_SYS_RSEG_SLOT_SIZE +
205+
sys_header->frame);
211206
}
212207

213208
/** Maximum length of MySQL binlog file name, in bytes.

storage/innobase/srv/srv0start.cc

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,10 +2010,13 @@ dberr_t srv_start(bool create_new_db)
20102010
}
20112011

20122012
if (!create_new_db) {
2013+
ut_ad(high_level_read_only
2014+
|| srv_force_recovery <= SRV_FORCE_NO_IBUF_MERGE);
2015+
20132016
/* Validate a few system page types that were left
20142017
uninitialized before MySQL or MariaDB 5.5. */
2015-
if (!high_level_read_only) {
2016-
ut_ad(srv_force_recovery <= SRV_FORCE_NO_IBUF_MERGE);
2018+
if (!high_level_read_only
2019+
&& !fil_system.sys_space->full_crc32()) {
20172020
buf_block_t* block;
20182021
mtr.start();
20192022
/* Bitmap page types will be reset in
@@ -2041,29 +2044,26 @@ dberr_t srv_start(bool create_new_db)
20412044
0, RW_X_LATCH, &mtr);
20422045
fil_block_check_type(*block, FIL_PAGE_TYPE_SYS, &mtr);
20432046
mtr.commit();
2047+
}
20442048

2045-
/* Roll back any recovered data dictionary
2046-
transactions, so that the data dictionary
2047-
tables will be free of any locks. The data
2048-
dictionary latch should guarantee that there
2049-
is at most one data dictionary transaction
2050-
active at a time. */
2051-
if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
2052-
/* If the following call is ever
2053-
removed, the first-time
2054-
ha_innobase::open() must hold (or
2055-
acquire and release) a table lock that
2056-
conflicts with
2057-
trx_resurrect_table_locks(), to ensure
2058-
that any recovered incomplete ALTER
2059-
TABLE will have been rolled
2060-
back. Otherwise, dict_table_t::instant
2061-
could be cleared by rollback invoking
2062-
dict_index_t::clear_instant_alter()
2063-
while open table handles exist in
2064-
client connections. */
2065-
trx_rollback_recovered(false);
2066-
}
2049+
/* Roll back any recovered data dictionary
2050+
transactions, so that the data dictionary tables will
2051+
be free of any locks. The data dictionary latch
2052+
should guarantee that there is at most one data
2053+
dictionary transaction active at a time. */
2054+
if (!high_level_read_only
2055+
&& srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
2056+
/* If the following call is ever removed, the
2057+
first-time ha_innobase::open() must hold (or
2058+
acquire and release) a table lock that
2059+
conflicts with trx_resurrect_table_locks(), to
2060+
ensure that any recovered incomplete ALTER
2061+
TABLE will have been rolled back. Otherwise,
2062+
dict_table_t::instant could be cleared by
2063+
rollback invoking
2064+
dict_index_t::clear_instant_alter() while open
2065+
table handles exist in client connections. */
2066+
trx_rollback_recovered(false);
20672067
}
20682068

20692069
/* FIXME: Skip the following if srv_read_only_mode,

0 commit comments

Comments
 (0)