Bug #37351 During Restore, Create statements executed fails, if Restore fails
Submitted: 11 Jun 2008 16:19 Modified: 13 Jun 2008 15:29
Reporter: Hema Sridharan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Backup Severity:S2 (Serious)
Version:mysql-6.0-backup-myisam OS:Linux
Assigned to: CPU Architecture:Any

[11 Jun 2008 16:19] Hema Sridharan
Description:
1)I perform restore of huge database from connection 1.
2)From another connection, execute some DDL statements like create database  and create table. These statements will be blocked for some time till restore completes.
3) If the restore fails in connection 1 it affects the DDL statements and it also fails. Though the restore fails, DDL statements should not fail( It can only be blocked till the time Restore completes).

Failed Restore should not affect the DDL statements being executed.

How to repeat:
connection 1;

mysql> restore from '/data1/backup_dmp/big9';

Restore takes some time to complete as it is a huge database.

connection 2;

mysql> create database lamp;

connection 3;
mysql> use test;
Database changed
mysql> create table u;

The results after the Restore completion is:

connection 1;

mysql> restore from '/data1/backup_dmp/big9';
ERROR 1661 (HY000): o MyISAM restore driver

The Restore fails

connection 2;
mysql> create database lamp;
ERROR 1006 (HY000): Can't create database 'lamp' (errno: 28)

connection 3;
mysql> use test;
Database changed
mysql> create table u(id int);
ERROR 3 (HY000): Error writing file './test/u.frm' (Errcode: 28)

In the connection 1, if we try to execute some create database statements after restore fails, the create statements also fails by giving error code 28. This shows that there is severe impact of failed Restore on Create statements.

connection 1;
mysql> create database bu;
ERROR 1006 (HY000): Can't create database 'bu' (errno: 28)
[11 Jun 2008 16:21] MySQL Verification Team
out of disk space?
[13 Jun 2008 15:29] Susanne Ebrecht
Hema,

many thanks for writing a bug report.

You always got error number 28. You can use perror to look what kind of error this is:

$ ./bin/perror 28
OS error code  28:  No space left on device

This is also documented here:
http://dev.mysql.com/doc/refman/5.0/en/perror.html