Bug 877557

Summary: mysqldump from 5.1.66 fails against 5.0 server
Product: Red Hat Enterprise Linux 6 Reporter: Markus Falb <wnefal+redhatbugzilla>
Component: mysqlAssignee: Honza Horak <hhorak>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: azelinka, byte, fabiano.martins, hhorak, kvolny, ovasik, praiskup
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
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 20:40:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch proposed to upstream
none
patch actually used by upstream none

Description Markus Falb 2012-11-16 21:17:53 UTC
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 21:38:18 UTC
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 17:02:41 UTC
(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 14:19:54 UTC
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 15:02:21 UTC
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 16:40:31 UTC
(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 08:27:00 UTC
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 11:10:52 UTC
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 08:11:44 UTC
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 20:40:42 UTC
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