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