List:General Discussion« Previous MessageNext Message »
From:mos Date:June 19 2002 7:11pm
Subject:Re: Migration of a database from mSQL 2.x to MySQL 3.23.51
View as plain text  
At 01:44 PM 6/19/2002, you wrote:
>I don't see how AUTO_INCREMENT preserves its value in the output of a
>mysqldump.

The value of the auto-increment field is dumped along with the rest of the 
row data in the Values() list of the Insert statement. When the SQL script 
is run and the Insert statement is executed, the old auto-inc value is 
inserted into the table just like the rest of the values. You see, if the 
auto-inc value is provided in the Insert or Load statement, that value is 
used and a new auto-inc value IS NOT calculated. So you end up with the 
same auto-inc value at the time the mysqldump was done. If you examine the 
sql statements generated from the mysqldump, you'll see the old auto-inc 
values and everything should become clear. :)

Mike

Thread
Migration of a database from mSQL 2.x to MySQL 3.23.51Mark Hennessy19 Jun
  • Re: Migration of a database from mSQL 2.x to MySQL 3.23.51Gerald Clark19 Jun
    • Re: Migration of a database from mSQL 2.x to MySQL 3.23.51Mark Hennessy19 Jun
      • Re: Migration of a database from mSQL 2.x to MySQL 3.23.51Mark Hennessy21 Jun
        • Re: Migration of a database from mSQL 2.x to MySQL 3.23.51Joseph Bueno21 Jun
Re: Migration of a database from mSQL 2.x to MySQL 3.23.51mos19 Jun
  • Re: Migration of a database from mSQL 2.x to MySQL 3.23.51Keith C. Ivey19 Jun