2015-08-11 18:45:38 +02:00
set sql_mode="";
2006-11-13 13:39:49 +01:00
Run mysql_upgrade once
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2010-09-06 01:15:34 +02:00
Processing databases
mysql
2012-12-05 09:31:05 +01:00
mysql.column_stats OK
2006-11-13 13:39:49 +01:00
mysql.columns_priv OK
mysql.db OK
2007-04-18 16:23:19 +02:00
mysql.event OK
2006-11-13 13:39:49 +01:00
mysql.func OK
2013-05-22 17:36:48 +02:00
mysql.gtid_slave_pos OK
2006-11-13 13:39:49 +01:00
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2012-12-05 09:31:05 +01:00
mysql.index_stats OK
2012-08-22 23:32:25 +02:00
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
2007-04-18 16:23:19 +02:00
mysql.plugin OK
2006-11-13 13:39:49 +01:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 16:45:26 +01:00
mysql.proxies_priv OK
2013-10-18 17:10:51 +02:00
mysql.roles_mapping OK
2007-04-18 16:23:19 +02:00
mysql.servers OK
2012-12-05 09:31:05 +01:00
mysql.table_stats OK
2006-11-13 13:39:49 +01:00
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2006-11-13 13:39:49 +01:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 01:15:34 +02:00
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2010-09-06 01:15:34 +02:00
OK
2006-11-13 13:39:49 +01:00
Run it again - should say already completed
2007-04-18 13:21:39 +02:00
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
2015-12-08 10:13:13 +01:00
Force should run it regardless of whether it has been run before
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2010-09-06 01:15:34 +02:00
Processing databases
mysql
2012-12-05 09:31:05 +01:00
mysql.column_stats OK
2006-11-13 13:39:49 +01:00
mysql.columns_priv OK
mysql.db OK
2007-04-18 16:23:19 +02:00
mysql.event OK
2006-11-13 13:39:49 +01:00
mysql.func OK
2013-05-22 17:36:48 +02:00
mysql.gtid_slave_pos OK
2006-11-13 13:39:49 +01:00
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2012-12-05 09:31:05 +01:00
mysql.index_stats OK
2012-08-22 23:32:25 +02:00
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
2007-04-18 16:23:19 +02:00
mysql.plugin OK
2006-11-13 13:39:49 +01:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 16:45:26 +01:00
mysql.proxies_priv OK
2013-10-18 17:10:51 +02:00
mysql.roles_mapping OK
2007-04-18 16:23:19 +02:00
mysql.servers OK
2012-12-05 09:31:05 +01:00
mysql.table_stats OK
2006-11-13 13:39:49 +01:00
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2006-11-13 13:39:49 +01:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 01:15:34 +02:00
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2010-09-06 01:15:34 +02:00
OK
2007-04-18 13:21:39 +02:00
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
GRANT ALL ON *.* TO mysqltest1@'%';
Run mysql_upgrade with password protected account
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2010-09-06 01:15:34 +02:00
Processing databases
mysql
2012-12-05 09:31:05 +01:00
mysql.column_stats OK
2007-04-18 13:21:39 +02:00
mysql.columns_priv OK
mysql.db OK
2007-04-18 16:23:19 +02:00
mysql.event OK
2007-04-18 13:21:39 +02:00
mysql.func OK
2013-05-22 17:36:48 +02:00
mysql.gtid_slave_pos OK
2007-04-18 13:21:39 +02:00
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2012-12-05 09:31:05 +01:00
mysql.index_stats OK
2012-08-22 23:32:25 +02:00
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
2007-04-18 16:23:19 +02:00
mysql.plugin OK
2007-04-18 13:21:39 +02:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 16:45:26 +01:00
mysql.proxies_priv OK
2013-10-18 17:10:51 +02:00
mysql.roles_mapping OK
2007-04-18 16:23:19 +02:00
mysql.servers OK
2012-12-05 09:31:05 +01:00
mysql.table_stats OK
2007-04-18 13:21:39 +02:00
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2007-04-18 13:21:39 +02:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 01:15:34 +02:00
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2010-09-06 01:15:34 +02:00
OK
2007-04-18 13:21:39 +02:00
DROP USER mysqltest1@'%';
2014-01-22 14:16:57 +01:00
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'mysqltest1'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed
2007-04-18 13:21:39 +02:00
Run mysql_upgrade with a non existing server socket
2012-06-05 13:09:18 +02:00
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
2007-04-18 13:21:39 +02:00
FATAL ERROR: Upgrade failed
2007-05-19 18:15:08 +02:00
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2010-09-06 01:15:34 +02:00
Processing databases
mysql
2012-12-05 09:31:05 +01:00
mysql.column_stats OK
2007-05-19 18:15:08 +02:00
mysql.columns_priv OK
mysql.db OK
2007-05-19 18:22:55 +02:00
mysql.event OK
2007-05-19 18:15:08 +02:00
mysql.func OK
2013-05-22 17:36:48 +02:00
mysql.gtid_slave_pos OK
2007-05-19 18:15:08 +02:00
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2012-12-05 09:31:05 +01:00
mysql.index_stats OK
2012-08-22 23:32:25 +02:00
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
2007-05-19 18:22:55 +02:00
mysql.plugin OK
2007-05-19 18:15:08 +02:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 16:45:26 +01:00
mysql.proxies_priv OK
2013-10-18 17:10:51 +02:00
mysql.roles_mapping OK
2007-05-19 18:22:55 +02:00
mysql.servers OK
2012-12-05 09:31:05 +01:00
mysql.table_stats OK
2007-05-19 18:15:08 +02:00
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2007-05-19 18:15:08 +02:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 01:15:34 +02:00
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2010-09-06 01:15:34 +02:00
OK
2007-05-19 18:15:08 +02:00
set GLOBAL sql_mode=default;
2009-12-03 17:15:47 +01:00
#
# Bug #41569 mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table
# but does not set values.
#
CREATE PROCEDURE testproc() BEGIN END;
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 db_collation = NULL WHERE name LIKE 'testproc';
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2010-09-06 01:15:34 +02:00
Processing databases
mysql
2012-12-05 09:31:05 +01:00
mysql.column_stats OK
2009-12-03 17:15:47 +01:00
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
2013-05-22 17:36:48 +02:00
mysql.gtid_slave_pos OK
2009-12-03 17:15:47 +01:00
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2012-12-05 09:31:05 +01:00
mysql.index_stats OK
2012-08-22 23:32:25 +02:00
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
2009-12-03 17:15:47 +01:00
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
2010-11-02 16:45:26 +01:00
mysql.proxies_priv OK
2013-10-18 17:10:51 +02:00
mysql.roles_mapping OK
2009-12-03 17:15:47 +01:00
mysql.servers OK
2012-12-05 09:31:05 +01:00
mysql.table_stats OK
2009-12-03 17:15:47 +01:00
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2009-12-03 17:15:47 +01:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 01:15:34 +02:00
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2010-09-06 01:15:34 +02:00
OK
2009-12-03 17:15:47 +01:00
CALL testproc();
DROP PROCEDURE testproc;
2009-12-04 17:00:20 +01:00
WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.
WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (latin1_swedish_ci). Please verify if necessary.
WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.
2010-07-01 11:05:09 +02:00
#
# Bug #53613: mysql_upgrade incorrectly revokes
# TRIGGER privilege on given table
#
GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
Run mysql_upgrade with all privileges on a user
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2010-09-06 01:15:34 +02:00
Processing databases
mysql
2012-12-05 09:31:05 +01:00
mysql.column_stats OK
2010-07-01 11:05:09 +02:00
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
2013-05-22 17:36:48 +02:00
mysql.gtid_slave_pos OK
2010-07-01 11:05:09 +02:00
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2012-12-05 09:31:05 +01:00
mysql.index_stats OK
2012-08-22 23:32:25 +02:00
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
2010-07-01 11:05:09 +02:00
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
2010-11-02 16:45:26 +01:00
mysql.proxies_priv OK
2013-10-18 17:10:51 +02:00
mysql.roles_mapping OK
2010-07-01 11:05:09 +02:00
mysql.servers OK
2012-12-05 09:31:05 +01:00
mysql.table_stats OK
2010-07-01 11:05:09 +02:00
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2010-07-01 11:05:09 +02:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 01:15:34 +02:00
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2010-09-06 01:15:34 +02:00
OK
2010-07-01 11:05:09 +02:00
SHOW GRANTS FOR 'user3'@'%';
Grants for user3@%
GRANT USAGE ON *.* TO 'user3'@'%'
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
DROP USER 'user3'@'%';
End of 5.1 tests
2014-08-06 13:27:44 +02:00
The --upgrade-system-tables option was used, user tables won't be touched.
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2014-08-06 13:27:44 +02:00
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 OK
mysql.innodb_table_stats OK
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2014-08-06 13:27:44 +02:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views... Skipped
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names ... Skipped
Phase 6/7: Checking and upgrading tables... Skipped
Phase 7/7: Running 'FLUSH PRIVILEGES'
2011-04-25 17:22:25 +02:00
OK
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
2011-11-15 13:18:42 +01:00
#
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
# SKIP-WRITE-BINLOG
#
# Droping the previously created mysql_upgrade_info file..
# Running mysql_upgrade with --skip-write-binlog..
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2012-01-16 20:16:35 +01:00
Processing databases
mysql
2012-12-05 09:31:05 +01:00
mysql.column_stats OK
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
2011-11-15 13:18:42 +01:00
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
2013-05-22 17:36:48 +02:00
mysql.gtid_slave_pos OK
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
2011-11-15 13:18:42 +01:00
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2012-12-05 09:31:05 +01:00
mysql.index_stats OK
2012-08-22 23:32:25 +02:00
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
2011-11-15 13:18:42 +01:00
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
2013-10-18 17:10:51 +02:00
mysql.roles_mapping OK
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
2011-11-15 13:18:42 +01:00
mysql.servers OK
2012-12-05 09:31:05 +01:00
mysql.table_stats OK
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
2011-11-15 13:18:42 +01:00
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.
mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.
Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)
Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.
client/mysql_upgrade.c:
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG
With this patch, --upgrade-system-tables and
--write-binlog options will not be added to the
list of options, used to start mysql and mysqlcheck
tools.
mysql-test/r/mysql_upgrade.result:
Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
Added a testcase for Bug#11827359.
2011-11-15 13:18:42 +01:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2012-01-16 20:16:35 +01:00
performance_schema
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2012-01-16 20:16:35 +01:00
OK
2014-04-28 00:38:03 +02:00
#
2015-10-29 09:05:32 +01:00
# Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR
#
Run mysql_upgrade with unauthorized access
2015-12-09 10:00:49 +01:00
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
2015-10-29 09:05:32 +01:00
FATAL ERROR: Upgrade failed
2015-12-09 10:00:49 +01:00
#
2014-04-28 00:38:03 +02:00
# MDEV-4332 Increase username length from 16 characters
# MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names
#
2016-03-25 17:51:22 +01:00
connection default;
2014-04-28 00:38:03 +02:00
GRANT SELECT ON mysql.* TO very_long_user_name_number_1;
GRANT SELECT ON mysql.* TO very_long_user_name_number_2;
GRANT ALL ON *.* TO even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost WITH GRANT OPTION;
GRANT INSERT ON mysql.user TO very_long_user_name_number_1;
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_2;
CREATE PROCEDURE test.pr() BEGIN END;
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2014-04-28 00:38:03 +02:00
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 OK
mysql.innodb_table_stats OK
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2014-04-28 00:38:03 +02:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2014-08-06 13:27:44 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
2014-04-28 00:38:03 +02:00
performance_schema
test
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2014-04-28 00:38:03 +02:00
OK
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
definer
even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost
SELECT grantor FROM mysql.tables_priv WHERE db = 'mysql' AND table_name = 'user';
grantor
even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost
even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost
DROP USER very_long_user_name_number_1, very_long_user_name_number_2, even_longer_user_name_number_3_to_test_the_grantor_and_definer_field_length@localhost;
DROP PROCEDURE test.pr;
2017-07-20 15:08:24 +02:00
use test;
2017-08-17 11:32:16 +02:00
call mtr.add_suppression('Column last_update in table `mysql`.`innodb_table_stats` is INT NOT NULL but should be');
2017-07-20 15:08:24 +02:00
alter table mysql.innodb_table_stats modify last_update int not null;
create table extralongname_extralongname_extralongname_extralongname_ext (
id int(10) unsigned not null,
created_date date not null,
created timestamp not null,
primary key (created,id,created_date)
) engine=innodb stats_persistent=1 default charset=latin1
partition by range (year(created_date))
subpartition by hash (month(created_date))
subpartitions 2 (
partition p2007 values less than (2008),
partition p2008 values less than (2009)
);
select length(table_name) from mysql.innodb_table_stats;
length(table_name)
79
79
79
79
drop table extralongname_extralongname_extralongname_extralongname_ext;
End of 10.0 tests
2015-08-11 18:45:38 +02:00
set sql_mode=default;
2015-09-12 12:16:05 +02:00
# Droping the previously created mysql_upgrade_info file..
create table test.t1(a int) engine=MyISAM;
# Trying to enforce InnoDB for all tables
SET GLOBAL enforce_storage_engine=InnoDB;
2017-03-04 17:17:00 +01:00
Phase 1/7: Checking and upgrading mysql database
2015-09-12 12:16:05 +02:00
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 OK
mysql.innodb_table_stats OK
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
2017-11-13 20:45:10 +01:00
mysql.transaction_registry OK
2015-09-12 12:16:05 +02:00
mysql.user OK
2017-03-04 17:17:00 +01:00
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
2015-09-12 12:16:05 +02:00
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
performance_schema
test
test.t1 OK
2017-03-04 17:17:00 +01:00
Phase 7/7: Running 'FLUSH PRIVILEGES'
2015-09-12 12:16:05 +02:00
OK
# Should return 2
SELECT count(*) FROM information_schema.tables where ENGINE="InnoDB";
count(*)
2017-12-17 10:29:01 +01:00
3
2015-09-12 12:16:05 +02:00
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE test.t1;
SET GLOBAL enforce_storage_engine=NULL;
2017-08-08 10:18:43 +02:00
End of 10.1 tests
2018-02-07 01:39:40 +01:00
Start of 10.3 tests
#
# Ensure that mysql_upgrade correctly sets truncate_versioning_priv
# on upgrade from 10.2
#
flush privileges;
CREATE USER 'user3'@'%';
GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
2018-02-12 16:26:11 +01:00
alter table mysql.user drop column Delete_history_priv;
2018-02-07 01:39:40 +01:00
flush privileges;
Run mysql_upgrade with all privileges on a user
flush privileges;
SHOW GRANTS FOR 'user3'@'%';
Grants for user3@%
GRANT USAGE ON *.* TO 'user3'@'%'
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
DROP USER 'user3'@'%';