Description:
Hi,
It is more and more common to deploy ndbcluster to innodb replication (for reporting, local read purposes by example)
To setup replication, you need to take a consistent backup of the cluster, and import the data on the InnoDB node, then start replication.
The only way to do this without locking the cluster is to use the ndb> START BACKUP command.
Then, there is the possibility to use ndb_restore --print-data, to create "csv style" dump files, that can easily (with some scripting) be imported in InnoDB node.
The problem is that column data is truncated to first 255 characters. So, for many workload, this is not working, and one needs to lock the entire cluster to perform a mysql dump
How to repeat:
mysql> CREATE DATABASE IF NOT EXISTS blobdata;
mysql> USE blobdata;
mysql > CREATE TABLE blob_table (a serial, b blob) engine=ndbcluster;
mysql > INSERT INTO blob_table SELECT NULL,REPEAT('A',100000);
ndb_mgm> START BACKUP
Go to backup directory on data nodes :
(Assuming node id are 1,2, and backup id is 1)
$ ndb_restore -b 1 -n 1 --include-tables=blobdata.blob_table --print-data --append --tab=/tmp/
Look at content of /tmp/blob_table.txt
column b is truncated and cannot be restored to InnODB
Suggested fix:
Add an option to make ndb_restore able to restore to importable data in InnoDB
Add an option like --hex of mysqldump, to be able to restore binary data in InnoDB
(..)