Bug #72152 mysql_upgrade --force returns spurious error

Submitted: 28 Mar 2014 13:01 Modified: 28 Mar 2014 19:45
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.6.16 OS:Windows (7/64)
Assigned to: CPU Architecture:Any

[28 Mar 2014 13:01] Peter Laursen
Description:
--force should be a valid option according to
https://dev.mysql.com/doc/refman/5.6/en/mysql-upgrade.html

I was trying to verify another recent bug (ie. confirm my assumption there) of mine http://bugs.mysql.com/bug.php?id=72150 on a 5.6.16 server (installed from .zip archive, but unlikely that this matters, I think).

I created the table:

USE test;
CREATE TABLE `русский` (
  `id` INT(11) DEFAULT NULL,
  `txt` VARCHAR(10) DEFAULT NULL
) ENGINE=INNODB DEFAULT CHARSET=cp1251;

.. next went to see if MySQL_upgrade/mysql_check failed to handle this table like it happened with 5.1.73. I used the --force option as mysql_upgrade has already been run. 

How to repeat:
C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql_upgrade -uroot -p --port=3308
--force
mysql_upgrade: unknown option '--no-beep'

Suggested fix:
??
[28 Mar 2014 13:07] Peter Laursen
Also saw this:

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqlcheck all-databases
mysqlcheck: unknown option '--no-beep'
[28 Mar 2014 13:14] Peter Laursen
comeplete command used for mysqlcheck:

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqlcheck -uroot -p --all-databases

mysqlcheck: unknown option '--no-beep'
[28 Mar 2014 13:40] Peter Laursen
I was not able to reproduce this error with the 'mysql.exe' program.  But other commandline clients seem messed up when using an optional parameter on the command line.
[28 Mar 2014 13:52] MySQL Verification Team
Related to the bug: http://bugs.mysql.com/bug.php?id=70166 : Bug #70166 	Running mysqldump With any option produce: mysqldump: unknown option '--no-beep' .
[28 Mar 2014 19:03] Sveta Smirnova
Thank you for the report.

Please check if you don't have option --no-beep specified under [client] or [mysql] sections in your configuration file (or run mysql_upgrade --no-defaults ...)
[28 Mar 2014 19:10] Peter Laursen
@Sveta .. you are absolutely right!

I have in configuration:

[client]
no-beep

I also remember that (since I had numerous issues with the crap and completely unusable "MySQL Installer"), I used the configuration file from my 5.5 instance (generated by the config wizard bundled with the 5.5 installer - don't remember which exact version) for my 5.6 instance. 

Let me remove that and update here!
[28 Mar 2014 19:28] Peter Laursen
.. after removing that offensive line (was this a valid client option in 5.5 and is not in 5.6, BTW?), I get

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql_upgrade -uroot -p --port=3308
--force
Enter password:
Looking for 'mysql.exe' as: C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.ex
e
Looking for 'mysqlcheck.exe' as: C:\Program Files\MySQL\MySQL Server 5.6\bin\mys
qlcheck.exe
Running 'mysqlcheck' with connection arguments: "--port=3308" "--port=3308"
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: "--port=3308" "--port=3308"
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.servers                                      OK
mysql.slave_master_info                            OK
mysql.slave_relay_log_info                         OK
mysql.slave_worker_info                            OK
mysql.slow_log                                     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'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: "--port=3308" "--port=3308"
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: "--port=3308" "--port=3308"
Warning: Using a password on the command line interface can be insecure.
ixtest.ixtest                                      OK
test.???????
Error    : Can't find file: '.\test\@003f@003f@003f@003f@003f@003f@003f.frm' (er
rno: 22 - Invalid argument)
status   : Operation failed
test.deci                                          OK
test.t1                                            OK

Repairing tables
test.???????
Error    : Can't find file: '.\test\@003f@003f@003f@003f@003f@003f@003f.frm' (er
rno: 22 - Invalid argument)
status   : Operation failed
OK

C:\Program Files\MySQL\MySQL Server 5.6\bin>

.. so this resolves the failure with 'no-beep'.  But my other report in http://bugs.mysql.com/bug.php?id=72150 seems confirmed.  'mysqlcheck' cannot handle table names outside current ANSI codepage on Windows (in case a table named `русский` on my Western/Danish system).

and one more question: I have a database named 'ixtest' with a single table 'ixtest'.  Why does the mysqlcheck "OK" appear in the console output after "Running 'mysql_fix_privilege_tables'",  It looks extremely weird ??
[28 Mar 2014 19:44] Sveta Smirnova
Thank you for the feedback.

So I am closing this bug as "Not a bug" and lets discuss bug #72150 at bug#72150

> and one more question: I have a database named 'ixtest' with a single table 'ixtest'.  Why does the mysqlcheck "OK" appear in the console output after "Running 'mysql_fix_privilege_tables'",  It looks extremely weird ??

Why weird? mysqlcheck just finished checking system tables, so mysql_upgrade called mysql_fix_privilege_tables for them, and then continued with other databases.
[28 Mar 2014 19:45] Peter Laursen
Your explanation ".. so mysql_upgrade called mysql_fix_privilege_tables for them, and then  continued with other databases." accepted!

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.061 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.