<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi David,</p>
<p>the problem is not the sequence. The problem is doubled up ids
between the tables. If you try to move an entry with an id that
already exists in the deleted* or old* table, the data will get
lost. But doubled up ids are also likely to cause even more
trouble.</p>
<p>Katrin<br>
</p>
<br>
<div class="moz-cite-prefix">On 13.07.2017 05:07, David Cook wrote:<br>
</div>
<blockquote type="cite"
cite="mid:00a401d2fb85$34eac930$9ec05b90$@prosentient.com.au">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’ve
looked at the wiki page, but I haven’t looked at Bugzilla or
the source code. Why on Earth would we get lost data?
Shouldn’t we be copying the code to the “deleted*” tables
and THEN deleting it from the main table? <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">In
pre-5.7 versions, you could produce this same behaviour by
running OPTIMIZE on a table; it would reset the auto
increment counter for the table, and it would cause errors
because you couldn’t delete records because there was
already a record with that key in the deleted* table. <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Anyway,
I don’t have time to dwell at the moment, but just adding
that to the mix.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">David
Cook<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Systems
Librarian<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Prosentient
Systems<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">72/330
Wattle St<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Ultimo,
NSW 2007<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Australia<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Office:
02 9212 0899<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Direct:
02 8005 0595<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="EN-US">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="EN-US"> <a class="moz-txt-link-abbreviated" href="mailto:koha-devel-bounces@lists.koha-community.org">koha-devel-bounces@lists.koha-community.org</a>
[<a class="moz-txt-link-freetext" href="mailto:koha-devel-bounces@lists.koha-community.org">mailto:koha-devel-bounces@lists.koha-community.org</a>] <b>On
Behalf Of </b>Jonathan Druart<br>
<b>Sent:</b> Thursday, 13 July 2017 4:12 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a><br>
<b>Subject:</b> [Koha-devel] AUTO_INCREMENT fix - prevent
data lost<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi devs,<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Please
review and test <a
href="https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix"
moz-do-not-send="true">https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix</a><o:p></o:p></p>
</div>
<p class="MsoNormal">I have added a ref from the
Koha on Debian wiki page <a
href="https://wiki.koha-community.org/wiki/Koha_on_Debian#Further_Configuration"
moz-do-not-send="true">https://wiki.koha-community.org/wiki/Koha_on_Debian#Further_Configuration</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">It
sounds like I should add it somewhere more visible,
but do not find where, any ideas?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">See
also bug 18931 where I would like to add a warning on
the about page if data are corrupted.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Please
review quickly, that way we can share the tips on the
general mailing list.<o:p></o:p></p>
</div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<p class="MsoNormal">Jonathan<o:p></o:p></p>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
</blockquote>
<br>
</body>
</html>