List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:June 27 2007 5:12pm
Subject:RE: bk commit into 5.1 tree (cbell:1.2541)
View as plain text  
Rafal,

I have incorporated this change into the 5.2 patch for default_backup.

Chuck 

> -----Original Message-----
> From: Rafal Somla [mailto:rsomla@stripped] 
> Sent: Tuesday, June 26, 2007 9:22 AM
> To: cbell@stripped
> Cc: commits@stripped
> Subject: Re: bk commit into 5.1 tree (cbell:1.2541)
> 
> Chuck,
> 
> Sorry for telling this only now, but I think that table 
> locking during restore should be done before the drivers are 
> initialized (before the begin() call). 
> Thus I'd move the code collecting table list and locking 
> tables to the beginning:
> 
> > bool restore_table_data(THD*, Restore_info &info, IStream &s) {
> >   DBUG_ENTER("restore::restore_table_data");
> > 
> >   enum { READING, SENDING, DONE, ERROR } state= READING;
> > 
> >   // FIXME: when selective restores are implemented, check that
> >   // nothing was *selected* to be restored.
> > 
> >   if (info.img_count==0 || info.table_count==0) // nothing 
> to restore
> >     DBUG_RETURN(TRUE);
> > 
> >   result_t res;
> >   Restore_driver* drv[256];
> > 
> >   DBUG_ASSERT(info.img_count < 256);
> >
> 
> Here is a good place to collect table lists from default and 
> CS drivers and lock them. This would required a separate loop 
> to search for the two drivers but this is OK. Alternatively, 
> the Restore_info class could be modified to store positions 
> of these two images in the image list (filling them correctly 
> when the info is read from a stream).
> 
> >   for (uint no=0; no < info.img_count; ++no)
> >   {
> >     drv[no]= NULL;
> 
> Again, this is not a crucial change - the code should work as 
> it is now. But eventually (perhaps post-alpha) I'd like to do 
> it "the right way".
> 
> Otherwise the patch is fine.
> 
> Rafal
> 
> 
> --
> MySQL Code Commits Mailing List
> For list archives: http://lists.mysql.com/commits
> To unsubscribe:    
> http://lists.mysql.com/commits?unsub=1
> 

Thread
bk commit into 5.1 tree (cbell:1.2541)cbell21 Jun
  • Re: bk commit into 5.1 tree (cbell:1.2541)Rafal Somla26 Jun
    • RE: bk commit into 5.1 tree (cbell:1.2541)Chuck Bell27 Jun
    • RE: bk commit into 5.1 tree (cbell:1.2541)Chuck Bell27 Jun