Description:
Description:
When upgrading from 5.0 to 5.1 the user s required to run 'mysql_upgrade' in order to check and update the system tables.
mysql_upgrade calls mysql_check (that checks that tables are ok) and then calls mysql_fix_privileges_tables.
During the initial run, if the server is started with the --output=table option mysql_check reports errors related to 'mysql.general_log' not being present
omer@linux:~/beta-5.1.21/mysql-test> ../bin/mysql_upgrade --datadir=/tmp/omer_var/master-data --basedir=home/omer/beta-5.1.21 --force --socket=/tmp/omer_var/tmp/master.sock --port=9306 --user=root
Looking for 'mysql' in: /home/omer/beta-5.1.21/bin/mysql
Looking for 'mysqlcheck' in: /home/omer/beta-5.1.21/bin/mysqlcheck
Running 'mysqlcheck'...
mysql.columns_priv
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.db
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.func
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.help_category
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.help_keyword
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.help_relation
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.help_topic
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.host
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.proc
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.procs_priv
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.tables_priv
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.time_zone
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.time_zone_leap_second
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.time_zone_name
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.time_zone_transition
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.time_zone_transition_type
Error : Table 'mysql.general_log' doesn't exist
status : OK
mysql.user
Error : Table 'mysql.general_log' doesn't exist
status : OK
Running 'mysql_fix_privilege_tables'...
OK
omer@linux:~/beta-5.1.21/mysql-test>
A second run will not report any errors (since now the table already exists (created while running 'mysql_fix_privilege_tables' in the first run)
omer@linux:~/beta-5.1.21/mysql-test>../bin/mysql_upgrade --datadir=/tmp/omer_var/master-data --basedir=home/omer/beta-5.1.21 --force --socket=/tmp/omer_var/tmp/master.sock --port=9306 --user=root
Looking for 'mysql' in: /home/omer/beta-5.1.21/bin/mysql
Looking for 'mysqlcheck' in: /home/omer/beta-5.1.21/bin/mysqlcheck
Running 'mysqlcheck'...
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log
Error : You can't use locks with log tables.
status : 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.servers OK
mysql.slow_log
Error : You can't use locks with log tables.
status : 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
Running 'mysql_fix_privilege_tables'...
OK
omer@linux:~/beta-5.1.21/mysql-test>
How to repeat:
1) start a 5.0 system
2) Stop the system and start a 5.1 system pointing to the same database
(make sure the server is started with --log-output=table (or file,table)
3) Run the 'mysql_upgrade' command
Suggested fix:
This either needs to be fixed or documented to the users that the above error while running mysql_upgrade (when upgrading from a 5.0 or previous system) is harmless. Otherwise users might think there is something wrong with their upgrade
How to repeat:
See the above description
Suggested fix:
This was previously reported in mysql bug#30487, which was incorrectly marked fixed. The problem is not fixed, and continues in both mysql 5.5 and mysql 6.0.