Hi Jorgen,
The patch is good to push.
I think originally the code was written so that there could be "holes" in
m_snap[] array but now it is not the case.
Rafal
Jorgen Loland wrote:
> #At file:///localhome/jl208045/mysql/mysql-6.0-backup-review/
>
> 2683 Jorgen Loland 2008-08-13
> Bug#38769 - Backup: write table data does not stop iterating when all drivers
> are handled
>
> Fix: stop iteration that adds drivers to the scheduler when there are no more
> drivers in Image_info.m_snap
> modified:
> sql/backup/data_backup.cc
>
> per-file comments:
> sql/backup/data_backup.cc
> Stop add drivers to scheduler after info.snap_count() iterations
> === modified file 'sql/backup/data_backup.cc'
> --- a/sql/backup/data_backup.cc 2008-07-31 10:45:02 +0000
> +++ b/sql/backup/data_backup.cc 2008-08-13 13:05:12 +0000
> @@ -443,7 +443,7 @@ int write_table_data(THD* thd, Backup_in
>
> // add unknown "at end" drivers to scheduler, rest to inactive list
>
> - for (uint n=0; n < 256; ++n)
> + for (uint n=0; n < info.snap_count(); ++n)
> {
> Snapshot_info *i= info.m_snap[n];
>
>
>