<br><br><div class="gmail_quote">On Fri, Jan 23, 2009 at 1:45 PM, Shane Hathaway <span dir="ltr">&lt;<a href="mailto:shane@hathawaymix.org">shane@hathawaymix.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Shane Hathaway wrote:<br>
&gt; Assuming your bad script caused your problem, it is likely that packing<br>
&gt; will still mess up your database, since you still probably have mixed-up<br>
&gt; object_state rows. &nbsp;Don&#39;t pack until I&#39;ve had a chance to look again.<br>
<br>
</div>Here is some more analysis. &nbsp;Now that I understand you accidentally<br>
merged two databases into one by forcing copyTransactionsFrom() to run<br>
when it shouldn&#39;t, I looked for the transactions you merged. &nbsp;First I<br>
looked for the OIDs with a confused transaction ID.<br>
<br>
<br>
=&gt; select zoid from current_object where tid != (select max(tid) from<br>
object_state where object_state.zoid = current_object.zoid);<br>
 &nbsp;zoid<br>
------<br>
 &nbsp; &nbsp; 7<br>
 &nbsp; &nbsp;10<br>
 &nbsp; &nbsp;12<br>
 &nbsp; &nbsp;11<br>
 &nbsp; &nbsp; 9<br>
 &nbsp; &nbsp; 8<br>
(6 rows)</blockquote><div><br>Wow.&nbsp; All of that with some SQL.<br>&nbsp; <br>Out of curiosity what would be the process if you were using FileStorage to diagnose the same problem?&nbsp; Do the same thing by iterating over the entire storage and filling in some structures and doing the comparison manually?&nbsp; Sounds like it would take a few hours, with SQL -- it seems pretty straightforward.<br>
<br>I&#39;m impressed.<br></div></div><br>The sooner this gets into the mainline of ZODB -- the better.<br><br>