Browse Source

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.
pull/407/head
Vladislav Vaintroub 8 years ago
parent
commit
74e4cf70d0
  1. 10
      mysql-test/suite/innodb/t/row_format_redundant.test
  2. 2
      storage/xtradb/os/os0file.cc

10
mysql-test/suite/innodb/t/row_format_redundant.test

@ -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

2
storage/xtradb/os/os0file.cc

@ -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

Loading…
Cancel
Save