Hema,
Thanks for a new patch, and for addressing my comments. There are
still some issues with the patch:
1. Checking backup times. As far as I can tell the latest patch does
not check that time recordings in history table are correct.
Instead, it just checks that it is less than 5 secs since backup
started.
> +SELECT timediff(now(),@start_backup) > 5;
I would expect @start_backup to be compared to the content of the
history table. E.g.,
SELECT timediff(start_time, @start_backup) > 5 from
mysql.backup_history where backup_id = @bup_id
(Or something like that. I have not actually tested it.)
Similar for the other timestamp columns. I think it would also be
good to verify that start_time <= vp_time <= stop_time.
2. I have so far only tested your perl script on Ubuntu where it
seemed to work. I will test on Solaris on Monday. Have you tested
on Windows? (I do not have a setup on Windows). I guess it is
because of Bug#37980 that you do actually compare the size to the
table column?
3. Your new verification of backup_id seems more complex than necessary.
> +# Test 1: Verifying backupid
> +Let $backup_id=`BACKUP DATABASE backup_logs TO 'backup_logs1.bak'`;
> +
> +--echo Get last backup_id
> +SELECT MAX(backup_id) INTO @bup_id FROM mysql.backup_history
> +WHERE command LIKE "BACKUP DATABASE backup_logs TO%";
> +
> +Let $backupid_history=`SELECT backup_id FROM mysql.backup_history
WHERE
> + backup_id=@bup_id`;
I do not understand why you need the above statement. Is it not
possible to compare directly with @bup_id in the statement below?
Or maybe you could do it in just two statements if you change the
second statement to
--eval SELECT MAX(backup_id) = $backup_id FROM mysql.backup_history
WHERE command LIKE "BACKUP DATABASE backup_logs TO%";
> +
> +LET $result=`SELECT $backupid_history = $backup_id AS are_identical`;
I think you should also echo the let statements since they are not
printed automatically and this makes it a bit difficult to
understand from the result file what is actually happening.
--
Øystein
Hema Sridharan wrote:
> #At file:///export/home/tmp/wl4229f/mysql-6.0-backup/ based on
revid:ingo.struewing@stripped
>
> 2741 Hema Sridharan 2008-12-17
> WL#4229(Test recording of backup and restore operations)
> Made some suggested changes as per Oysteins comments.
> modified:
> mysql-test/suite/backup/r/backup_errors.result
> mysql-test/suite/backup/r/backup_logs.result
> mysql-test/suite/backup/t/backup_errors.test
> mysql-test/suite/backup/t/backup_logs.test
...