[SRU] mysqldump fails silently against mysql 4.0 server

Bug #267696 reported by Liam Bedford
10
Affects Status Importance Assigned to Milestone
mysql-dfsg-5.0 (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

This affects the version of mysql-dfsg-5.0 in hardy. Intrepid is up to date enough to
work correctly.

Upstream bug:
http://bugs.mysql.com/bug.php?id=34192

[copied and reworded a little from the upstream bug]
mysqldump in 5.0.51 SILENTLY fails to dump databases from mysql 4.0 server.

The dump of any 4.0 database is missing the data.
It's because now mysqldump unconditionally runs (client/mysqldump.c):

      my_snprintf(buff, sizeof(buff), "show create table %s", result_table);

      if (switch_character_set_results(mysql, "binary") ||
          mysql_query_with_error_report(mysql, &result, buff) ||
          switch_character_set_results(mysql, default_charset))
                 DBUG_RETURN(0);

where switch_character_set_results() are not supported on mysql < 4.1

description: updated
Revision history for this message
Chuck Short (zulcss) wrote :

Hi,

Can you try the version that is my ppa? http://launchpad.net/~zulcss

Thanks
chuck

Changed in mysql-dfsg-5.0:
status: New → Triaged
Revision history for this message
Liam Bedford (lbedford-deactivatedaccount) wrote :

I have verified that that version works.

The dump works now, with 4.0.x and 5.x DBs.

Thanks
L.

Revision history for this message
Chuck Short (zulcss) wrote :

Great,

Ill get an SRU for this then.

chuck

Changed in mysql-dfsg-5.0:
status: Triaged → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :

Already fixed for intrepid.

Changed in mysql-dfsg-5.0:
status: New → Confirmed
status: Confirmed → Fix Released
Revision history for this message
Chuck Short (zulcss) wrote :

Databases that are dumped from a mysql 4.1 database will silently fail when dumping to a database on hardy. This is due to a bug in mysql. The full description can be found at http://bugs.mysql.com/bug.php?id=34192.

STEPS TO REPRODUCE:

1. Install a mysql 4.1 database
2. Create a database in the mysql 4.1 database.
3. Create a dump of the database
4. Try to dump the database into mysql version in hardy.
5. It will silently fail.

I have attached the patch that fixes this issue. And it has been tested from my ppa. If you have any questions please let me know.

Thanks
chuck

Revision history for this message
Chuck Short (zulcss) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in mysql-dfsg-5.0:
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Any testers?

Revision history for this message
Hélio Nunes (dedalu-dedalu) wrote :

Tested on server version 3.23.58 and working without problems. Do you need more info?

Revision history for this message
Hélio Nunes (dedalu-dedalu) wrote :

Tested on Hardy.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in mysql-dfsg-5.0:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.