Bug Description

xtrabackup_init_temp_log() fails with "xtrabackup: No valid checkpoint found." if the only checkpoint present xtrabackup_logfile has 0 as its number. That is, in case the server is started and has to create new log files (so it writes the first checkpoint #0 on startup to the log file header), and the backup is performed before the next (i.e. 2nd checkpoint).

This started occurring in regression tests quite frequently after the test suite was modified to reduce the time between the server starts up and a backup process is started.

The root cause is the following check in xtrabackup_init_temp_log() which assumes no checkpoint #0 can be found in xtrabackup_logfile: