Bug#877856: mysql-utilities: Parsing MySQL version is broken

2018-06-23 Thread Lev Lazinskiy
I have been working on packaging up 1.6.5 but this will likely go into testing 
at some point and not be available in stable until buster. 

> MySQL version parser is broken in 1.6.4, fixed in 1.6.5, but doesn't
> seem to be available:
> https://dev.mysql.com/doc/mysql-utilities/1.6/en/mysql-utils-install-deb.html
> refers to 1.6.4, and:
> https://dev.mysql.com/doc/mysql-utilities/1.6/en/mysql-utils-install-source.html
> refers to 1.6.4 too.

In the meantime, you can grab a 1.6.5 package from MySQL directly here: 
https://downloads.mysql.com/archives/get/file/mysql-utilities_1.6.5-1debian8_all.deb
 

It looks like the docs were never updated, but the package exists. It is listed 
for "jessie" but it should work on "stretch" without any issues. 

One other thing to note. While I was debugging this issue, I noticed the 
following warning on the MySQL downloads page. 

"Per Oracle's Lifetime Support policy[1], as of May 30, 2018, MySQL Utilities 
is covered under Oracle Sustaining Support. Users are encouraged to migrate to 
MySQL Shell[2]."

It sounds like 1.6.5 will be the last release of this software. From my brief 
inspection MySQL shell does not really do many of the things that 
mysql-utilities does out of the box so it is not exactly a "drop in" 
replacement. 

[1] https://www.oracle.com/support/lifetime-support/index.html
[2] https://dev.mysql.com/doc/mysql-shell-excerpt/8.0/en/


Bug#877856: mysql-utilities: Parsing MySQL version is broken

2017-10-06 Thread Yvan Taviaud - Dugwood

Package: mysql-utilities
Version: 1.6.4-1
Severity: grave
Tags: newcomer upstream
Justification: renders package unusable

MySQL version parser is broken in 1.6.4, fixed in 1.6.5, but doesn't
seem to be available:
https://dev.mysql.com/doc/mysql-utilities/1.6/en/mysql-utils-install-deb.html
refers to 1.6.4, and:
https://dev.mysql.com/doc/mysql-utilities/1.6/en/mysql-utils-install-source.html
refers to 1.6.4 too.

Example Python script, to be run as root (or any user that has access to 
mysqld

executable):

test.py
__
from mysql.utilities.common.tools import (get_mysqld_version, get_tool_path)

if __name__ == '__main__':
    mysqld_path = get_tool_path("/usr", "mysqld")
    version_str = get_mysqld_version(mysqld_path)
    print version_str
__

MariaDB is installed, and report:
root# mysqld --version
mysqld  Ver 10.1.26-MariaDB-0+deb9u1 for debian-linux-gnu on x86_64 
(Debian 9.1)


Running the Python script:
root# python test.py
None

Fixing the function parse_mysqld_version,
in /usr/lib/python2.7/dist-packages/mysql/utilities/common/tools.py,
according to:
https://github.com/mysql/mysql-utilities/blob/release-1.6.5/mysql/utilities/common/tools.py#L247

Run the script again:
root# python test.py
('10', '1', '26')

This breaks mysqlfrm tool, because the failed parsing of the version
will run script for MySQL < 5.7.6 where I have a MySQL 5.7.19 (Percona
XtraDB Cluster 5.7)

Thanks Debian team!


-- System Information:
Debian Release: 9.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr:en_US:en_GB (charmap=UTF-8)

Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages mysql-utilities depends on:
ii  python  2.7.13-2
ii  python-mysql.connector  2.1.6-1

mysql-utilities recommends no packages.

mysql-utilities suggests no packages.

-- no debconf information