2006-11-13 13:39:49 +01:00
Run mysql_upgrade once
2010-09-06 02:15:34 +03:00
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
2008-10-30 14:52:04 +01:00
mtr.global_suppressions OK
mtr.test_suppressions OK
2010-09-06 02:15:34 +03:00
mysql
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
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2007-04-18 16:23:19 +02:00
mysql.ndb_binlog_index OK
mysql.plugin OK
2006-11-13 13:39:49 +01:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 17:45:26 +02:00
mysql.proxies_priv OK
2007-04-18 16:23:19 +02:00
mysql.servers 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
mysql.user OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 02:15:34 +03:00
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
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
Force should run it regardless of wether it's been run before
2010-09-06 02:15:34 +03:00
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
2008-10-30 14:52:04 +01:00
mtr.global_suppressions OK
mtr.test_suppressions OK
2010-09-06 02:15:34 +03:00
mysql
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
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2007-04-18 16:23:19 +02:00
mysql.ndb_binlog_index OK
mysql.plugin OK
2006-11-13 13:39:49 +01:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 17:45:26 +02:00
mysql.proxies_priv OK
2007-04-18 16:23:19 +02:00
mysql.servers 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
mysql.user OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 02:15:34 +03:00
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
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
2010-09-06 02:15:34 +03:00
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
2008-10-30 14:52:04 +01:00
mtr.global_suppressions OK
mtr.test_suppressions OK
2010-09-06 02:15:34 +03:00
mysql
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
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2007-04-18 16:23:19 +02:00
mysql.ndb_binlog_index OK
mysql.plugin OK
2007-04-18 13:21:39 +02:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 17:45:26 +02:00
mysql.proxies_priv OK
2007-04-18 16:23:19 +02:00
mysql.servers 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
mysql.user OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 02:15:34 +03:00
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
2007-04-18 13:21:39 +02:00
DROP USER mysqltest1@'%';
2014-01-22 15:16:57 +02: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
2007-04-19 21:35:10 +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';
2010-09-06 02:15:34 +03:00
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
2008-10-30 14:52:04 +01:00
mtr.global_suppressions OK
mtr.test_suppressions OK
2010-09-06 02:15:34 +03:00
mysql
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
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
2007-05-19 18:22:55 +02:00
mysql.ndb_binlog_index OK
mysql.plugin OK
2007-05-19 18:15:08 +02:00
mysql.proc OK
mysql.procs_priv OK
2010-11-02 17:45:26 +02:00
mysql.proxies_priv OK
2007-05-19 18:22:55 +02:00
mysql.servers 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
mysql.user OK
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 02:15:34 +03:00
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
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';
2010-09-06 02:15:34 +03:00
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
2009-12-03 17:15:47 +01:00
mtr.global_suppressions OK
mtr.test_suppressions OK
2010-09-06 02:15:34 +03:00
mysql
2009-12-03 17:15:47 +01:00
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
2010-11-02 17:45:26 +02:00
mysql.proxies_priv OK
2009-12-03 17:15:47 +01:00
mysql.servers 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
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 02:15:34 +03:00
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
2009-12-03 17:15:47 +01:00
CALL testproc();
DROP PROCEDURE testproc;
2009-12-04 14:00:20 -02: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 12:05:09 +03: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
2010-09-06 02:15:34 +03:00
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
2010-07-01 12:05:09 +03:00
mtr.global_suppressions OK
mtr.test_suppressions OK
2010-09-06 02:15:34 +03:00
mysql
2010-07-01 12:05:09 +03:00
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
2010-11-02 17:45:26 +02:00
mysql.proxies_priv OK
2010-07-01 12:05:09 +03:00
mysql.servers 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
2011-04-25 17:22:25 +02:00
performance_schema
2010-09-06 02:15:34 +03:00
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
2010-07-01 12:05:09 +03: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
2009-10-28 14:02:00 +04:00
The --upgrade-system-tables option was used, databases won't be touched.
2011-04-25 17:22:25 +02:00
Phase 3/3: Running 'mysql_fix_privilege_tables'...
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 17:48:42 +05:30
#
# 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..
2012-01-16 20:16:35 +01:00
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
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 17:48:42 +05:30
mtr.global_suppressions OK
mtr.test_suppressions OK
2012-01-16 20:16:35 +01:00
mysql
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 17:48:42 +05:30
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers 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
2012-01-16 20:16:35 +01:00
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
2014-04-28 02:56:53 +04:00
#
# MDEV-4332 Increase username length from 16 characters
# MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names
#
alter table mysql.user modify User char(80) binary not null default '';
alter table mysql.db modify User char(80) binary not null default '';
alter table mysql.tables_priv modify User char(80) binary not null default '';
alter table mysql.columns_priv modify User char(80) binary not null default '';
alter table mysql.procs_priv modify User char(80) binary not null default '';
alter table mysql.proc modify definer char(141) collate utf8_bin not null default '';
alter table mysql.event modify definer char(141) collate utf8_bin not null default '';
alter table mysql.proxies_priv modify User char(80) COLLATE utf8_bin not null default '';
alter table mysql.proxies_priv modify Proxied_user char(80) COLLATE utf8_bin not null default '';
alter table mysql.proxies_priv modify Grantor char(141) COLLATE utf8_bin not null default '';
alter table mysql.servers modify Username char(80) not null default '';
alter table mysql.procs_priv modify Grantor char(141) COLLATE utf8_bin not null default '';
alter table mysql.tables_priv modify Grantor char(141) COLLATE utf8_bin not null default '';
flush privileges;
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;
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers 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
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
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;
alter table mysql.user modify User char(16) binary not null default '';
alter table mysql.db modify User char(16) binary not null default '';
alter table mysql.tables_priv modify User char(16) binary not null default '';
alter table mysql.columns_priv modify User char(16) binary not null default '';
alter table mysql.procs_priv modify User char(16) binary not null default '';
alter table mysql.proc modify definer char(77) collate utf8_bin not null default '';
alter table mysql.event modify definer char(77) collate utf8_bin not null default '';
alter table mysql.proxies_priv modify User char(16) COLLATE utf8_bin not null default '';
alter table mysql.proxies_priv modify Proxied_user char(16) COLLATE utf8_bin not null default '';
alter table mysql.proxies_priv modify Grantor char(77) COLLATE utf8_bin not null default '';
alter table mysql.servers modify Username char(64) not null default '';
alter table mysql.procs_priv modify Grantor char(77) COLLATE utf8_bin not null default '';
alter table mysql.tables_priv modify Grantor char(77) COLLATE utf8_bin not null default '';
flush privileges;
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 17:48:42 +05:30
End of tests