From: Ingo Strüwing Date: September 1 2009 8:08am Subject: Re: Meeting preparation [Re: Restore locking: TRUNCATE resets AUTO_INCREMENT on InnoDB] List-Archive: http://lists.mysql.com/backup/21 Message-Id: <4A9CD663.5060504@sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Hi Lars, Lars Thalmann, 01.09.2009 08:21: > Thanks for good summary. > > Isn't there a third alternative? > > a) Parse the CREATE TABLE statement in step 2, > b) Remember the auto-increment value, > c) Restore the auto-increment value at step 5.5. Thanks for the suggestion. I think, this is exactly what I mean in A.1. Sorry that my description is so nebulous. ... > On Mon, Aug 31, 2009 at 08:28:44PM +0200, Ingo Strüwing wrote: ... >> 1) Take BML (backup meta data lock) >> 2) Restore DDL (DROP/CREATE) >> 3) LOCK TABLES <> WRITE >> 4) TRUNCATE TABLES <> >> 5) Restore data >> 6) FLUSH TABLES >> 7) UNLOCK TABLES ... >> A.1) Since the value is part of the meta data of a table in the >> backup image, we could modify si_objects to save the value >> in a context object so that the value used to create the last >> table can be queried from si_objects. However, this means that >> si_objects will have to parse the serialization string. Regards Ingo -- Ingo Strüwing, Database Group Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Geschäftsführer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Häring HRB München 161028