Bug #56434 innobackup c fails in windows during ibbackup precheck.
Submitted: 1 Sep 2010 2:12 Modified: 4 Nov 2010 2:15
Reporter: Ritheesh Vedire Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Backup Severity:S1 (Critical)
Version:1.7.2 OS:Windows
Assigned to: Ritheesh Vedire CPU Architecture:Any

[1 Sep 2010 2:12] Ritheesh Vedire
In Windows,
Innobackup C fails during the checking the ibbackup in the system, and 
fails with the following output.

innobackup: IMPORTANT: Please check that backup run completes successfully.
              At the end of a successful 'backup' run innobackup
              prints "innobackup completed OK!".
Access is denied.
  innobackup: File '\sfk.1' not found (Errcode: 2)
  innobackup: Error: Execution of ibbackup failed

How to repeat:
Run innobackup like this.

innobackup --ibbackup=<path_to_ibbackup_binary>  <cnf file> <Backup root directory>

Suggested fix:
tmpnam_s() function returns the name of a temporary file which is for the current directory. innobackup C uses that as an absolute path. Hence the error.

So, replace tmpnam_s() function.
The following are the alternatives in hand,
1) Use Pipes
2) Use NUL 
3) Use the combination of GetTempPath() and GetTempFileName()
[7 Sep 2010 10:34] Thava Alagu
patch reviewed and it is OK to push.
[7 Sep 2010 19:35] Ingo Strüwing
Not approved. Please see email for required changes.
[17 Sep 2010 7:57] Ritheesh Vedire
Submitted a new patch.
[17 Sep 2010 15:04] Ingo Strüwing
Approved pending change. Please see email for required changes.
[4 Nov 2010 2:15] Paul DuBois
Bug does not appear in any released version. No changelog entry needed.