Commit beae2cf0 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.4 into 10.5

parents bacdc4df 4beace33
......@@ -7,7 +7,7 @@
--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'"
--echo # try logging in with a certificate in the server's --ssl-crl : should fail
# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is wrong
--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"
# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is different
--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/
--error 1
--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
......@@ -932,7 +932,7 @@ fsp_fill_free_list(
buf_block_t* desc_block = NULL;
descr = xdes_get_descriptor_with_space_hdr(
header, space, i, mtr, init_space, &desc_block);
if (desc_block != NULL) {
if (desc_block && !space->full_crc32()) {
fil_block_check_type(
*desc_block, FIL_PAGE_TYPE_XDES, mtr);
}
......@@ -990,7 +990,7 @@ fsp_alloc_free_extent(
descr = xdes_get_descriptor_with_space_hdr(
header, space, hint, mtr, false, &desc_block);
if (desc_block != NULL) {
if (desc_block && !space->full_crc32()) {
fil_block_check_type(*desc_block, FIL_PAGE_TYPE_XDES, mtr);
}
......@@ -1483,7 +1483,9 @@ fsp_alloc_seg_inode(
block = buf_page_get(page_id, space->zip_size(), RW_SX_LATCH, mtr);
buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
fil_block_check_type(*block, FIL_PAGE_INODE, mtr);
if (!space->full_crc32()) {
fil_block_check_type(*block, FIL_PAGE_INODE, mtr);
}
page = buf_block_get_frame(block);
......@@ -1783,12 +1785,13 @@ fseg_create(
header = byte_offset + buf_block_get_frame(block);
const ulint type = space->id == TRX_SYS_SPACE
&& page == TRX_SYS_PAGE_NO
? FIL_PAGE_TYPE_TRX_SYS
: FIL_PAGE_TYPE_SYS;
fil_block_check_type(*block, type, mtr);
if (!space->full_crc32()) {
fil_block_check_type(*block, space->id == TRX_SYS_SPACE
&& page == TRX_SYS_PAGE_NO
? FIL_PAGE_TYPE_TRX_SYS
: FIL_PAGE_TYPE_SYS,
mtr);
}
}
if (!has_done_reservation
......@@ -2330,7 +2333,9 @@ fseg_alloc_free_page_general(
space = mtr_x_lock_space(space_id, mtr);
inode = fseg_inode_get(seg_header, space_id, space->zip_size(),
mtr, &iblock);
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
if (!space->full_crc32()) {
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
}
if (!has_done_reservation
&& !fsp_reserve_free_extents(&n_reserved, space, 2,
......@@ -2746,7 +2751,9 @@ fseg_free_page_func(
seg_inode = fseg_inode_get(seg_header, space->id, space->zip_size(),
mtr,
&iblock);
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
if (!space->full_crc32()) {
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
}
fseg_free_page_low(seg_inode, space, offset, ahi, log, mtr);
......@@ -2918,7 +2925,9 @@ fseg_free_step_func(
DBUG_RETURN(TRUE);
}
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
if (!space->full_crc32()) {
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
}
descr = fseg_get_first_extent(inode, space, mtr);
if (descr != NULL) {
......@@ -2984,7 +2993,9 @@ fseg_free_step_not_header_func(
inode = fseg_inode_get(header, space_id, space->zip_size(), mtr,
&iblock);
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
if (!space->full_crc32()) {
fil_block_check_type(*iblock, FIL_PAGE_INODE, mtr);
}
descr = fseg_get_first_extent(inode, space, mtr);
......
......@@ -68,17 +68,13 @@ trx_sys_rseg_find_free(const buf_block_t* sys_header);
@param[in] rw whether to lock the page for writing
@return the TRX_SYS page
@retval NULL if the page cannot be read */
inline
buf_block_t*
trx_sysf_get(mtr_t* mtr, bool rw = true)
inline buf_block_t *trx_sysf_get(mtr_t* mtr, bool rw= true)
{
buf_block_t* block = buf_page_get(
page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
0, rw ? RW_X_LATCH : RW_S_LATCH, mtr);
if (block) {
buf_block_dbg_add_level(block, SYNC_TRX_SYS_HEADER);
}
return block;
buf_block_t* block = buf_page_get(page_id_t(TRX_SYS_SPACE, TRX_SYS_PAGE_NO),
0, rw ? RW_X_LATCH : RW_S_LATCH, mtr);
if (block)
buf_block_dbg_add_level(block, SYNC_TRX_SYS_HEADER);
return block;
}
#ifdef UNIV_DEBUG
......@@ -200,14 +196,13 @@ trx_sysf_rseg_get_space(const buf_block_t* sys_header, ulint rseg_id)
@param[in] sys_header TRX_SYS page
@param[in] rseg_id rollback segment identifier
@return undo page number */
inline
uint32_t
trx_sysf_rseg_get_page_no(const buf_block_t* sys_header, ulint rseg_id)
inline uint32_t
trx_sysf_rseg_get_page_no(const buf_block_t *sys_header, ulint rseg_id)
{
ut_ad(rseg_id < TRX_SYS_N_RSEGS);
return mach_read_from_4(TRX_SYS + TRX_SYS_RSEGS + TRX_SYS_RSEG_PAGE_NO
+ rseg_id * TRX_SYS_RSEG_SLOT_SIZE
+ sys_header->frame);
ut_ad(rseg_id < TRX_SYS_N_RSEGS);
return mach_read_from_4(TRX_SYS + TRX_SYS_RSEGS + TRX_SYS_RSEG_PAGE_NO +
rseg_id * TRX_SYS_RSEG_SLOT_SIZE +
sys_header->frame);
}
/** Maximum length of MySQL binlog file name, in bytes.
......
......@@ -2010,10 +2010,13 @@ dberr_t srv_start(bool create_new_db)
}
if (!create_new_db) {
ut_ad(high_level_read_only
|| srv_force_recovery <= SRV_FORCE_NO_IBUF_MERGE);
/* Validate a few system page types that were left
uninitialized before MySQL or MariaDB 5.5. */
if (!high_level_read_only) {
ut_ad(srv_force_recovery <= SRV_FORCE_NO_IBUF_MERGE);
if (!high_level_read_only
&& !fil_system.sys_space->full_crc32()) {
buf_block_t* block;
mtr.start();
/* Bitmap page types will be reset in
......@@ -2041,29 +2044,26 @@ dberr_t srv_start(bool create_new_db)
0, RW_X_LATCH, &mtr);
fil_block_check_type(*block, FIL_PAGE_TYPE_SYS, &mtr);
mtr.commit();
}
/* Roll back any recovered data dictionary
transactions, so that the data dictionary
tables will be free of any locks. The data
dictionary latch should guarantee that there
is at most one data dictionary transaction
active at a time. */
if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
/* If the following call is ever
removed, the first-time
ha_innobase::open() must hold (or
acquire and release) a table lock that
conflicts with
trx_resurrect_table_locks(), to ensure
that any recovered incomplete ALTER
TABLE will have been rolled
back. Otherwise, dict_table_t::instant
could be cleared by rollback invoking
dict_index_t::clear_instant_alter()
while open table handles exist in
client connections. */
trx_rollback_recovered(false);
}
/* Roll back any recovered data dictionary
transactions, so that the data dictionary tables will
be free of any locks. The data dictionary latch
should guarantee that there is at most one data
dictionary transaction active at a time. */
if (!high_level_read_only
&& srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
/* If the following call is ever removed, the
first-time ha_innobase::open() must hold (or
acquire and release) a table lock that
conflicts with trx_resurrect_table_locks(), to
ensure that any recovered incomplete ALTER
TABLE will have been rolled back. Otherwise,
dict_table_t::instant could be cleared by
rollback invoking
dict_index_t::clear_instant_alter() while open
table handles exist in client connections. */
trx_rollback_recovered(false);
}
/* FIXME: Skip the following if srv_read_only_mode,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment