[MDEV-5501] mysql utilities 1.3.6 compatibility with MariaDB 10.0.7 ? Created: 2014-01-03  Updated: 2023-09-25  Resolved: 2023-09-25

Status: Closed
Project: MariaDB Server
Component/s: N/A
Affects Version/s: 10.0.7, 10.0
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: George L Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: verified
Environment:

CentOS 6.5 64bit
MariaDB 10.0.7 via official RPM repo
mysql-utilities via official Oracle rpm



 Description   

Does MariaDB 10.0.7 work with mysql-utilties 1.3.6 from Oracle ?

tried mysqldbcopy and resulted in following error

mysqldbcopy --source=root@localhost --destination=root@localhost test:test_clone          
# Source on localhost: ... connected.
# Destination on localhost: ... connected.
Traceback (most recent call last):
  File "/usr/bin/mysqldbcopy", line 325, in <module>
    dbcopy.copy_db(source_values, dest_values, db_list, options)
  File "/usr/lib/python2.6/site-packages/mysql/utilities/command/dbcopy.py", line 225, in copy_db
    access_options)
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/database.py", line 1561, in check_read_access
    if not self._check_user_permissions(user, host, priv):
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/database.py", line 1515, in _check_user_permissions
    result = user.has_privilege(access[0], '*', access[1])
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/user.py", line 193, in has_privilege
    grants_enabled = self.server1.grant_tables_enabled()
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/server.py", line 1601, in grant_tables_enabled
    self.exec_query("SHOW GRANTS FOR 'snuffles'@'host'")
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/server.py", line 956, in exec_query
    cur.close()
  File "/usr/lib/python2.6/site-packages/mysql/connector/cursor.py", line 305, in close
    raise errors.InternalError("Unread result found.")
mysql.connector.errors.InternalError: Unread result found.

similar problem with mysqldiskusage when using --all flag only, without the flag it works

without --all works without errors

mysqldiskusage --server=root@localhost                                                    
# Source on localhost: ... connected.
# Database totals:
+---------------------+--------------+
| db_name             |       total  |
+---------------------+--------------+
| mysql               | 1,049,462    |
| mysqlslap           | 496,825,785  |
| performance_schema  | 100,453      |
| test                | 452,599,225  |
| test2               | 452,593,702  |
+---------------------+--------------+
 
Total database disk usage = 1,403,168,627 bytes or 1.31 GB
 
#...done.

with --all it hangs and CTRL+C gives following errors

mysqldiskusage --server=root@localhost --all
# Source on localhost: ... connected.
# Database totals:
+---------------------+--------------+
| db_name             |       total  |
+---------------------+--------------+
| mysql               | 1,049,462    |
| mysqlslap           | 496,825,785  |
| performance_schema  | 100,453      |
| test                | 452,599,225  |
| test2               | 452,593,702  |
+---------------------+--------------+
 
Total database disk usage = 1,403,168,627 bytes or 1.31 GB
 
# Log information.
# The general_log is turned off on the server.
# The slow_query_log is turned off on the server.
+-------------+---------+
| log_name    |   size  |
+-------------+---------+
| mysqld.log  | 29,645  |
+-------------+---------+
 
Total size of logs = 29,645 bytes or 28.95 KB
 
 
^CTraceback (most recent call last):
  File "/usr/bin/mysqldiskusage", line 173, in <module>
    diskusage.show_log_usage(servers[0], datadir, options)
  File "/usr/lib/python2.6/site-packages/mysql/utilities/command/diskusage.py", line 672, in show_log_usage
    has_super = user_inst.has_privilege("*", "*", "SUPER")
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/user.py", line 193, in has_privilege
    grants_enabled = self.server1.grant_tables_enabled()
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/server.py", line 1601, in grant_tables_enabled
    self.exec_query("SHOW GRANTS FOR 'snuffles'@'host'")
  File "/usr/lib/python2.6/site-packages/mysql/utilities/common/server.py", line 952, in exec_query
    cur.execute(query_str)
  File "/usr/lib/python2.6/site-packages/mysql/connector/cursor.py", line 483, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/usr/lib/python2.6/site-packages/mysql/connector/cursor.py", line 407, in _handle_result
    self._handle_resultset()
  File "/usr/lib/python2.6/site-packages/mysql/connector/cursor.py", line 805, in _handle_resultset
    (self._rows, eof) = self._connection.get_rows()
  File "/usr/lib/python2.6/site-packages/mysql/connector/connection.py", line 584, in get_rows
    rows = self._protocol.read_text_result(self._socket, count)
  File "/usr/lib/python2.6/site-packages/mysql/connector/protocol.py", line 252, in read_text_result
    packet = sock.recv()
  File "/usr/lib/python2.6/site-packages/mysql/connector/network.py", line 190, in recv_plain
    packet = self.sock.recv(1)
KeyboardInterrupt

rpm -qa | egrep 'mysql-utilities|MariaDB'
MariaDB-devel-10.0.7-1.x86_64
MariaDB-compat-10.0.7-1.x86_64
MariaDB-test-10.0.7-1.x86_64
MariaDB-server-10.0.7-1.x86_64
MariaDB-client-10.0.7-1.x86_64
MariaDB-common-10.0.7-1.x86_64
MariaDB-shared-10.0.7-1.x86_64
mysql-utilities-1.3.6-1.el6.noarch

rpm -qa | egrep 'python'                 
python-pycurl-7.19.0-8.el6.x86_64
python-iniparse-0.3.1-2.1.el6.noarch
python-libs-2.6.6-51.el6.x86_64
python-urlgrabber-3.9.1-9.el6.noarch
rpm-python-4.8.0-37.el6.x86_64
newt-python-0.52.11-3.el6.x86_64
mysql-connector-python-1.1.4-1.el6.noarch
python-2.6.6-51.el6.x86_64



 Comments   
Comment by Colin Charles [ 2015-04-01 ]

mysql-utilities from Oracle/MySQL is not tested to work with MariaDB 10. Some of the tools "should" work, but not all (things that depend on GTID for example)

Comment by Elena Stepanova [ 2015-04-01 ]

MariaDB 10.0.17 + MySQL Tools 1.5.4 – still a problem. The incompatibility seems to be deeper than just not having the same variables etc.
For example, the first command from the description just hangs

mysqldbcopy --source=root@localhost --destination=root@localhost test:test_clone  
# Source on localhost: ... connected.
# Destination on localhost: ... connected.

and if interrupted, throws the exception similar to the one from the second example:

^CTraceback (most recent call last):
  File "/usr/local/bin/mysqldbcopy", line 337, in <module>
    dbcopy.copy_db(source_values, dest_values, db_list, options)
  File "/usr/local/lib/python2.7/dist-packages/mysql/utilities/command/dbcopy.py", line 231, in copy_db
    access_options)
  File "/usr/local/lib/python2.7/dist-packages/mysql/utilities/common/database.py", line 1683, in check_read_access
    if not self._check_user_permissions(user, host, priv):
  File "/usr/local/lib/python2.7/dist-packages/mysql/utilities/common/database.py", line 1633, in _check_user_permissions
    result = user.has_privilege(access[0], '*', access[1])
  File "/usr/local/lib/python2.7/dist-packages/mysql/utilities/common/user.py", line 396, in has_privilege
    grants_enabled = self.server1.grant_tables_enabled()
  File "/usr/local/lib/python2.7/dist-packages/mysql/utilities/common/server.py", line 2113, in grant_tables_enabled
    self.exec_query("SHOW GRANTS FOR 'snuffles'@'host'")
  File "/usr/local/lib/python2.7/dist-packages/mysql/utilities/common/server.py", line 1259, in exec_query
    cur.execute(query_str)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/cursor.py", line 507, in execute
    self._handle_result(self._connection.cmd_query(stmt))
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/cursor.py", line 421, in _handle_result
    self._handle_resultset()
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/cursor.py", line 895, in _handle_resultset
    (self._rows, eof) = self._connection.get_rows()
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 671, in get_rows
    rows = self._protocol.read_text_result(self._socket, count)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/protocol.py", line 309, in read_text_result
    packet = sock.recv()
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/network.py", line 224, in recv_plain
    read = self.sock.recv_into(packet, 4)
KeyboardInterrupt

The last command that it attempts to execute (and hangs upon) is

SHOW GRANTS FOR 'snuffles'@'host'

When executed from the CLI, it returns an error as expected (the script expects it too, MySQL 5.6 or MariaDB 5.5 also return an error but don't not hang).
However, with 10.0 there is some problem processing the result. Protocol issues?
It needs to be investigated further.

Comment by Daniel Black [ 2023-09-25 ]

Appears end of life now - https://github.com/mysql/mysql-utilities

Generated at Thu Feb 08 07:04:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.