Bug 877557 - mysqldump from 5.1.66 fails against 5.0 server
mysqldump from 5.1.66 fails against 5.0 server
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mysql (Show other bugs)
6.3
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Honza Horak
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-16 16:17 EST by Markus Falb
Modified: 2013-11-21 15:40 EST (History)
7 users (show)

See Also:
Fixed In Version: mysql-5.1.71-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: mysqldump expected log tables created on the server it retrieved data from Consequence: mysqldump could not dump mysql system table from MySQL 5.0.x server Fix: mysqldump doesn't expect log tables created any more Result: mysqldump is able to dump mysql system table from MySQL 5.0.x server again
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 15:40:42 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch proposed to upstream (3.08 KB, patch)
2013-07-25 04:27 EDT, Honza Horak
no flags Details | Diff
patch actually used by upstream (5.20 KB, patch)
2013-08-01 07:10 EDT, Honza Horak
no flags Details | Diff

  None (edit)
Description Markus Falb 2012-11-16 16:17:53 EST
Description of problem:

mysqldump from 6.3 can not dump mysql system table from 5.8

Version-Release number of selected component (if applicable):

client on 6.3 mysql-5.1.66-1.el6_3
server on 5.8 mysql-server-5.0.95-1.el5_7.1

How reproducible:

try a mysqldump after updating client to https://rhn.redhat.com/errata/RHSA-2012-1462.html

Steps to Reproduce:

# mysqldump --opt --extended-insert --create-options --default-character-set=utf8 --routines --user="backup" -p --host="XXX" --port="3306" --ssl-ca=/etc/pki/tls/certs/xxx.cert --databases mysql

  
Actual results:

Error: Couldn't read status information for table general_log ()
mysqldump: Couldn't execute 'show create table `general_log`': Table 'mysql.general_log' doesn't exist (1146)

The dump is not made.

Expected results:

A dump of the mysql system table without error

Additional info:

This was working fine before the upgrade. A downgrade to 5.1.61-4.el6 restores the expected behaviour.
Comment 2 Tom Lane 2012-11-17 16:38:18 EST
This seems to be the same issue previously filed upstream at http://bugs.mysql.com/bug.php?id=65670
Comment 3 Honza Horak 2012-11-28 12:02:41 EST
(In reply to comment #2)
> This seems to be the same issue previously filed upstream at
> http://bugs.mysql.com/bug.php?id=65670

I've submitted a patch to the upstream report, that checks if tables `general_log` and `slow_log` exist before reading their structure. We'll see what upstream will say if anything.
Comment 4 Fabiano Martins 2013-05-10 10:19:54 EDT
This problem occurs to me also (client 5.1.69-1, RHEL 6.4).

Any idea about when the patch will be integrated on official package?
Comment 5 Markus Falb 2013-05-10 11:02:21 EDT
Note that http://bugs.mysql.com/bug.php?id=65670 suggests a workaround (creating the missing tables). Is it save, i.e. without side effects?
Comment 6 Honza Horak 2013-05-11 12:40:31 EDT
(In reply to comment #4)
> This problem occurs to me also (client 5.1.69-1, RHEL 6.4).
> 
> Any idea about when the patch will be integrated on official package?

Upstream indicated desire to include it, but when or if it will happen, that's a question really for upstream.

(In reply to comment #5)
> Note that http://bugs.mysql.com/bug.php?id=65670 suggests a workaround
> (creating the missing tables). Is it save, i.e. without side effects?

I believe it shouldn't do any harm, if the tables' structure is correct.
Comment 7 Honza Horak 2013-07-25 04:27:00 EDT
Created attachment 778112 [details]
patch proposed to upstream

According to upstream bug report [1], this bug is going to be fixed in upcoming 5.5.33. We don't know if they used the proposed patch, but I'm rather attaching it here for the case upstream would make the bug report private.

[1] http://bugs.mysql.com/bug.php?id=65670
Comment 9 Honza Horak 2013-08-01 07:10:52 EDT
Created attachment 781529 [details]
patch actually used by upstream

This is a back-ported patch from 5.5.33.
Comment 12 Honza Horak 2013-08-09 04:11:44 EDT
For reproducing, we need to have mysql-5.1.66 or newer installed and mysql-5.0.x running somewhere else.

Steps to reproduce:

On the host where mysql-5.0.x is installed (in this example 192.168.122.106)
1) # service mysqld start
2) # mysql -u root mysql
3) mysql> create user 'dumper'@'%' identified by '123456';
4) mysql> grant all on mysql.* to 'dumper'@'%';
5) mysql> flush privileges;

On the host where mysql-5.1.66 or newer is installed:
1) # mysqldump -h 192.168.122.106 -u dumper -p --databases mysql
2) # echo $?

Actual results:
mysqldump: Couldn't execute 'show create table `general_log`': Table 'mysql.general_log' doesn't exist (1146)
2

Expected results:
-- MySQL dump 10.13  Distrib 5.1.70, for redhat-linux-gnu (x86_64)
<snipped>
-- Dump completed on 2013-08-09 10:07:52
0
Comment 14 errata-xmlrpc 2013-11-21 15:40:42 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1647.html

Note You need to log in before you can comment on or make changes to this bug.