[MDEV-12868] MySQL bug #84038 also affects MariaDB 10.2 Created: 2017-05-22  Updated: 2020-08-25  Resolved: 2017-08-10

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.5
Fix Version/s: 10.2.8

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Marko Mäkelä
Resolution: Fixed Votes: 2
Labels: upstream-fixed

Issue Links:
Relates
relates to MDEV-13481 Merge new release of InnoDB MySQL 5.7... Closed

 Description   

MySQL bug #84038 is not reproducible on XtraDB based MariaDB 10.1 (at least not on 10.1.21 or later), but is hit in InnoDB based MariaDB 10.2.5

How to reproduce:

Execute the following

mysql <<< "
DROP DATABASE IF EXISTS test_jfg;
DROP DATABASE IF EXISTS test_jfg2;
CREATE DATABASE test_jfg;
CREATE DATABASE test_jfg2;
CREATE TABLE test_jfg.test (a int unsigned NOT NULL PRIMARY KEY);
FLUSH TABLES test_jfg.test FOR EXPORT;"
 
mysql <<< "
RENAME TABLE test_jfg.test TO test_jfg2.test;
DROP DATABASE test_jfg;"

then restart mysqld

Works fine on MariaDB 10.1, but on 10.2 it causes

2017-05-22 15:29:31 140342278871232 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-05-22 15:29:31 140342278871232 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-05-22 15:29:31 140342278871232 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2017-05-22 15:29:31 140342278871232 [ERROR] InnoDB: Cannot open datafile for read-only: './test_jfg/test.ibd' OS error: 71
2017-05-22 15:29:31 140342278871232 [Note] InnoDB: The InnoDB data dictionary table SYS_DATAFILES for tablespace ID 4 was updated to use file ./test_jfg2/test.ibd.



 Comments   
Comment by Elena Stepanova [ 2017-05-22 ]

According to the upstream bug, it's 5.7-only, so 10.1 shouldn't be affected indeed.
And in 10.2, we don't yet have InnoDB 5.7.19 where it was fixed.

Comment by Hartmut Holzgraefe [ 2017-05-22 ]

No real harm by this, the [Error] lines are actually false alarms as things get auto-fixed in the [Note] line.

Still the [Error] lines should be prevent as they may trigger monitoring alerts, and I_S.INNODB_SYS_DATAFILES should be updated on RENAME without requiring an explicit FLUSH

Comment by Marko Mäkelä [ 2017-08-09 ]

This is indeed fixed in 5.7.19 as Bug #25189192 ERRORS WHEN RESTARTING MYSQL AFTER RENAME TABLE.

Generated at Thu Feb 08 08:01:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.