Description:
1) I create a database and also create some tables in the database
2) I attempt backup the database to the local file where disk is full.
3) I get the following error message:" file already exists", whereas action also creates a file in the backup location with file size shown as zero.
The error message should depict that 'DISK IS FULL' and no space available for backup, instead it gives out an error message, which is for DUPLICATE FILE.
How to repeat:
1)I create database and some tables in the database
2)I backup the database to the local file which is full(Full disk)
mysql> backup database err to '/tmp/errtt';
ERROR 1614 (HY000): Can't write to backup location '/tmp/errtt' (file already exists?)
Here as mentioned earlier the expected error message should be "Disk is full, so no space available for backup".
3)ndbdev@ndb16:/tmp> ls
backup_nw1 Big_TPCB2.dmp err1 err2 errtt T1.csv test1 uscreens
4)ndbdev@ndb16:/tmp> ls -lrt
total 1239856
drwxrwxrwt 3 ndbdev ndbdev 4096 Nov 20 01:35 uscreens
drwxrw-rw- 2 root root 4096 Feb 19 01:34 test1
-rwxrw-rw- 1 ndbdev ndbdev 10676 Feb 19 05:23 T1.csv
-rw-rw---- 1 ndbdev ndbdev 0 Feb 22 20:39 err1
-rw-rw---- 1 ndbdev ndbdev 0 Feb 22 20:40 err2
drwxrwxr-x 2 ndbdev ndbdev 4096 Feb 22 22:56 backup_nw1
-rw-r----- 1 root root 1268342784 Feb 23 01:32 Big_TPCB2.dmp
-rw-rw---- 1 ndbdev ndbdev 0 Feb 23 01:32 errtt
If you notice here the file name errt is created which has size shown to be zero.
Suggested fix:
Should give proper error message while doing backup in local file which is full(full disk)