Bug #60269 | mysql should reject attempts to create system tables in incorrect engine | ||
---|---|---|---|
Submitted: | 27 Feb 2011 9:22 | Modified: | 3 May 2012 19:40 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
Version: | 5.1.55,5.5.9, 5.5.11 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[27 Feb 2011 9:22]
Shane Bester
[27 Feb 2011 9:23]
MySQL Verification Team
http://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html "Warning Do not convert MySQL system tables in the mysql database from MyISAM to InnoDB tables! This is an unsupported operation. If you do this, MySQL does not restart until you restore the old system tables from a backup or re-generate them with the mysql_install_db script. "
[27 Feb 2011 9:25]
MySQL Verification Team
For the record, 5.1.55 cannot startup and crashes unless you give --skip-grant-tables option: mysqld.exe!ha_resolve_by_name()[handler.cc:135] mysqld.exe!open_binary_frm()[table.cc:896] mysqld.exe!open_table_def()[table.cc:643] mysqld.exe!get_table_share()[sql_base.cc:379] mysqld.exe!get_table_share_with_create()[sql_base.cc:458] mysqld.exe!open_unireg_entry()[sql_base.cc:3875] mysqld.exe!open_table()[sql_base.cc:2931] mysqld.exe!open_tables()[sql_base.cc:4624] mysqld.exe!open_and_lock_tables_derived()[sql_base.cc:5042] mysqld.exe!plugin_load()[sql_plugin.cc:1417] mysqld.exe!plugin_init()[sql_plugin.cc:1249] mysqld.exe!init_server_components()[mysqld.cc:3997] mysqld.exe!win_main()[mysqld.cc:4466] mysqld.exe!mysql_service()[mysqld.cc:4644] mysqld.exe!main()[mysqld.cc:4830] mysqld.exe!__tmainCRTStartup()[crt0.c:327]
[27 Feb 2011 15:01]
Davi Arnaut
It's not really up to InnoDB. It's the server that should reject anything but MyISAM for system tables.
[27 Feb 2011 17:01]
MySQL Verification Team
Davi, I agree with that of course. I just chose innodb because they already do it :) "Version: '5.5.9' socket: '' port: 3306 MySQL Community Server (GPL) InnoDB: Error: trying to create a MySQL system table mysql/db of type InnoDB. InnoDB: MySQL system tables must be of the MyISAM type!" row_create_table_for_mysql() calls row_mysql_is_system_table() which only checks: return(0 == strcmp(name + 6, "host") || 0 == strcmp(name + 6, "user") || 0 == strcmp(name + 6, "db"));
[27 Feb 2011 18:14]
Davi Arnaut
That was pretty clear in the description ("currently innodb") and is also a part of why this is buggy.
[3 May 2012 19:40]
Paul DuBois
Noted in 5.5.24, 5.5.6 changelogs. The server did not reject attempts to modify tables in the mysql database to non-MyISAM storage engines.