MDEV-6984 Can't migrate from MySQL 5.6.21 to MariaDB 10
in mysql_upgrade: do FLUSH PRIVILEGES at the end, not together with mysql_fix_privilege_tables mysql-test/t/mysql_upgrade-6984.opt: use a dummy second option to force server restart after the test
This commit is contained in:
parent
51d7e80355
commit
df7b27f1fe
@ -762,7 +762,7 @@ static int run_mysqlcheck_upgrade(const char *arg1, const char *arg2)
|
|||||||
|
|
||||||
static int run_mysqlcheck_fixnames(void)
|
static int run_mysqlcheck_fixnames(void)
|
||||||
{
|
{
|
||||||
verbose("Phase 3/4: Fixing table and database names");
|
verbose("Phase 3/5: Fixing table and database names");
|
||||||
print_conn_args("mysqlcheck");
|
print_conn_args("mysqlcheck");
|
||||||
return run_tool(mysqlcheck_path,
|
return run_tool(mysqlcheck_path,
|
||||||
NULL, /* Send output from mysqlcheck directly to screen */
|
NULL, /* Send output from mysqlcheck directly to screen */
|
||||||
@ -860,6 +860,7 @@ static int run_sql_fix_privilege_tables(void)
|
|||||||
query_ptr++
|
query_ptr++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (strcasecmp(*query_ptr, "flush privileges;\n"))
|
||||||
dynstr_append(&ds_script, *query_ptr);
|
dynstr_append(&ds_script, *query_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1021,19 +1022,23 @@ int main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
|
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
|
||||||
*/
|
*/
|
||||||
verbose("Phase 1/4: Checking mysql database");
|
verbose("Phase 1/5: Checking mysql database");
|
||||||
if (run_mysqlcheck_upgrade("--databases", "mysql"))
|
if (run_mysqlcheck_upgrade("--databases", "mysql"))
|
||||||
die("Upgrade failed" );
|
die("Upgrade failed" );
|
||||||
verbose("Phase 2/4: Running 'mysql_fix_privilege_tables'...");
|
verbose("Phase 2/5: Running 'mysql_fix_privilege_tables'...");
|
||||||
if (run_sql_fix_privilege_tables())
|
if (run_sql_fix_privilege_tables())
|
||||||
die("Upgrade failed" );
|
die("Upgrade failed" );
|
||||||
|
|
||||||
if (!opt_systables_only &&
|
if (!opt_systables_only &&
|
||||||
(run_mysqlcheck_fixnames() ||
|
(run_mysqlcheck_fixnames() ||
|
||||||
verbose("Phase 4/4: Checking and upgrading tables") ||
|
verbose("Phase 4/5: Checking and upgrading tables") ||
|
||||||
run_mysqlcheck_upgrade("--all-databases","--skip-database=mysql")))
|
run_mysqlcheck_upgrade("--all-databases","--skip-database=mysql")))
|
||||||
die("Upgrade failed" );
|
die("Upgrade failed" );
|
||||||
|
|
||||||
|
verbose("Phase 5/5: Running 'FLUSH PRIVILEGES'...");
|
||||||
|
if (run_query("FLUSH PRIVILEGES", NULL, TRUE))
|
||||||
|
die("Upgrade failed" );
|
||||||
|
|
||||||
verbose("OK");
|
verbose("OK");
|
||||||
|
|
||||||
/* Create a file indicating upgrade has been performed */
|
/* Create a file indicating upgrade has been performed */
|
||||||
|
@ -227,7 +227,7 @@ DROP TABLE mysql050614_xxx_croatian_ci;
|
|||||||
# Checking mysql_upgrade
|
# Checking mysql_upgrade
|
||||||
#
|
#
|
||||||
# Running mysql_upgrade
|
# Running mysql_upgrade
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -258,9 +258,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -279,10 +279,11 @@ test.maria050313_ucs2_croatian_ci_def OK
|
|||||||
test.maria050313_utf8_croatian_ci OK
|
test.maria050313_utf8_croatian_ci OK
|
||||||
test.maria050533_xxx_croatian_ci OK
|
test.maria050533_xxx_croatian_ci OK
|
||||||
test.maria100004_xxx_croatian_ci OK
|
test.maria100004_xxx_croatian_ci OK
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
# Running mysql_upgrade for the second time
|
# Running mysql_upgrade for the second time
|
||||||
# This should report OK for all tables
|
# This should report OK for all tables
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -313,9 +314,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -328,6 +329,7 @@ test.maria050313_utf8_croatian_ci OK
|
|||||||
test.maria050533_xxx_croatian_ci OK
|
test.maria050533_xxx_croatian_ci OK
|
||||||
test.maria100004_xxx_croatian_ci OK
|
test.maria100004_xxx_croatian_ci OK
|
||||||
test.mysql050614_xxx_croatian_ci OK
|
test.mysql050614_xxx_croatian_ci OK
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
|
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
|
@ -11,7 +11,7 @@ Table Op Msg_type Msg_text
|
|||||||
test.bug49823 repair status OK
|
test.bug49823 repair status OK
|
||||||
RENAME TABLE general_log TO renamed_general_log;
|
RENAME TABLE general_log TO renamed_general_log;
|
||||||
RENAME TABLE test.bug49823 TO general_log;
|
RENAME TABLE test.bug49823 TO general_log;
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -43,9 +43,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -53,6 +53,7 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
DROP TABLE general_log;
|
DROP TABLE general_log;
|
||||||
RENAME TABLE renamed_general_log TO general_log;
|
RENAME TABLE renamed_general_log TO general_log;
|
||||||
|
58
mysql-test/r/mysql_upgrade-6984.result
Normal file
58
mysql-test/r/mysql_upgrade-6984.result
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
update mysql.user set password=password("foo") where user='root';
|
||||||
|
Phase 1/5: Checking mysql database
|
||||||
|
Processing databases
|
||||||
|
mysql
|
||||||
|
mysql.column_stats OK
|
||||||
|
mysql.columns_priv OK
|
||||||
|
mysql.db OK
|
||||||
|
mysql.event OK
|
||||||
|
mysql.func OK
|
||||||
|
mysql.gtid_slave_pos OK
|
||||||
|
mysql.help_category OK
|
||||||
|
mysql.help_keyword OK
|
||||||
|
mysql.help_relation OK
|
||||||
|
mysql.help_topic OK
|
||||||
|
mysql.host OK
|
||||||
|
mysql.index_stats OK
|
||||||
|
mysql.innodb_index_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
|
mysql.innodb_table_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
|
mysql.plugin OK
|
||||||
|
mysql.proc OK
|
||||||
|
mysql.procs_priv OK
|
||||||
|
mysql.proxies_priv OK
|
||||||
|
mysql.roles_mapping OK
|
||||||
|
mysql.servers OK
|
||||||
|
mysql.table_stats OK
|
||||||
|
mysql.tables_priv OK
|
||||||
|
mysql.time_zone OK
|
||||||
|
mysql.time_zone_leap_second OK
|
||||||
|
mysql.time_zone_name OK
|
||||||
|
mysql.time_zone_transition OK
|
||||||
|
mysql.time_zone_transition_type OK
|
||||||
|
mysql.user OK
|
||||||
|
|
||||||
|
Repairing tables
|
||||||
|
mysql.innodb_index_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
|
mysql.innodb_table_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
|
Phase 3/5: Fixing table and database names
|
||||||
|
Phase 4/5: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
|
performance_schema
|
||||||
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
|
OK
|
||||||
|
update mysql.user set password='' where user='root';
|
||||||
|
flush privileges;
|
@ -1,5 +1,5 @@
|
|||||||
Run mysql_upgrade once
|
Run mysql_upgrade once
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -30,9 +30,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -40,11 +40,12 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
Run it again - should say already completed
|
Run it again - should say already completed
|
||||||
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
|
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
|
||||||
Force should run it regardless of wether it's been run before
|
Force should run it regardless of wether it's been run before
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -75,9 +76,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -85,11 +86,12 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
||||||
GRANT ALL ON *.* TO mysqltest1@'%';
|
GRANT ALL ON *.* TO mysqltest1@'%';
|
||||||
Run mysql_upgrade with password protected account
|
Run mysql_upgrade with password protected account
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -120,9 +122,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -130,6 +132,7 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
DROP USER mysqltest1@'%';
|
DROP USER mysqltest1@'%';
|
||||||
Version check failed. Got the following error when calling the 'mysql' command line client
|
Version check failed. Got the following error when calling the 'mysql' command line client
|
||||||
@ -139,7 +142,7 @@ Run mysql_upgrade with a non existing server socket
|
|||||||
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
|
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
|
||||||
FATAL ERROR: Upgrade failed
|
FATAL ERROR: Upgrade failed
|
||||||
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -170,9 +173,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -180,6 +183,7 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
set GLOBAL sql_mode=default;
|
set GLOBAL sql_mode=default;
|
||||||
#
|
#
|
||||||
@ -190,7 +194,7 @@ CREATE PROCEDURE testproc() BEGIN END;
|
|||||||
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
||||||
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
||||||
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -221,9 +225,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -231,6 +235,7 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
CALL testproc();
|
CALL testproc();
|
||||||
DROP PROCEDURE testproc;
|
DROP PROCEDURE testproc;
|
||||||
@ -244,7 +249,7 @@ WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been
|
|||||||
GRANT USAGE ON *.* TO 'user3'@'%';
|
GRANT USAGE ON *.* TO 'user3'@'%';
|
||||||
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
||||||
Run mysql_upgrade with all privileges on a user
|
Run mysql_upgrade with all privileges on a user
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -275,9 +280,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -285,6 +290,7 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
SHOW GRANTS FOR 'user3'@'%';
|
SHOW GRANTS FOR 'user3'@'%';
|
||||||
Grants for user3@%
|
Grants for user3@%
|
||||||
@ -293,7 +299,7 @@ GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
|
|||||||
DROP USER 'user3'@'%';
|
DROP USER 'user3'@'%';
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
The --upgrade-system-tables option was used, user tables won't be touched.
|
The --upgrade-system-tables option was used, user tables won't be touched.
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -324,7 +330,8 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
#
|
#
|
||||||
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
|
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
|
||||||
@ -332,7 +339,7 @@ OK
|
|||||||
#
|
#
|
||||||
# Droping the previously created mysql_upgrade_info file..
|
# Droping the previously created mysql_upgrade_info file..
|
||||||
# Running mysql_upgrade with --skip-write-binlog..
|
# Running mysql_upgrade with --skip-write-binlog..
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -363,9 +370,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -373,6 +380,7 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
#
|
#
|
||||||
# MDEV-4332 Increase username length from 16 characters
|
# MDEV-4332 Increase username length from 16 characters
|
||||||
@ -386,7 +394,7 @@ GRANT INSERT ON mysql.user TO very_long_user_name_number_2;
|
|||||||
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1;
|
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1;
|
||||||
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2;
|
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2;
|
||||||
CREATE PROCEDURE test.pr() BEGIN END;
|
CREATE PROCEDURE test.pr() BEGIN END;
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -417,9 +425,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -427,6 +435,7 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
|
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
|
||||||
definer
|
definer
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
The --upgrade-system-tables option was used, user tables won't be touched.
|
The --upgrade-system-tables option was used, user tables won't be touched.
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -42,5 +42,6 @@ error : Corrupt
|
|||||||
mysql.innodb_table_stats
|
mysql.innodb_table_stats
|
||||||
Error : Unknown storage engine 'InnoDB'
|
Error : Unknown storage engine 'InnoDB'
|
||||||
error : Corrupt
|
error : Corrupt
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Bug#55672 mysql_upgrade dies with internal error
|
# Bug#55672 mysql_upgrade dies with internal error
|
||||||
#
|
#
|
||||||
Phase 1/4: Checking mysql database
|
Phase 1/5: Checking mysql database
|
||||||
Processing databases
|
Processing databases
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
@ -32,9 +32,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
Phase 2/4: Running 'mysql_fix_privilege_tables'...
|
Phase 2/5: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 3/4: Fixing table and database names
|
Phase 3/5: Fixing table and database names
|
||||||
Phase 4/4: Checking and upgrading tables
|
Phase 4/5: Checking and upgrading tables
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
information_schema
|
||||||
mtr
|
mtr
|
||||||
@ -42,4 +42,5 @@ mtr.global_suppressions OK
|
|||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
|
Phase 5/5: Running 'FLUSH PRIVILEGES'...
|
||||||
OK
|
OK
|
||||||
|
1
mysql-test/t/mysql_upgrade-6984.opt
Normal file
1
mysql-test/t/mysql_upgrade-6984.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--skip-grant-tables --group-concat-max-len=1023
|
22
mysql-test/t/mysql_upgrade-6984.test
Normal file
22
mysql-test/t/mysql_upgrade-6984.test
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#
|
||||||
|
# MDEV-6984 Can't migrate from MySQL 5.6.21 to MariaDB 10
|
||||||
|
#
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# When 'root' account is password protected and MYSQL_UPGRADE doesn't
|
||||||
|
# know the password (meaning, MYSQL_UPGRADE is run automatically
|
||||||
|
# on upgrade), MYSQLD has to be started with --skip-grant-tables.
|
||||||
|
#
|
||||||
|
# In this setup MYSQL_UPGRADE cannot continue after issuing FLUSH PRIVILEGES
|
||||||
|
#
|
||||||
|
|
||||||
|
update mysql.user set password=password("foo") where user='root';
|
||||||
|
|
||||||
|
--exec $MYSQL_UPGRADE
|
||||||
|
|
||||||
|
connect(con1,localhost,root,foo,,,);
|
||||||
|
|
||||||
|
update mysql.user set password='' where user='root';
|
||||||
|
flush privileges;
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user