Bug #90255 main.dd_upgrade_error may fail due to system-wide my.cnf
Submitted: 29 Mar 2018 12:37 Modified: 6 Apr 2018 15:13
Reporter: Alexey Kopytov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:8.0.4 OS:Any
Assigned to: CPU Architecture:Any

[29 Mar 2018 12:37] Alexey Kopytov
Description:
I'm looking into main.dd_upgrade_error failures on my machine. It is
failing as follows because mysqld is unable to start with the
following error in the log:

---
2018-03-29T12:23:37.957492Z 1 [ERROR] [MY-011066] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 4864 pages (rounded down to MB) than specified in the .cnf file: initial 6400 pages, max 0 (relevant if non-zero) pages!
2018-03-29T12:23:37.957612Z 1 [ERROR] [MY-011066] InnoDB: Plugin initialization aborted with error Generic error
2018-03-29T12:23:38.558298Z 1 [ERROR] [MY-011013] Failed to initialize DD Storage Engine.
2018-03-29T12:23:38.558603Z 0 [ERROR] [MY-010020] Data Dictionary initialization failed.
2018-03-29T12:23:38.558646Z 0 [ERROR] [MY-010119] Aborting
---

It turns out the reason was a system-wide MySQL installation on my
machine with the following options in
/etc/mysql/mysql.conf.d/mysqld.cnf:

---
[mysqld]
...
innodb_data_file_path=ibdata1:100M:autoextend
...
---

Since the test starts mysqld without --no-defaults and without
explicit defaults file specification, configuration options are read
from pre-defined global configuration file, if available. The server
is also started on a pre-created data directory containing a 76M
ibdata1 file. InnoDB fails to initialize, because the size of ibdata1
is lower than the configuration file option.

This is how the server is started by the test:

---
/.../mysqld  --innodb_dedicated_server=OFF --secure-file-priv="" --log-error=/.../mysql-test/var/tmp/server.log --datadir=/.../mysql-test/var/tmp/data57
---

How to repeat:
Add the following to /etc/mysql/my.cnf:

---
[mysqld]
innodb_data_file_path=ibdata1:100M:autoextend
---

Try running main.dd_upgrade_error, it will fail.

Suggested fix:
Add --no-defaults to mysqld arguments used by the test.
[30 Mar 2018 9:31] MySQL Verification Team
Hello Alexey,

Thank you for the report and feedback!

Thanks,
Umesh
[6 Apr 2018 15:13] Paul DuBois
Posted by developer:
 
Fixed in 8.0.12.

Work was done for test suite. No changelog entry needed.