Bug #71126 Command "mysqlfabric" not recognized on Windows platform

Submitted: 11 Dec 2013 11:04 Modified: 13 Dec 2013 1:59
Reporter: Mats Kindahl Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Fabric Severity:S2 (Serious)
Version:1.4.0 OS:Windows
Assigned to: CPU Architecture:Any

[11 Dec 2013 11:04] Mats Kindahl
Description:
C:\Program Files (x86)\MySQL\MySQL Utilities>mysqlfabric list-commands
Usage: %fabric <group> <cmd> [<option> ...] arg ...

mysqlfabric: error: Command (manage list-commands) was not found.

C:\Program Files (x86)\MySQL\MySQL Utilities>mysqlfabric.exe list-commands
Usage: %fabric <group> <cmd> [<option> ...] arg ...

mysqlfabric.exe: error: Command (manage list-commands) was not found.

C:\Program Files (x86)\MySQL\MySQL Utilities>mysqluc
Launching console ...

Welcome to the MySQL Utilities Client (mysqluc) version 1.4.0
Copyright (c) 2010, 2013 Oracle and/or its affiliates. All rights reserved.
This is a release of dual licensed MySQL Utilities. For the avoidance of
doubt, this particular copy of the software is released
under the version 2 of the GNU General Public License.
MySQL Utilities is brought to you by Oracle.

Type 'help' for a list of commands or press TAB twice for list of utilities.

mysqluc>

How to repeat:
Install the MySQL utilities MSI and run the mysqlfabric command
mysqluc works fine as expected.

Suggested fix:
There are two problems that only happen when mysqlfabric is an executable
file created through the cx_freeze program.

1 - Libraries are in the libraries.zip file and the variable __path__ points
to it.

This is a problem because the find_commands() in mysql.fabric.services
searches recursively for commands in the mysql.fabric.services directory and
sub-directories. This is done as follows:

    for imp, name, ispkg in pkgutil.walk_packages(__path__, __name__ + "."):
        mod = imp.find_module(name).load_module(name)
        _LOGGER.debug("%s %s has got __name__ %s" % (
            "Package" if ispkg else "Module", name, mod.__name__))

However, "__path__" is reporting
"C:\Users\alcorrei\workspace\mysql-utilities-1.4.0\build\exe.win-amd64-2.7\lib
rary.zip\mysql\fabric\services" the "walk_packages()" yields an empty
generator since the path is invalid.

2 - __file__ global variable does not exist thus causing problems in the
mysqlfabric script when the configuration file is not provided.
[13 Dec 2013 1:59] Philip Olson
Fixed as of the upcoming MySQL Utilities 1.4.1 (Fabric) release, and here's the changelog entry:

On Microsoft Windows, the "list-commands" parameter of the "mysqlfabric"
utility did not function.

Thank you for the bug report.
[29 May 2014 7:39] Waqas Malik
the latest release 1.4.3 also not recognize the mysqlfabric utility on Windows 7.

Other Windows OS not checked yet.

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

Page generated in 0.039 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.