Commit 74e4cf70 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-13059 XtraDB hangs on Windows due to failing to release block->lock X-latch

in innodb_read_only mode.

The reason for the hang is that there was no notification received about
completed read io. File handles are bound to completion_port, and there
were no background "write" threads that would be waiting on completion_port,
only 2 "read" threads waiting on read_completion_port were active.

The fix is to use a single IO completion port for all IOs, if
innodb_read_only is set.
parent 75b35a3b
......@@ -2,16 +2,6 @@
# Embedded mode doesn't allow restarting
--source include/not_embedded.inc
# MDEV-13059 XtraDB hangs on Windows due to failing to release
# block->lock X-latch in innodb_read_only mode
if (`SELECT count(*) FROM information_schema.plugins WHERE
plugin_name = 'innodb' AND plugin_status = 'active' AND
plugin_description LIKE '%xtradb%'`){
if (`SELECT @@version_compile_os IN ('Win32','Win64','Windows')`) {
skip MDEV-13059 XtraDB hangs on Windows in innodb_read_only mode;
}
}
create table t1 (a int not null, d varchar(15) not null, b
varchar(198) not null, c char(156),
fulltext ftsic(c)) engine=InnoDB
......
......@@ -4163,7 +4163,7 @@ os_aio_init(
#ifdef _WIN32
ut_a(completion_port == 0 && read_completion_port == 0);
completion_port = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
read_completion_port = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
read_completion_port = srv_read_only_mode? completion_port : CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
ut_a(completion_port && read_completion_port);
#endif
......
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