1# 2# Bug#30248138 - adding a function once mysql.func is converted to myisam 3# leads to crash 4# 5CALL mtr.add_suppression("Column count of"); 6CALL mtr.add_suppression("Incorrect definition of table"); 7CALL mtr.add_suppression("Cannot load from"); 8CALL mtr.add_suppression("Storage engine 'MyISAM' does not"); 9#----------------------------------------------------------------------- 10# Test cases to verify system table's behavior with storage engines 11# InnoDB and MyISAM. 12#----------------------------------------------------------------------- 13CREATE TABLE system_tables (ID INT PRIMARY KEY AUTO_INCREMENT, 14table_name VARCHAR(100)); 15INSERT INTO system_tables(table_name) 16SELECT concat(table_schema, ".", table_name) 17FROM INFORMATION_SCHEMA.tables WHERE table_schema = 18'mysql' AND table_name NOT IN('general_log', 'slow_log', 19'ndb_binlog_index'); 20#----------------------------------------------------------------------- 21# Test case to verify altering system table's engine to MyISAM. Changing 22# system table's engine to MyISAM is not allowed. 23#----------------------------------------------------------------------- 24CREATE PROCEDURE test_system_table_alter_engine() 25BEGIN 26DECLARE n INT DEFAULT 0; 27DECLARE i INT DEFAULT 1; 28-- ER_UNSUPPORTED_ENGINE(1726) is reported for all the system engines except for 29-- innodb_index_stats and innodb_table_stats. ER_TOO_LONG_KEY(1071) is reported for 30-- innodb_index_stats and ER_NOT_ALLOWED_COMMAND(1148) is reported for innodb_table_stats 31-- for now. 32DECLARE CONTINUE HANDLER FOR 1726, 1071, 1148 33BEGIN 34GET DIAGNOSTICS CONDITION 1 @message = MESSAGE_TEXT; 35SELECT @message AS ERROR; 36END; 37SELECT count(*) FROM system_tables INTO n; 38WHILE i <= n DO 39SELECT table_name FROM system_tables WHERE id = i INTO @table_name; 40SELECT @table_name; 41SET @sql_text = concat("ALTER TABLE ", @table_name, " ENGINE = MyISAM"); 42PREPARE stmt FROM @sql_text; 43EXECUTE stmt; 44DEALLOCATE PREPARE stmt; 45SET i = i + 1; 46END WHILE; 47END$ 48CALL test_system_table_alter_engine(); 49@table_name 50mysql.columns_priv 51ERROR 52Storage engine 'MyISAM' does not support system tables. [mysql.columns_priv] 53@table_name 54mysql.component 55ERROR 56Storage engine 'MyISAM' does not support system tables. [mysql.component] 57@table_name 58mysql.db 59ERROR 60Storage engine 'MyISAM' does not support system tables. [mysql.db] 61@table_name 62mysql.default_roles 63ERROR 64Storage engine 'MyISAM' does not support system tables. [mysql.default_roles] 65@table_name 66mysql.engine_cost 67ERROR 68Storage engine 'MyISAM' does not support system tables. [mysql.engine_cost] 69@table_name 70mysql.func 71ERROR 72Storage engine 'MyISAM' does not support system tables. [mysql.func] 73@table_name 74mysql.global_grants 75ERROR 76Storage engine 'MyISAM' does not support system tables. [mysql.global_grants] 77@table_name 78mysql.gtid_executed 79ERROR 80Storage engine 'MyISAM' does not support system tables. [mysql.gtid_executed] 81@table_name 82mysql.help_category 83ERROR 84Storage engine 'MyISAM' does not support system tables. [mysql.help_category] 85@table_name 86mysql.help_keyword 87ERROR 88Storage engine 'MyISAM' does not support system tables. [mysql.help_keyword] 89@table_name 90mysql.help_relation 91ERROR 92Storage engine 'MyISAM' does not support system tables. [mysql.help_relation] 93@table_name 94mysql.help_topic 95ERROR 96Storage engine 'MyISAM' does not support system tables. [mysql.help_topic] 97@table_name 98mysql.innodb_index_stats 99ERROR 100Specified key was too long; max key length is 1000 bytes 101@table_name 102mysql.innodb_table_stats 103ERROR 104The used command is not allowed with this MySQL version 105@table_name 106mysql.password_history 107ERROR 108Storage engine 'MyISAM' does not support system tables. [mysql.password_history] 109@table_name 110mysql.plugin 111ERROR 112Storage engine 'MyISAM' does not support system tables. [mysql.plugin] 113@table_name 114mysql.procs_priv 115ERROR 116Storage engine 'MyISAM' does not support system tables. [mysql.procs_priv] 117@table_name 118mysql.proxies_priv 119ERROR 120Storage engine 'MyISAM' does not support system tables. [mysql.proxies_priv] 121@table_name 122mysql.role_edges 123ERROR 124Storage engine 'MyISAM' does not support system tables. [mysql.role_edges] 125@table_name 126mysql.server_cost 127ERROR 128Storage engine 'MyISAM' does not support system tables. [mysql.server_cost] 129@table_name 130mysql.servers 131ERROR 132Storage engine 'MyISAM' does not support system tables. [mysql.servers] 133@table_name 134mysql.slave_master_info 135ERROR 136Storage engine 'MyISAM' does not support system tables. [mysql.slave_master_info] 137@table_name 138mysql.slave_relay_log_info 139ERROR 140Storage engine 'MyISAM' does not support system tables. [mysql.slave_relay_log_info] 141@table_name 142mysql.slave_worker_info 143ERROR 144Storage engine 'MyISAM' does not support system tables. [mysql.slave_worker_info] 145@table_name 146mysql.tables_priv 147ERROR 148Storage engine 'MyISAM' does not support system tables. [mysql.tables_priv] 149@table_name 150mysql.time_zone 151ERROR 152Storage engine 'MyISAM' does not support system tables. [mysql.time_zone] 153@table_name 154mysql.time_zone_leap_second 155ERROR 156Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_leap_second] 157@table_name 158mysql.time_zone_name 159ERROR 160Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_name] 161@table_name 162mysql.time_zone_transition 163ERROR 164Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_transition] 165@table_name 166mysql.time_zone_transition_type 167ERROR 168Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_transition_type] 169@table_name 170mysql.user 171ERROR 172Storage engine 'MyISAM' does not support system tables. [mysql.user] 173DROP PROCEDURE test_system_table_alter_engine; 174#----------------------------------------------------------------------- 175# Test case to verify system table creation in MyISAM engine. Creating 176# system table in MyISAM is allowed to support logical upgrade. 177#----------------------------------------------------------------------- 178CREATE PROCEDURE execute_stmt(stmt VARCHAR(255)) 179BEGIN 180SET @error_no = 0; 181SET @sql_stmt = stmt; 182PREPARE stmt FROM @sql_stmt; 183EXECUTE stmt; 184GET DIAGNOSTICS CONDITION 1 @error_no = MYSQL_ERRNO, @error_message = MESSAGE_TEXT; 185IF @error_no > 0 THEN 186SELECT "Warning" AS SEVERITY, @error_no as ERRNO, @error_message as MESSAGE; 187END IF; 188DEALLOCATE PREPARE stmt; 189END$ 190CREATE PROCEDURE test_create_system_table() 191BEGIN 192DECLARE n INT DEFAULT 0; 193DECLARE i INT DEFAULT 1; 194-- Error ER_NO_SYSTEM_TABLE_ACCESS(3554) is reported for innodb_table_stats and 195-- innodb_index_stats. For other tables ER_UNSUPPORTED_ENGINE "warning" is reported. 196-- Warning is handled in the execute_stmt(). 197DECLARE CONTINUE HANDLER FOR 3554 198BEGIN 199GET DIAGNOSTICS CONDITION 1 @error = MYSQL_ERRNO, @error_message = MESSAGE_TEXT; 200END; 201SELECT count(*) FROM system_tables INTO n; 202WHILE i <= n DO 203SET @error = 0; 204SELECT table_name FROM system_tables WHERE id = i INTO @table_name; 205SET @sql_text = concat('RENAME TABLE ', @table_name, ' TO mysql.backup_table'); 206CALL execute_stmt(@sql_text); 207SET @sql_text = concat('CREATE TABLE ', @table_name, ' ENGINE=InnoDB AS SELECT * FROM mysql.backup_table'); 208CALL execute_stmt(@sql_text); 209SET @sql_text = concat('DROP TABLE ', @table_name); 210CALL execute_stmt(@sql_text); 211SET @sql_text = concat('CREATE TABLE ', @table_name, ' ENGINE=MyISAM AS SELECT * FROM mysql.backup_table'); 212CALL execute_stmt(@sql_text); 213IF @error > 0 THEN 214SELECT "ERROR" AS SEVERITY, @error AS ERRNO, @error_message AS MESSAGE; 215ELSE 216SET @sql_text = concat('DROP TABLE ', @table_name); 217CALL execute_stmt(@sql_text); 218END IF; 219SET @sql_text = concat('RENAME TABLE mysql.backup_table TO ', @table_name); 220CALL execute_stmt(@sql_text); 221SET i = i + 1; 222END WHILE; 223END$ 224CALL test_create_system_table(); 225SEVERITY ERRNO MESSAGE 226Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.columns_priv] 227SEVERITY ERRNO MESSAGE 228Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.component] 229SEVERITY ERRNO MESSAGE 230Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.db] 231SEVERITY ERRNO MESSAGE 232Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.default_roles] 233SEVERITY ERRNO MESSAGE 234Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.engine_cost] 235SEVERITY ERRNO MESSAGE 236Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.func] 237SEVERITY ERRNO MESSAGE 238Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.global_grants] 239SEVERITY ERRNO MESSAGE 240Warning 3129 Please do not modify the gtid_executed table. This is a mysql internal system table to store GTIDs for committed transactions. Modifying it can lead to an inconsistent GTID state. 241SEVERITY ERRNO MESSAGE 242Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.gtid_executed] 243SEVERITY ERRNO MESSAGE 244Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.help_category] 245SEVERITY ERRNO MESSAGE 246Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.help_keyword] 247SEVERITY ERRNO MESSAGE 248Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.help_relation] 249SEVERITY ERRNO MESSAGE 250Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.help_topic] 251SEVERITY ERRNO MESSAGE 252ERROR 3554 Access to system table 'mysql.innodb_index_stats' is rejected. 253SEVERITY ERRNO MESSAGE 254ERROR 3554 Access to system table 'mysql.innodb_table_stats' is rejected. 255SEVERITY ERRNO MESSAGE 256Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.password_history] 257SEVERITY ERRNO MESSAGE 258Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.plugin] 259SEVERITY ERRNO MESSAGE 260Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.procs_priv] 261SEVERITY ERRNO MESSAGE 262Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.proxies_priv] 263SEVERITY ERRNO MESSAGE 264Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.role_edges] 265SEVERITY ERRNO MESSAGE 266Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.server_cost] 267SEVERITY ERRNO MESSAGE 268Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.servers] 269SEVERITY ERRNO MESSAGE 270Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.slave_master_info] 271SEVERITY ERRNO MESSAGE 272Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.slave_relay_log_info] 273SEVERITY ERRNO MESSAGE 274Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.slave_worker_info] 275SEVERITY ERRNO MESSAGE 276Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.tables_priv] 277SEVERITY ERRNO MESSAGE 278Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.time_zone] 279SEVERITY ERRNO MESSAGE 280Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_leap_second] 281SEVERITY ERRNO MESSAGE 282Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_name] 283SEVERITY ERRNO MESSAGE 284Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_transition] 285SEVERITY ERRNO MESSAGE 286Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.time_zone_transition_type] 287SEVERITY ERRNO MESSAGE 288Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.user] 289DROP PROCEDURE test_create_system_table; 290DROP PROCEDURE execute_stmt; 291DROP TABLE system_tables; 292#----------------------------------------------------------------------- 293# Test case to verify forbidden operations when 294# 295# 1 System table is created in the MyISAM engine. 296# 2 System table is in InnoDB engine but table definition is changed. 297#----------------------------------------------------------------------- 298CREATE USER 'user1'@'%'; 299CREATE TABLE t1 (f1 INT); 300CREATE FUNCTION sequence RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; 301RENAME TABLE mysql.func TO mysql.func_bkp; 302CREATE TABLE mysql.func ENGINE='MyISAM' AS SELECT * FROM mysql.func_bkp; 303Warnings: 304Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.func] 305# Without the fix, following statement results in the assert 306# condition failure. 307CREATE FUNCTION udf_func RETURNS STRING SONAME 'udf_func.so'; 308ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.func] 309DROP FUNCTION sequence; 310ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.func] 311ALTER TABLE mysql.func ENGINE='InnoDB', 312DROP COLUMN ret; 313CREATE FUNCTION udf_func RETURNS STRING SONAME 'udf_func.so'; 314ERROR HY000: Column count of mysql.func is wrong. Expected 4, found 3. The table is probably corrupted 315DROP FUNCTION sequence; 316ERROR HY000: Column count of mysql.func is wrong. Expected 4, found 3. The table is probably corrupted 317DROP TABLE mysql.func; 318RENAME TABLE mysql.func_bkp TO mysql.func; 319DROP FUNCTION sequence; 320RENAME TABLE mysql.plugin TO mysql.plugin_bkp; 321CREATE TABLE mysql.plugin ENGINE='MyISAM' AS SELECT * FROM mysql.plugin_bkp; 322Warnings: 323Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.plugin] 324INSTALL PLUGIN my_plug soname 'some_plugin.so'; 325ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.plugin] 326UNINSTALL PLUGIN my_plug; 327ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.plugin] 328ALTER TABLE mysql.plugin ENGINE=InnoDB, 329MODIFY dl CHAR(64); 330INSTALL PLUGIN my_plug soname 'some_plugin.so'; 331ERROR HY000: Cannot load from mysql.plugin. The table is probably corrupted 332UNINSTALL PLUGIN my_plug; 333ERROR HY000: Cannot load from mysql.plugin. The table is probably corrupted 334DROP TABLE mysql.plugin; 335RENAME TABLE mysql.plugin_bkp TO mysql.plugin; 336RENAME TABLE mysql.servers TO mysql.servers_bkp; 337CREATE TABLE mysql.servers ENGINE='MyISAM' AS SELECT * FROM mysql.servers_bkp; 338Warnings: 339Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.servers] 340CREATE SERVER fedlnk FOREIGN DATA WRAPPER mysql OPTIONS 341(USER 'fed_user', HOST 'remote_host', PORT 9306, DATABASE 'federated'); 342ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.servers] 343DROP SERVER fedlnk; 344ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.servers] 345ALTER SERVER fedlnk OPTIONS (USER 'sally'); 346ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.servers] 347ALTER TABLE mysql.servers ENGINE='InnoDB', 348MODIFY WRAPPER varchar(128); 349CREATE SERVER fedlnk FOREIGN DATA WRAPPER mysql OPTIONS 350(USER 'fed_user', HOST 'remote_host', PORT 9306, DATABASE 'federated'); 351ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted 352DROP SERVER fedlnk; 353ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted 354ALTER SERVER fedlnk OPTIONS (USER 'sally'); 355ERROR HY000: Cannot load from mysql.servers. The table is probably corrupted 356DROP TABLE mysql.servers; 357RENAME TABLE mysql.servers_bkp TO mysql.servers; 358RENAME TABLE mysql.user TO mysql.user_bkp; 359CREATE TABLE mysql.user ENGINE='MyISAM' AS SELECT * FROM mysql.user_bkp; 360Warnings: 361Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.user] 362CREATE USER 'user2'@'%'; 363ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 364DROP USER 'user1'@'%'; 365ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 366ALTER USER 'user1'@'%' PASSWORD EXPIRE; 367ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 368GRANT SELECT ON t1 TO 'user1'@'%'; 369ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 370REVOKE SELECT ON t1 FROM 'user1'@'%'; 371ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 372REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user1'@'%'; 373ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 374SET PASSWORD FOR 'user1'@'%' = '123'; 375ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 376RENAME USER 'user1'@'%' TO 'user1'@'%'; 377ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.user] 378ALTER TABLE mysql.user ENGINE='InnoDB', 379DROP COLUMN max_updates; 380CREATE USER 'user2'@'%'; 381ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 382DROP USER 'user1'@'%'; 383ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 384ALTER USER 'user1'@'%' PASSWORD EXPIRE; 385ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 386GRANT SELECT ON t1 TO 'user1'@'%'; 387ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 388REVOKE SELECT ON t1 FROM 'user1'@'%'; 389ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 390REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user1'@'%'; 391ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 392SET PASSWORD FOR 'user1'@'%' = '123'; 393ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 394RENAME USER 'user1'@'%' TO 'user1'@'%'; 395ERROR HY000: Column count of mysql.user is wrong. Expected 51, found 50. The table is probably corrupted 396DROP TABLE mysql.user; 397RENAME TABLE mysql.user_bkp TO mysql.user; 398RENAME TABLE mysql.columns_priv TO mysql.columns_priv_bkp; 399CREATE TABLE mysql.columns_priv ENGINE='MyISAM' AS SELECT * FROM mysql.columns_priv_bkp; 400Warnings: 401Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.columns_priv] 402GRANT SELECT(f1) ON t1 TO 'user1'@'%'; 403ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.columns_priv] 404REVOKE SELECT ON t1.f1 FROM 'user1'@'%'; 405ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.columns_priv] 406ALTER TABLE mysql.columns_priv ENGINE='InnoDB', 407DROP COLUMN Timestamp; 408GRANT SELECT(f1) ON t1 TO 'user1'@'%'; 409ERROR HY000: Column count of mysql.columns_priv is wrong. Expected 7, found 6. The table is probably corrupted 410REVOKE SELECT ON t1.f1 FROM 'user1'@'%'; 411ERROR HY000: Column count of mysql.columns_priv is wrong. Expected 7, found 6. The table is probably corrupted 412DROP TABLE mysql.columns_priv; 413RENAME TABLE mysql.columns_priv_bkp TO mysql.columns_priv; 414RENAME TABLE mysql.tables_priv TO mysql.tables_priv_bkp; 415CREATE TABLE mysql.tables_priv ENGINE='MyISAM' AS SELECT * FROM mysql.tables_priv_bkp; 416Warnings: 417Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.tables_priv] 418GRANT SELECT ON t1 TO 'user1'@'%'; 419ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.tables_priv] 420REVOKE SELECT ON t1 FROM 'user1'@'%'; 421ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.tables_priv] 422ALTER TABLE mysql.tables_priv ENGINE='InnoDB', 423DROP COLUMN Timestamp; 424GRANT SELECT ON t1 TO 'user1'@'%'; 425ERROR HY000: Column count of mysql.tables_priv is wrong. Expected 8, found 7. The table is probably corrupted 426REVOKE SELECT ON t1 FROM 'user1'@'%'; 427ERROR HY000: Column count of mysql.tables_priv is wrong. Expected 8, found 7. The table is probably corrupted 428DROP TABLE mysql.tables_priv; 429RENAME TABLE mysql.tables_priv_bkp TO mysql.tables_priv; 430CREATE FUNCTION f1() RETURNS INT return 1; 431RENAME TABLE mysql.procs_priv TO mysql.procs_priv_bkp; 432CREATE TABLE mysql.procs_priv ENGINE='MyISAM' AS SELECT * FROM mysql.procs_priv_bkp; 433Warnings: 434Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.procs_priv] 435GRANT EXECUTE ON FUNCTION f1 TO 'user1'@'%'; 436ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.procs_priv] 437REVOKE EXECUTE ON FUNCTION f1 FROM 'user1'@'%'; 438ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.procs_priv] 439ALTER TABLE mysql.procs_priv ENGINE='InnoDB', 440DROP COLUMN timestamp; 441GRANT EXECUTE ON FUNCTION f1 TO 'user1'@'%'; 442ERROR HY000: Column count of mysql.procs_priv is wrong. Expected 8, found 7. The table is probably corrupted 443REVOKE EXECUTE ON FUNCTION f1 FROM 'user1'@'%'; 444ERROR HY000: Column count of mysql.procs_priv is wrong. Expected 8, found 7. The table is probably corrupted 445DROP TABLE mysql.procs_priv; 446RENAME TABLE mysql.procs_priv_bkp TO mysql.procs_priv; 447RENAME TABLE mysql.proxies_priv TO mysql.proxies_priv_bkp; 448CREATE TABLE mysql.proxies_priv ENGINE='MyISAM' AS SELECT * FROM mysql.proxies_priv_bkp; 449Warnings: 450Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.proxies_priv] 451GRANT PROXY ON 'user1'@'%' TO 'user2'@'%'; 452ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.proxies_priv] 453REVOKE PROXY ON 'user1'@'%' FROM 'user2'@'%'; 454ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.proxies_priv] 455ALTER TABLE mysql.proxies_priv ENGINE='InnoDB', 456DROP COLUMN timestamp; 457GRANT PROXY ON 'user1'@'%' TO 'user2'@'%'; 458ERROR HY000: Column count of mysql.proxies_priv is wrong. Expected 7, found 6. The table is probably corrupted 459REVOKE PROXY ON 'user1'@'%' FROM 'user2'@'%'; 460ERROR HY000: Column count of mysql.proxies_priv is wrong. Expected 7, found 6. The table is probably corrupted 461DROP TABLE mysql.proxies_priv; 462RENAME TABLE mysql.proxies_priv_bkp TO mysql.proxies_priv; 463RENAME TABLE mysql.component TO mysql.component_bkp; 464CREATE TABLE mysql.component ENGINE='MyISAM' AS SELECT * FROM mysql.component_bkp; 465Warnings: 466Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.component] 467INSTALL COMPONENT "file://component_log_sink_json"; 468ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.component] 469UNINSTALL COMPONENT "file://component_log_sink_json"; 470ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.component] 471ALTER TABLE mysql.component ENGINE='InnoDB', 472DROP COLUMN component_urn; 473INSTALL COMPONENT "file://component_log_sink_json"; 474ERROR HY000: The mysql.component table is missing or has an incorrect definition. 475UNINSTALL COMPONENT "file://component_log_sink_json"; 476ERROR HY000: The mysql.component table is missing or has an incorrect definition. 477DROP TABLE mysql.component; 478RENAME TABLE mysql.component_bkp TO mysql.component; 479RENAME TABLE mysql.db TO mysql.db_bkp; 480CREATE TABLE mysql.db ENGINE='MyISAM' AS SELECT * FROM mysql.db_bkp; 481Warnings: 482Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.db] 483GRANT ALL ON db.* TO 'user1'@'%'; 484ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.db] 485ALTER TABLE mysql.db ENGINE='InnoDB', 486DROP COLUMN Select_priv; 487GRANT ALL ON db.* TO 'user1'@'%'; 488ERROR HY000: Column count of mysql.db is wrong. Expected 22, found 21. The table is probably corrupted 489DROP TABLE mysql.db; 490RENAME TABLE mysql.db_bkp TO mysql.db; 491RENAME TABLE mysql.default_roles TO mysql.default_roles_bkp; 492CREATE TABLE mysql.default_roles ENGINE='MyISAM' AS SELECT * FROM mysql.default_roles_bkp; 493Warnings: 494Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.default_roles] 495SET DEFAULT ROLE ALL TO 'user1'@'%'; 496ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.default_roles] 497ALTER TABLE mysql.default_roles ENGINE='InnoDB', 498DROP COLUMN DEFAULT_ROLE_USER; 499SET DEFAULT ROLE ALL TO 'user1'@'%'; 500ERROR HY000: Column count of mysql.default_roles is wrong. Expected 4, found 3. The table is probably corrupted 501DROP TABLE mysql.default_roles; 502RENAME TABLE mysql.default_roles_bkp TO mysql.default_roles; 503RENAME TABLE mysql.global_grants TO mysql.global_grants_bkp; 504CREATE TABLE mysql.global_grants ENGINE='MyISAM' AS SELECT * FROM mysql.global_grants_bkp; 505Warnings: 506Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.global_grants] 507GRANT PROCESS ON *.* TO 'user1'@'%'; 508ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.global_grants] 509REVOKE PROCESS ON *.* FROM 'user1'@'%'; 510ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.global_grants] 511ALTER TABLE mysql.global_grants ENGINE='InnoDB', 512DROP COLUMN WITH_GRANT_OPTION; 513GRANT PROCESS ON *.* TO 'user1'@'%'; 514ERROR HY000: Column count of mysql.global_grants is wrong. Expected 4, found 3. The table is probably corrupted 515REVOKE PROCESS ON *.* FROM 'user1'@'%'; 516ERROR HY000: Column count of mysql.global_grants is wrong. Expected 4, found 3. The table is probably corrupted 517DROP TABLE mysql.global_grants; 518RENAME TABLE mysql.global_grants_bkp TO mysql.global_grants; 519RENAME TABLE mysql.role_edges TO mysql.role_edges_bkp; 520CREATE TABLE mysql.role_edges ENGINE='MyISAM' AS SELECT * FROM mysql.role_edges_bkp; 521Warnings: 522Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.role_edges] 523SET DEFAULT ROLE ALL TO 'user1'@'%'; 524ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.role_edges] 525ALTER TABLE mysql.role_edges ENGINE='InnoDB', 526DROP COLUMN TO_USER; 527SET DEFAULT ROLE ALL TO 'user1'@'%'; 528ERROR HY000: Column count of mysql.role_edges is wrong. Expected 5, found 4. The table is probably corrupted 529DROP TABLE mysql.role_edges; 530RENAME TABLE mysql.role_edges_bkp TO mysql.role_edges; 531SET GLOBAL default_password_lifetime = 2; 532RENAME TABLE mysql.password_history TO mysql.password_history_bkp; 533CREATE TABLE mysql.password_history ENGINE='MyISAM' AS SELECT * FROM mysql.password_history_bkp; 534Warnings: 535Warning 1726 Storage engine 'MyISAM' does not support system tables. [mysql.password_history] 536ALTER USER 'user1'@'%' IDENTIFIED BY 'password'; 537ERROR HY000: Storage engine 'MyISAM' does not support system tables. [mysql.password_history] 538ALTER TABLE mysql.password_history ENGINE='InnoDB', 539DROP COLUMN Password_timestamp; 540ALTER USER 'user1'@'%' IDENTIFIED BY 'password'; 541ERROR HY000: Column count of mysql.password_history is wrong. Expected 4, found 3. The table is probably corrupted 542DROP TABLE mysql.password_history; 543RENAME TABLE mysql.password_history_bkp TO mysql.password_history; 544SET GLOBAL default_password_lifetime = DEFAULT; 545DROP TABLE t1; 546DROP FUNCTION f1; 547DROP USER 'user1'@'%'; 548#----------------------------------------------------------------------- 549# Test case to verify logical upgrade from 5.7 dump file. 550#----------------------------------------------------------------------- 551SELECT table_schema, table_name, engine FROM information_schema.tables 552WHERE table_schema='mysql' 553 AND engine='MyISAM'; 554TABLE_SCHEMA TABLE_NAME ENGINE 555mysql columns_priv MyISAM 556mysql db MyISAM 557mysql event MyISAM 558mysql func MyISAM 559mysql ndb_binlog_index MyISAM 560mysql proc MyISAM 561mysql procs_priv MyISAM 562mysql proxies_priv MyISAM 563mysql tables_priv MyISAM 564mysql user MyISAM 565# restart:--upgrade=FORCE 566SELECT table_schema, table_name, engine FROM information_schema.tables 567WHERE table_schema='mysql' 568 AND engine='MyISAM'; 569TABLE_SCHEMA TABLE_NAME ENGINE 570mysql event MyISAM 571mysql proc MyISAM 572