Bug #39189 Backup: backup_backupdir.test fails in pushbuild
Submitted: 2 Sep 2008 14:26 Modified: 29 Sep 2008 17:25
Reporter: Jørgen Løland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:mysql-6.0-backup OS:Any
Assigned to: Jørgen Løland CPU Architecture:Any

[2 Sep 2008 14:26] Jørgen Løland
Description:
backup_backupdir.test fails on sapsrv1:

main.backup_backupdir          [ fail ]

mysqltest: At line 91: query 'BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/master_data/not/there/either/bup_backupdir6.bak';' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 1632...

The result from queries just before the failure was:
< snip >
BACKUP DATABASE bup_backupdir TO '../../bup_backupdir3.bak';
backup_id
#
Ensure backup image file went to the correct location
Reset backupdir with ending /
SET @@global.backupdir = '../tmp/backup/';
Perform backup
BACKUP DATABASE bup_backupdir TO '../../bup_backupdir4.bak';
backup_id
#
Ensure backup image file went to the correct location
Try a backup to an invalid relative path.
BACKUP DATABASE bup_backupdir TO '../not/there/bup_backupdir5.bak';
ERROR HY000: Can't write to backup location '../not/there/bup_backupdir5.bak' (file already exists?)

Try a backup to an invalid hard path.
*Actual BACKUP DATABASE command not printed due to non-deterministic path.
*Performing: 
*BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/master_data/not/there/either/bup_backupdir6.bak';
ERROR HY000: Lost connection to MySQL server during query

How to repeat:
Pushbuild on sapsrv1, not sure why this server fails and other linux servers don't.
[3 Sep 2008 8:12] Sveta Smirnova
Thank you for the report.

Please indicate tree bug is repeatable with.
[3 Sep 2008 9:32] Sveta Smirnova
Thank you for the feedback.

Verified as described.
[4 Sep 2008 11:17] MySQL Verification Team
See bug: http://bugs.mysql.com/bug.php?id=39224.
[4 Sep 2008 12: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/53251

2692 Jorgen Loland	2008-09-04
      Bug#39189 - Backup: backup_backupdir.test fails in pushbuild
      
      Old behavior: When giving hard path to backup command, a '/' was 
      appended at the end of the path (i.e., after the filename). 
      This was because the whole path was converted to fit the system. 
      
      New behavior: Only the directory name is converted to system. The
      filename is then appended without conversion.
[5 Sep 2008 12:50] 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/53339

2692 Jorgen Loland	2008-09-05
      Bug#39189 - Backup: backup_backupdir.test fails in pushbuild
            
      Old behavior: When giving hard path to backup command, a '/' was 
      appended at the end of the path (i.e., after the filename). 
      This was because the whole path was converted to fit the system. 
      In addition, convert_dirname crashed on some but not all 
      platforms when length was not specified.
            
      New behavior: Only the directory name is converted to system. The
      filename is then appended without conversion. Conversion is 
      done with explicit path length
[5 Sep 2008 13:03] Øystein Grøvlen
Patch approved.
[5 Sep 2008 14:58] Rafal Somla
Good to push.
[8 Sep 2008 7:24] 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/53477

2693 Jorgen Loland	2008-09-08
      Bug#39189 - Backup: backup_backupdir.test fails in pushbuild
                  
      Old behavior: When giving hard path to backup command, a '/' was 
      appended at the end of the path (i.e., after the filename). 
      This was because the whole path was converted to fit the system. 
      In addition, convert_dirname crashed on some but not all 
      platforms when length was not specified.
                  
      New behavior: Only the directory name is converted to system. The
      filename is then appended without conversion. Conversion is 
      done with explicit path length.
[8 Sep 2008 7:24] 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/53478

2693 Jorgen Loland	2008-09-08
      Bug#39189 - Backup: backup_backupdir.test fails in pushbuild
                  
      Old behavior: When giving hard path to backup command, a '/' was 
      appended at the end of the path (i.e., after the filename). 
      This was because the whole path was converted to fit the system. 
      In addition, convert_dirname crashed on some but not all 
      platforms when length was not specified.
                  
      New behavior: Only the directory name is converted to system. The
      filename is then appended without conversion. Conversion is 
      done with explicit path length.
[28 Sep 2008 19:25] Øystein Grøvlen
Pushed to 6.0 main for 6.0.8
[29 Sep 2008 17:25] Paul DuBois
Noted in 6.0.8 changelog.

For BACKUP DATABASE, the server could add a / character to the end of
the backup path, even when the path ended with a filename rather than
a directory name.