Bug #77586 mysqld --initialize --skip-performance-schema fails
Submitted: 1 Jul 2015 16:56 Modified: 1 Jul 2015 20:06
Reporter: Axel Schwenke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.7.7 OS:Linux
Assigned to: CPU Architecture:Any

[1 Jul 2015 16:56] Axel Schwenke
Description:
This bug happens when one tries to setup the initial databases and it does not matter if mysql_install_db is used or mysqld --initialize. If the my.cnf contains something like this

[mysqld]
performance-schema = false

then mysqld will not populate the performance_schema with the default tables and later complain that it misses those tables. When mysql_install_db is used, there is not even a proper error message.

How to repeat:
Disable the performance_schema in my.cnf and try to create the initial datadir.

Suggested fix:
--skip-performance-schema should be ignored when the datadir is initialized. Read: the tables in performance_schema must be created in any case.
[1 Jul 2015 18:20] MySQL Verification Team
Not repeatable on Windows with 5.7.8 source build:

c:\dbs\5.7>rd data /s
data, Are you sure (Y/N)? y

c:\dbs\5.7>dir data
 Volume in drive C has no label.
 Volume Serial Number is 484B-43B0

 Directory of c:\dbs\5.7

File Not Found

c:\dbs\5.7>type my.ini
[mysqld]
basedir=c:\dbs\5.7
datadir=c:\dbs\5.7\data
performance-schema= false
c:\dbs\5.7>bin\mysqld --defaults-file=c:\dbs\5.7\my.ini --initialize
2015-07-01T18:18:13.087232Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp s

c:\dbs\5.7>bin\mysqld --version
bin\mysqld  Ver 5.7.8-rc for Win64 on x86_64 (Source distribution PULL 2015/06/05)

c:\dbs\5.7>dir data\performance_schema
 Volume in drive C has no label.
 Volume Serial Number is 484B-43B0

 Directory of c:\dbs\5.7\data\performance_schema

07/01/2015  03:18 PM    <DIR>          .
07/01/2015  03:18 PM    <DIR>          ..
07/01/2015  03:18 PM             8,706 accounts.frm
07/01/2015  03:18 PM             8,624 cond_instances.frm
07/01/2015  03:18 PM                61 db.opt
07/01/2015  03:18 PM             9,103 events_stages_current.frm
07/01/2015  03:18 PM             9,103 events_stages_history.frm
07/01/2015  03:18 PM             9,103 events_stages_history_long.frm
07/01/2015  03:18 PM             8,874 events_stages_summary_by_account_by_event_name.frm
07/01/2015  03:18 PM             8,844 events_stages_summary_by_host_by_event_name.frm
07/01/2015  03:18 PM             8,854 events_stages_summary_by_thread_by_event_name.frm
07/01/2015  03:18 PM             8,844 events_stages_summary_by_user_by_event_name.frm
07/01/2015  03:18 PM             8,814 events_stages_summary_global_by_event_name.frm
07/01/2015  03:18 PM            10,597 events_statements_current.frm
07/01/2015  03:18 PM            10,597 events_statements_history.frm
07/01/2015  03:18 PM            10,597 events_statements_history_long.frm
07/01/2015  03:18 PM            10,000 events_statements_summary_by_account_by_event_name.frm
07/01/2015  03:18 PM            10,102 events_statements_summary_by_digest.frm
07/01/2015  03:18 PM             9,970 events_statements_summary_by_host_by_event_name.frm
07/01/2015  03:18 PM            10,369 events_statements_summary_by_program.frm
07/01/2015  03:18 PM             9,980 events_statements_summary_by_thread_by_event_name.frm
07/01/2015  03:18 PM             9,970 events_statements_summary_by_user_by_event_name.frm
07/01/2015  03:18 PM             9,940 events_statements_summary_global_by_event_name.frm

<CUT>
[1 Jul 2015 18:30] MySQL Verification Team
On Windows the released version 5.7.7 fails how to reported:

c:\tmp>cd mysql-5.7.7-rc-winx64

c:\tmp\mysql-5.7.7-rc-winx64>bin\mysqld --performance-schema = false --initialize
2015-07-01T18:24:54.686592Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see docume

c:\tmp\mysql-5.7.7-rc-winx64>dir data
 Volume in drive C has no label.
 Volume Serial Number is 484B-43B0

 Directory of c:\tmp\mysql-5.7.7-rc-winx64\data

07/01/2015  03:24 PM    <DIR>          .
07/01/2015  03:24 PM    <DIR>          ..
07/01/2015  03:24 PM        12,582,912 ibdata1
07/01/2015  03:24 PM               246 ib_buffer_pool
07/01/2015  03:24 PM        50,331,648 ib_logfile0
07/01/2015  03:24 PM        50,331,648 ib_logfile1
07/01/2015  03:24 PM               308 tikal.err
               5 File(s)    113,246,762 bytes
               2 Dir(s)  1,361,790,521,344 bytes free

c:\tmp\mysql-5.7.7-rc-winx64>rd data /s
data, Are you sure (Y/N)? y

c:\tmp\mysql-5.7.7-rc-winx64>bin\mysqld  --initialize
2015-07-01T18:26:49.519582Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see docume

c:\tmp\mysql-5.7.7-rc-winx64>dir data
 Volume in drive C has no label.
 Volume Serial Number is 484B-43B0

 Directory of c:\tmp\mysql-5.7.7-rc-winx64\data

07/01/2015  03:27 PM    <DIR>          .
07/01/2015  03:27 PM    <DIR>          ..
07/01/2015  03:27 PM        12,582,912 ibdata1
07/01/2015  03:27 PM               485 ib_buffer_pool
07/01/2015  03:27 PM        50,331,648 ib_logfile0
07/01/2015  03:26 PM        50,331,648 ib_logfile1
07/01/2015  03:26 PM    <DIR>          mysql
07/01/2015  03:26 PM    <DIR>          performance_schema
07/01/2015  03:27 PM    <DIR>          sys
07/01/2015  03:27 PM               461 tikal.err
               5 File(s)    113,247,154 bytes
               5 Dir(s)  1,361,776,447,488 bytes free

c:\tmp\mysql-5.7.7-rc-winx64>dir data\performance_schema
 Volume in drive C has no label.
 Volume Serial Number is 484B-43B0

 Directory of c:\tmp\mysql-5.7.7-rc-winx64\data\performance_schema

07/01/2015  03:26 PM    <DIR>          .
07/01/2015  03:26 PM    <DIR>          ..
07/01/2015  03:26 PM             8,706 accounts.frm
07/01/2015  03:26 PM             8,624 cond_instances.frm
07/01/2015  03:26 PM                61 db.opt
07/01/2015  03:26 PM             9,103 events_stages_current.frm
07/01/2015  03:26 PM             9,103 events_stages_history.frm
07/01/2015  03:26 PM             9,103 events_stages_history_long.frm
07/01/2015  03:26 PM             8,874 events_stages_summary_by_account_by_event_name.frm
07/01/2015  03:26 PM             8,844 events_stages_summary_by_host_by_event_name.frm
07/01/2015  03:26 PM             8,854 events_stages_summary_by_thread_by_event_name.frm
07/01/2015  03:26 PM             8,844 events_stages_summary_by_user_by_event_name.frm
07/01/2015  03:26 PM             8,814 events_stages_summary_global_by_event_name.frm
07/01/2015  03:26 PM            10,597 events_statements_current.frm
07/01/2015  03:26 PM            10,597 events_statements_history.frm
07/01/2015  03:26 PM            10,597 events_statements_history_long.frm
07/01/2015  03:26 PM            10,000 events_statements_summary_by_account_by_event_name.frm
07/01/2015  03:26 PM            10,102 events_statements_summary_by_digest.frm

So already fixed in source.
[1 Jul 2015 19:28] Axel Schwenke
Hi Miguel, nice to read you :)

If this is fixed in upcoming 5.7.8 then ok to close this report.
[1 Jul 2015 20:06] MySQL Verification Team
Closing since same behavior as Windows observed on Linux Centos 6.5. Thank you for the bug report.