after upgrading to 1.4 from 10.3, I execute mysql_upgrade and I get
mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1071 (42000) at line 437: Specified key was too long; max key length is 1000 bytes
FATAL ERROR: Upgrade failed
But, that is mariadb upgrader code that fails, for my server does not have a single innodb table, all are Rocksdb. If I start Mariadb with skip-innodb=1, there is no error, therefore, the error happens with the upgrader tries to create performance tables for inndb.
if this is a table from mysql then a descriptive message should say what table is the offending one. I tried to trace all activity and the last message is:
36 Prepare DROP DATABASE IF EXISTS performance_schema
36 Query EXECUTE stmt
36 Execute DROP DATABASE IF EXISTS performance_schema
36 Query DROP PREPARE stmt
36 Query SET @cmd= "CREATE DATABASE performance_schema character set utf8"
36 Query SET @str = IF(@broken_pfs = 0, @cmd, 'SET @dummy = 0')
36 Query PREPARE stmt FROM @str
36 Prepare CREATE DATABASE performance_schema character set utf8
36 Query EXECUTE stmt
36 Execute CREATE DATABASE performance_schema character set utf8
36 Query DROP PREPARE stmt
36 Quit
so what comes next is generating the error. How do we know what code is being applied?
Thanks for the dump.
While it doesn't match the story to the teeth, I think I've eventually managed to figure out most of what had happened.
You must have had this database from around 10.1 or so.
Some time then, in order to get rid of InnoDB, you altered a few system tables which had InnoDB for an engine. Importantly, you changed innodb_table_stats and innodb_index_stats tables to MyISAM.
In 10.2+, the tables' structures were modified, particularly one of columns was enlarged. For innodb_index_stats this column is a part of an index, and the new column length makes the index too long for MyISAM (it is still fine with InnoDB). mysql_upgrade script takes into account the possibility that InnoDB doesn't exist in the system, and doesn't attempt to touch its tables then, but it cannot guess that tables which belong to InnoDB by nature can have some other engine, so this error is not anticipated.
At least by doing it this way (altering the tables to MyISAM on 10.1 and then running upgrade on any higher version), I get the same error. The line numbers differ depending on the version, with 10.4 it matches yours exactly.
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1071 (42000) at line 437: Specified key was too long; max key length is 1000 bytes
What I couldn't quite figure out is where mysql.innodb_index_stats table disappeared after the upgrade, as it isn't present in your dump. Another table, mysql.innodb_table_stats, is there, and it is indeed MyISAM, but innodb_index_stats, which causes the failure, isn't there at all. Maybe it disappeared during further failed attempts to upgrade, or maybe you dropped it later.
You should have seen this error in 10.2 already, but maybe you ran upgrade without InnoDB. And 10.3 apparently skipped mysql_upgrade, otherwise you wouldn't have the error about mysql.proc in the log on 10.4.
So mainly it's an issue of the customized configuration. But I want to keep this report open, because after dealing with it, there are at least two complaints I fully agree with.
First, mysql_upgrade needs to provide a much better message. I don't yet know how exactly it can be achieved, as it just runs the SQL script, but it's badly needed. Printing the failing statement would be very helpful, while the line number isn't at all, it doesn't match line numbers in either mysql_fix_privilege_tables.sql or scripts/mysql_system_tables_fix.sql or scripts/mysql_fix_privilege_tables_sql.c.
Secondly, while mysql_upgrade claims that it encountered a FATAL error and aborted, in fact it does a lot of stuff afterwards. That's why the general log is useless too, the failed statement is nowhere near the end of it.
So, I'm going to modify the summary of this bug to indicate that it's about mysql_upgrade failing without proper diagnostics.
For resolving the original issue, once you decide to customize you system tables, you have to stay consistent about it. In this case, inconsistency was in changing InnoDB-specific tables to MyISAM rather than dropping them, and then switching InnoDB back on. I think it's rather fortunate that it complained so early, I don't even know how InnoDB would behave when its system tables turned out to be outside the engine.
Elena Stepanova
added a comment - - edited Thanks for the dump.
While it doesn't match the story to the teeth, I think I've eventually managed to figure out most of what had happened.
You must have had this database from around 10.1 or so.
Some time then, in order to get rid of InnoDB, you altered a few system tables which had InnoDB for an engine. Importantly, you changed innodb_table_stats and innodb_index_stats tables to MyISAM.
In 10.2+, the tables' structures were modified, particularly one of columns was enlarged. For innodb_index_stats this column is a part of an index, and the new column length makes the index too long for MyISAM (it is still fine with InnoDB).
mysql_upgrade script takes into account the possibility that InnoDB doesn't exist in the system, and doesn't attempt to touch its tables then, but it cannot guess that tables which belong to InnoDB by nature can have some other engine, so this error is not anticipated.
At least by doing it this way (altering the tables to MyISAM on 10.1 and then running upgrade on any higher version), I get the same error. The line numbers differ depending on the version, with 10.4 it matches yours exactly.
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1071 (42000) at line 437: Specified key was too long; max key length is 1000 bytes
FATAL ERROR: Upgrade failed
The failing statement is this:
alter table innodb_index_stats modify last_update timestamp not null default current_timestamp on update current_timestamp , modify table_name varchar (199)
What I couldn't quite figure out is where mysql.innodb_index_stats table disappeared after the upgrade, as it isn't present in your dump. Another table, mysql.innodb_table_stats , is there, and it is indeed MyISAM, but innodb_index_stats , which causes the failure, isn't there at all. Maybe it disappeared during further failed attempts to upgrade, or maybe you dropped it later.
You should have seen this error in 10.2 already, but maybe you ran upgrade without InnoDB. And 10.3 apparently skipped mysql_upgrade , otherwise you wouldn't have the error about mysql.proc in the log on 10.4.
So mainly it's an issue of the customized configuration. But I want to keep this report open, because after dealing with it, there are at least two complaints I fully agree with.
First, mysql_upgrade needs to provide a much better message. I don't yet know how exactly it can be achieved, as it just runs the SQL script, but it's badly needed. Printing the failing statement would be very helpful, while the line number isn't at all, it doesn't match line numbers in either mysql_fix_privilege_tables.sql or scripts/mysql_system_tables_fix.sql or scripts/mysql_fix_privilege_tables_sql.c .
Secondly, while mysql_upgrade claims that it encountered a FATAL error and aborted, in fact it does a lot of stuff afterwards. That's why the general log is useless too, the failed statement is nowhere near the end of it.
So, I'm going to modify the summary of this bug to indicate that it's about mysql_upgrade failing without proper diagnostics.
For resolving the original issue, once you decide to customize you system tables, you have to stay consistent about it. In this case, inconsistency was in changing InnoDB-specific tables to MyISAM rather than dropping them, and then switching InnoDB back on. I think it's rather fortunate that it complained so early, I don't even know how InnoDB would behave when its system tables turned out to be outside the engine.
Dear Elena
Your must create a product that does not depend on the existence of any particular engine, and it still works and upgrades fine. There must be a "legal" way to get rid of Innodb that does cause these issues. I use rocksdb and feel it works much better.
Philip orleans
added a comment - Dear Elena
Your must create a product that does not depend on the existence of any particular engine, and it still works and upgrades fine. There must be a "legal" way to get rid of Innodb that does cause these issues. I use rocksdb and feel it works much better.
philip_38, I think that the InnoDB persistent statistics tables were a mistake that was made in MySQL 5.6. In MariaDB Server 10.6.5, MDEV-25919 should finally fix most trouble related to them, but I do not think that it will fix these upgrade issues.
I hope that in some future, we will be able to deprecate and remove the InnoDB internal statistics. To my understanding, that would require making the construction of engine-independent statistics more efficient.
Marko Mäkelä
added a comment - philip_38 , I think that the InnoDB persistent statistics tables were a mistake that was made in MySQL 5.6. In MariaDB Server 10.6.5, MDEV-25919 should finally fix most trouble related to them, but I do not think that it will fix these upgrade issues.
I hope that in some future, we will be able to deprecate and remove the InnoDB internal statistics. To my understanding, that would require making the construction of engine-independent statistics more efficient.
Question: I could find a way to fix this in Google. I erased by mistake the directory '#rocksdb', and now I have all the *.frm. I don't care about the data, but I want to recover the create table definitions from the *.frm. Is there a way? I plain Mysql there was a utility but it depends on the full server been installed. Does MariaDB offers any way to recreate the table structure from a *.from (Rocksdb)
Philip orleans
added a comment - Question: I could find a way to fix this in Google. I erased by mistake the directory '#rocksdb', and now I have all the *.frm. I don't care about the data, but I want to recover the create table definitions from the *.frm. Is there a way? I plain Mysql there was a utility but it depends on the full server been installed. Does MariaDB offers any way to recreate the table structure from a *.from (Rocksdb)
philip_38, we don't have such a tool, although it should be possible to write one rather easily.
What you can do now is to select from information_schema tables. Depending on what columns you select, it will or won't work with frm files only. For example, these two queries will work:
select * from information_schema.columns where table_name='t2';
But two remaining columns from information_schema.statistics will not work.
I believe these two queries as above should be enough to reconstruct all columns and indexes, though.
Sergei Golubchik
added a comment - philip_38 , we don't have such a tool, although it should be possible to write one rather easily.
What you can do now is to select from information_schema tables. Depending on what columns you select, it will or won't work with frm files only. For example, these two queries will work:
select * from information_schema.columns where table_name= 't2' ;
select table_catalog, table_schema, table_name, non_unique, index_schema, index_name, seq_in_index, column_name, collation, sub_part, packed, nullable, comment, index_comment, ignored from information_schema. statistics where table_name= 't2' ;
But two remaining columns from information_schema.statistics will not work.
I believe these two queries as above should be enough to reconstruct all columns and indexes, though.
People
Sergei Golubchik
Philip orleans
Votes:
0Vote for this issue
Watchers:
5Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1712.5999994277954,"ttfb":757.1999998092651,"pageVisibility":"visible","entityId":82928,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"682b619d-4700-4e8a-8c7d-a9c3671e3a6b","navigationType":0,"readyForUser":1796.0999994277954,"redirectCount":0,"resourceLoadedEnd":2499.3999996185303,"resourceLoadedStart":765.1999998092651,"resourceTiming":[{"duration":206.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":765.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":765.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":971.5,"responseStart":0,"secureConnectionStart":0},{"duration":206.29999923706055,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":765.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":765.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":971.7999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":301.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":765.6999998092651,"connectEnd":765.6999998092651,"connectStart":765.6999998092651,"domainLookupEnd":765.6999998092651,"domainLookupStart":765.6999998092651,"fetchStart":765.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":765.6999998092651,"responseEnd":1066.7999992370605,"responseStart":1066.7999992370605,"secureConnectionStart":765.6999998092651},{"duration":410,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":766.1999998092651,"connectEnd":766.1999998092651,"connectStart":766.1999998092651,"domainLookupEnd":766.1999998092651,"domainLookupStart":766.1999998092651,"fetchStart":766.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":766.1999998092651,"responseEnd":1176.1999998092651,"responseStart":1176.1999998092651,"secureConnectionStart":766.1999998092651},{"duration":413,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":766.5,"connectEnd":766.5,"connectStart":766.5,"domainLookupEnd":766.5,"domainLookupStart":766.5,"fetchStart":766.5,"redirectEnd":0,"redirectStart":0,"requestStart":766.5,"responseEnd":1179.5,"responseStart":1179.5,"secureConnectionStart":766.5},{"duration":413.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":766.5999994277954,"connectEnd":766.5999994277954,"connectStart":766.5999994277954,"domainLookupEnd":766.5999994277954,"domainLookupStart":766.5999994277954,"fetchStart":766.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":766.5999994277954,"responseEnd":1180.1999998092651,"responseStart":1180.1999998092651,"secureConnectionStart":766.5999994277954},{"duration":414,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":766.6999998092651,"connectEnd":766.6999998092651,"connectStart":766.6999998092651,"domainLookupEnd":766.6999998092651,"domainLookupStart":766.6999998092651,"fetchStart":766.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":766.6999998092651,"responseEnd":1180.6999998092651,"responseStart":1180.6999998092651,"secureConnectionStart":766.6999998092651},{"duration":462.1000003814697,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":766.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":766.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1229,"responseStart":0,"secureConnectionStart":0},{"duration":414.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":767,"connectEnd":767,"connectStart":767,"domainLookupEnd":767,"domainLookupStart":767,"fetchStart":767,"redirectEnd":0,"redirectStart":0,"requestStart":767,"responseEnd":1181.2999992370605,"responseStart":1181.2999992370605,"secureConnectionStart":767},{"duration":462,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":767.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":767.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1229.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":416.70000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":767.2999992370605,"connectEnd":767.2999992370605,"connectStart":767.2999992370605,"domainLookupEnd":767.2999992370605,"domainLookupStart":767.2999992370605,"fetchStart":767.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":767.2999992370605,"responseEnd":1184,"responseStart":1184,"secureConnectionStart":767.2999992370605},{"duration":1559.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":772,"connectEnd":772,"connectStart":772,"domainLookupEnd":772,"domainLookupStart":772,"fetchStart":772,"redirectEnd":0,"redirectStart":0,"requestStart":772,"responseEnd":2331.3999996185303,"responseStart":2331.3999996185303,"secureConnectionStart":772},{"duration":1722,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":777.3999996185303,"connectEnd":777.3999996185303,"connectStart":777.3999996185303,"domainLookupEnd":777.3999996185303,"domainLookupStart":777.3999996185303,"fetchStart":777.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":777.3999996185303,"responseEnd":2499.3999996185303,"responseStart":2499.3999996185303,"secureConnectionStart":777.3999996185303},{"duration":1083.3000001907349,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1248.7999992370605,"connectEnd":1248.7999992370605,"connectStart":1248.7999992370605,"domainLookupEnd":1248.7999992370605,"domainLookupStart":1248.7999992370605,"fetchStart":1248.7999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":1248.7999992370605,"responseEnd":2332.0999994277954,"responseStart":2332.0999994277954,"secureConnectionStart":1248.7999992370605},{"duration":879.0999994277954,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1705.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1705.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2584.7999992370605,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":572,"responseStart":757,"responseEnd":777,"domLoading":761,"domInteractive":2622,"domContentLoadedEventStart":2622,"domContentLoadedEventEnd":2715,"domComplete":3152,"loadEventStart":3152,"loadEventEnd":3153,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2503.3999996185303},{"name":"bigPipe.sidebar-id.end","time":2504.2999992370605},{"name":"bigPipe.activity-panel-pipe-id.start","time":2504.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":2508.3999996185303},{"name":"activityTabFullyLoaded","time":2742.8999996185303}],"measures":[],"correlationId":"7c1544409a09a4","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":126,"dbReadsTimeInMs":18,"dbConnsTimeInMs":28,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the dump.
While it doesn't match the story to the teeth, I think I've eventually managed to figure out most of what had happened.
You must have had this database from around 10.1 or so.
Some time then, in order to get rid of InnoDB, you altered a few system tables which had InnoDB for an engine. Importantly, you changed innodb_table_stats and innodb_index_stats tables to MyISAM.
In 10.2+, the tables' structures were modified, particularly one of columns was enlarged. For innodb_index_stats this column is a part of an index, and the new column length makes the index too long for MyISAM (it is still fine with InnoDB).
mysql_upgrade script takes into account the possibility that InnoDB doesn't exist in the system, and doesn't attempt to touch its tables then, but it cannot guess that tables which belong to InnoDB by nature can have some other engine, so this error is not anticipated.
At least by doing it this way (altering the tables to MyISAM on 10.1 and then running upgrade on any higher version), I get the same error. The line numbers differ depending on the version, with 10.4 it matches yours exactly.
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1071 (42000) at line 437: Specified key was too long; max key length is 1000 bytes
FATAL ERROR: Upgrade failed
The failing statement is this:
What I couldn't quite figure out is where mysql.innodb_index_stats table disappeared after the upgrade, as it isn't present in your dump. Another table, mysql.innodb_table_stats, is there, and it is indeed MyISAM, but innodb_index_stats, which causes the failure, isn't there at all. Maybe it disappeared during further failed attempts to upgrade, or maybe you dropped it later.
You should have seen this error in 10.2 already, but maybe you ran upgrade without InnoDB. And 10.3 apparently skipped mysql_upgrade, otherwise you wouldn't have the error about mysql.proc in the log on 10.4.
So mainly it's an issue of the customized configuration. But I want to keep this report open, because after dealing with it, there are at least two complaints I fully agree with.
First, mysql_upgrade needs to provide a much better message. I don't yet know how exactly it can be achieved, as it just runs the SQL script, but it's badly needed. Printing the failing statement would be very helpful, while the line number isn't at all, it doesn't match line numbers in either mysql_fix_privilege_tables.sql or scripts/mysql_system_tables_fix.sql or scripts/mysql_fix_privilege_tables_sql.c.
Secondly, while mysql_upgrade claims that it encountered a FATAL error and aborted, in fact it does a lot of stuff afterwards. That's why the general log is useless too, the failed statement is nowhere near the end of it.
So, I'm going to modify the summary of this bug to indicate that it's about mysql_upgrade failing without proper diagnostics.
For resolving the original issue, once you decide to customize you system tables, you have to stay consistent about it. In this case, inconsistency was in changing InnoDB-specific tables to MyISAM rather than dropping them, and then switching InnoDB back on. I think it's rather fortunate that it complained so early, I don't even know how InnoDB would behave when its system tables turned out to be outside the engine.