Gabe,

There are actually some problems caused by how auto increments are tracked
in the database.  We do our backups by using mysqldump at night and
preserving all of the log files that were created during the day.  The
problem occurs during recovery where auto increment values can be
incremented even though a record wasn't stored.  In our case, that causes a
situation where we add a row in an agent table, then using the value of the
agent-id we create a number of rows in other tables.  However, when that
gets replayed in circumstances where we restore a mysqldump (effectively
placing us at a begin-of-day point), then replay logs, we will link the
subsequent records with other people rather than with the agent to whom they
are supposed to be linked.  It would be nice to have that resolved, but for
now we are redesigning some of our processes to avoid the issue.

Dave Christensen

-----Original Message-----
From: Tucker, Gabriel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 18, 2004 11:36 AM
To: Mysql General (E-mail)
Cc: Philip Antoniades (E-mail)
Subject: mysqldump and auto_increment


Hello

I am using MySQL v4.0.18.  I am using the mysqldump program to do backups.
I was wondering how, if at all, does mysqldump preserver the auto_increment
value?

When using phpmyadmin, there is an option to preserve the auto_increment
value and the resulting file has something like:
        ) TYPE=MyISAM COMMENT='Defines assignments' AUTO_INCREMENT=15 ; in
the create table definition.  When I run mysqldump and look at the resulting
file, I do not see anything like this.  Nor, can I find documentation on
what phpmyadmin is doing.

Thanks in advance!
Gabe

<><><><><><><><><><><><><><><><><><><><>><><>

"Arise Arise A Rose A Rose"

Gabriel Tucker

609 750 6668 - P
646 268 5681 - F

<><><><><><><><><><><><><><><><><><><><>><><>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to