Bug #20809 mysqldump does not backup TS and LG information correctly.
Submitted: 2 Jul 2006 2:56 Modified: 27 Oct 2006 11:16
Reporter: Nikolay Grishakin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S2 (Serious)
Version:5.1 OS:Linux (Linux)
Assigned to: Stewart Smith CPU Architecture:Any
Tags: cluster, disk data, mysqldump, Test blocking

[2 Jul 2006 2:56] Nikolay Grishakin
Description:
mysqldump does not backup information about UNDO_BUFFER_SIZE and INITIAL_SIZE correctly. For example, UNDO_BUFFER_SIZE 4M gets converted to UNDO_BUFFER_SIZE 65536000. Trying to restore back up produces error "Error | 1296 | Got error 1504 'Out of logbuffer memory' from NDB"

How to repeat:
Using mysql-5.1 build.
From mysql-test directory run:

perl mysql-test-run.pl --start-and-exit ndb_basic

mysql -uroot -h127.0.0.1 -P9306

mysql> CREATE DATABASE test1;

mysql>CREATE LOGFILE GROUP lg
ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 250M
UNDO_BUFFER_SIZE = 4M
ENGINE=NDB;

mysql>CREATE TABLESPACE ts
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg
INITIAL_SIZE 500M
ENGINE=NDB;

mysql> CREATE TABLE test1.t1 (a1 INT NOT NULL, a2 VARCHAR(256)) TABLESPACE ts STORAGE DISK  ENGINE=NDB;
mysql>INSERT INTO test1.t1 VALUES(1, "aaaaa");
mysql> quit

[ndbdev@ndb15 mysql-test]$ ../client/mysqldump -u root -Y test1 > backup1.sql

Now look at backup1.sql and compare original values with ones in a backup file.

--
-- Logfile group: lg
--

CREATE LOGFILE GROUP lg
  ADD UNDOFILE 'undofile.dat'
  UNDO_BUFFER_SIZE 65536000
  INITIAL_SIZE 262144000
  ENGINE=ndbcluster;

--
-- Tablespace: ts
--

CREATE TABLESPACE ts
  ADD DATAFILE 'datafile.dat'
  USE LOGFILE GROUP lg
  EXTENT_SIZE 1048576
  INITIAL_SIZE 524288000
  ENGINE=ndbcluster;

Now try to restore:

[ndbdev@ndb15 mysql-test]$ mysql test1 -u root --socket=./var/tmp/master.sock < backup1.sql
ERROR 1515 (HY000) at line 22: Failed to create LOGFILE GROUP
[19 Sep 2006 7:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/12187

ChangeSet@1.2308, 2006-09-19 17:07:21+10:00, stewart@willster.(none) +1 -0
  BUG#20809 mysqldump does not backup TS and LG information correctly.
  
  We were not parsing the EXTRA field to get UNDO_BUFFER_SIZE for the
  CREATE LOGFILE GROUP statement in the dump.
[4 Oct 2006 7:45] Stewart Smith
pushed to 5.1-ndb
[4 Oct 2006 14:56] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/13073

ChangeSet@1.2299, 2006-10-05 00:56:06+10:00, stewart@willster.(none) +1 -0
  BUG#20809 mysqldump does not backup TS and LG information correctly
  
  restore of the dump (ndb_dd_dump test) was failing for probably a merge problem. fixed now.
[10 Oct 2006 18:33] Jonas Oreland
pushed into 5.1.12
[27 Oct 2006 11:16] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.1.12 changelog. Tagged bug report with "mysqldump, Cluster" and changelog entry as "NDB Cluster" since this appears to affect Cluster mostly if not exclusively.