MDEV-34455 innodb_read_only=ON fails to imply innodb_doublewrite=OFF
innodb_doublewrite_update(): Disallow any change if srv_read_only_mode holds, that is, the server was started with innodb_read_only=ON or innodb_force_recovery=6. This fixes up commit 1122ac978e2e709ae17a19335cbf0e4e5b53ad01 (MDEV-33545).
This commit is contained in:
parent
8c8b3ab784
commit
cc1363071a
@ -186,6 +186,11 @@ t1 CREATE TABLE `t1` (
|
|||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check status OK
|
test.t1 check status OK
|
||||||
|
SET GLOBAL innodb_doublewrite=ON;
|
||||||
|
SELECT @@GLOBAL.innodb_doublewrite "OFF expected";
|
||||||
|
OFF expected
|
||||||
|
OFF
|
||||||
|
SET GLOBAL innodb_buf_flush_list_now=ON;
|
||||||
# restart
|
# restart
|
||||||
FTS_INDEX_1.ibd
|
FTS_INDEX_1.ibd
|
||||||
FTS_INDEX_2.ibd
|
FTS_INDEX_2.ibd
|
||||||
|
@ -87,6 +87,10 @@ SELECT * FROM t1 WHERE MATCH(b,c) AGAINST ('column');
|
|||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
|
|
||||||
|
SET GLOBAL innodb_doublewrite=ON;
|
||||||
|
SELECT @@GLOBAL.innodb_doublewrite "OFF expected";
|
||||||
|
SET GLOBAL innodb_buf_flush_list_now=ON;
|
||||||
|
|
||||||
--let $restart_parameters=
|
--let $restart_parameters=
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
--replace_regex /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
|
--replace_regex /FTS_[0-9a-f]*_[0-9a-f]*/FTS/
|
||||||
|
@ -18420,7 +18420,8 @@ static void innodb_data_file_write_through_update(THD *, st_mysql_sys_var*,
|
|||||||
static void innodb_doublewrite_update(THD *, st_mysql_sys_var*,
|
static void innodb_doublewrite_update(THD *, st_mysql_sys_var*,
|
||||||
void *, const void *save)
|
void *, const void *save)
|
||||||
{
|
{
|
||||||
fil_system.set_use_doublewrite(*static_cast<const ulong*>(save));
|
if (!srv_read_only_mode)
|
||||||
|
fil_system.set_use_doublewrite(*static_cast<const ulong*>(save));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void innodb_log_file_size_update(THD *thd, st_mysql_sys_var*,
|
static void innodb_log_file_size_update(THD *thd, st_mysql_sys_var*,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user