WL#3572: Online backup: No-data engine backup and restore

Affects: Server-6.0   —   Status: Complete   —   Priority: Low

Backup support is needed for engines that don't store any data, e.g.:
  - Federated engine support
  - Blackhole engine support
  - Example engine support
  - Merge engine support
These engines will not provide any backup image for data stored in tables. The
task is to make them properly respond to backup/restore protocols used by the
backup kernel.

The driver is expected to respond 'TRUE' if the following engines are presented 
to the accept() method:


The kernel will send the following requests to a backup driver:

- size, init_size
  Ask for total size of the image and for the size of initial data -- both 
  should return 0.

- begin, end
  Do nothing.

- get_data
  Ask for next block of data. The driver should return one empty block (for 
  stream 0) indicating end of the initial data transfer. If asked for further 
  blocks of data, should always return empty block indicating end of stream.

- prelock, lock, unlock
  Synchronization calls -- for no-data engines these should do nothing and 
  return immediately.

- cancel
  Do nothing.

A restore driver should be ready to receive these calls:

- begin, end 
  Do nothing.

- send_data
  Any data sent should be simply ignored. A call should return ok answer.

- cancel
  Do nothing.

Changes to default driver (be_default)
The default driver shall reject the storage engines listed above in its accept
() method.
The nodata driver shall implement a class of type Snapshot_info which will 
provide the kernel a means to create a backup and restore driver class.

The nodata backup and restore driver classes shall be implemented by inheriting 
from the Backup_driver and Restore_driver base classes.

The methods supported for each shall be implemented as descibed above.

The changes to the kernel are to be minimized and shall be limited to adding 
code to create a new instance of the nodata driver in the snapshot array for 
backup and adding identification of the nodata driver from the catalog on 

The get_data() method for the backup driver class shall support the following 
modes: initialization, lock, and complete. There are no other modes needed and 
the method shall not open, lock, or read from any tables.

The send_data() method for the restore driver class shall simply return and 
empty buffer. It does not open, lock, or write to any tables.