List:General Discussion« Previous MessageNext Message »
From:Michael Dykman Date:April 15 2011 3:45pm
Subject:Re: Out of sync tables
View as plain text  
I presume you are inserting to both tables always at the same time
inside a transaction?  We would need to see the code to see how you
are inserting them..

Might I suggest, instead of the 2 part juggling act, you drop the
auto-increment property on your second table, and just use the value
derived from the first as the joining key in the second.  Then there
is only one sequence to worry about with nothing to sync against

 - michael dykman

On Fri, Apr 15, 2011 at 10:33 AM, Gary <gpaul@stripped> wrote:
> I have a innodb with a join on two tables.  The foreign key is the  id
> column which is set to AI.  I have been having an issue of the tables being
> out of sync in that the id is not the same on the two tables. I have
> corrected this a couple of times in phpmyadmin by resetting the
> auto_increment to the same number in both tables, but it is re-occurring.
>
> I have tried to duplicate how this occurs, and I believe it is occurring on
> a page refresh, but I am not positive.
>
> I don't know what information / code to post that someone would be able to
> make a suggestion to a solution, so if someone could direct me to what to
> post I would be appreciative.
>
>
> --
> Gary
>
>
>
> __________ Information from ESET Smart Security, version of virus signature database
> 6044 (20110415) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>



-- 
 - michael dykman
 - mdykman@stripped

 May the Source be with you.
Thread
Out of sync tablesGary15 Apr
  • Re: Out of sync tablesMichael Dykman15 Apr
  • Re: Out of sync tablesGary15 Apr
    • Re: Out of sync tablesReindl Harald15 Apr
      • Re: Out of sync tablesMichael Dykman15 Apr
  • Re: Out of sync tablesGary15 Apr
    • Re: Out of sync tablesReindl Harald15 Apr
    • Re: Out of sync tablesJohan De Meersman15 Apr
  • Re: Out of sync tablesGary15 Apr
    • Re: Out of sync tablesReindl Harald15 Apr
  • Re: Out of sync tablesGary15 Apr