Description:
Server will crash on opening InnoDB table that has read-only .ibd file and --innodb-read-only is not set:
C:\mysql-5.6.8-rc-winx64>bin\mysqld --no-defaults --console --port=3307
121115 13:34:36 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. P
lease use --explicit_defaults_for_timestamp server option (see documentation for
more details).
121115 13:34:36 [Note] Plugin 'FEDERATED' is disabled.
121115 13:34:36 [Note] InnoDB: The InnoDB memory heap is disabled
121115 13:34:36 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked func
tions
121115 13:34:36 [Note] InnoDB: Compressed tables use zlib 1.2.3
121115 13:34:36 [Note] InnoDB: CPU does not support crc32 instructions
121115 13:34:36 [Note] InnoDB: Initializing buffer pool, size = 128.0M
121115 13:34:36 [Note] InnoDB: Completed initialization of buffer pool
121115 13:34:36 [Note] InnoDB: Highest supported file format is Barracuda.
121115 13:34:36 [Note] InnoDB: 128 rollback segment(s) are active.
121115 13:34:36 [Note] InnoDB: Waiting for purge to start
121115 13:34:36 [Note] InnoDB: 1.2.8 started; log sequence number 1635034
121115 13:34:36 [Note] Server hostname (bind-address): '*'; port: 3307
121115 13:34:36 [Note] IPv6 is available.
121115 13:34:36 [Note] - '::' resolves to '::';
121115 13:34:36 [Note] Server socket created on IP: '::'.
121115 13:34:36 [Note] Event Scheduler: Loaded 0 events
121115 13:34:36 [Note] bin\mysqld: ready for connections.
Version: '5.6.8-rc' socket: '' port: 3307 MySQL Community Server (GPL)
121115 13:36:32 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
121115 13:36:32 InnoDB: File name .\test\tt.ibd
121115 13:36:32 InnoDB: File operation call: 'open' returned OS error 105.
121115 13:36:32 InnoDB: Cannot continue operation.
How to repeat:
1. Set <tbl>.ibd to read-only.
2. Start server without --innodb-read-only
3. Try to issue SELECT against table.
Suggested fix:
Don't crash on read-only tablespace.