<div dir="ltr">On top of that by the time you get to that error you already have a primary key conflict, between biblios and deletedbiblios as an example, because the conflict is what causes the error.  There would be a lot of table that would have to be touched to resolve the key conflict in order to maintain data integrity.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 19, 2017 at 6:10 PM, Jonathan Druart <span dir="ltr"><<a href="mailto:jonathan.druart@bugs.koha-community.org" target="_blank">jonathan.druart@bugs.koha-community.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>From Koha/Database.pm<br> 89             RaiseError => $ENV{DEBUG} ? 1 : 0,<br><br></div>=> We do not raise  SQL errors.<br><br></div>The insert into old_issues fails, but the delete from issues is done anyway.<div><div class="h5"><br><div><div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, 19 Jul 2017 at 20:43 David Cook <<a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7476567313748657164m_3937406773062184909WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Jonathan,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I appreciate what you’re trying to do here, so I’m going to take a few minutes now to check through all of these links. <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I’ve been dealing with this issue on and off over the years due to our local use of OPTIMIZE: <a href="https://bugs.mysql.com/bug.php?id=18274" target="_blank">https://bugs.mysql.com/bug.<wbr>php?id=18274</a>.  I hadn’t realized that the auto_increment reset happens on server restarts as well until you mentioned it on the list. In any case, I’m glad to see your interest in this, because this really is a frustrating issue!<br><br>I still don’t understand why you’d have data lost, because you should get a fatal software error before anything is actually lost, and that should give you the opportunity to manually repair the increment counter and problematic IDs, but… I haven’t yet read all the links, so I’ll keep reading. Regardless of this fine point, I still think it is something worth fixing, so thanks again for your work on this one!<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I’ll let you know what I think/find after reviewing the links…<u></u><u></u></span></p></div></div><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7476567313748657164m_3937406773062184909WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">David Cook<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Systems Librarian<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Prosentient Systems<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">72/330 Wattle St<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Ultimo, NSW 2007<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Australia<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Office: <a href="tel:02%2092%2012%2008%2099" value="+33292120899" target="_blank">02 9212 0899</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Direct: <a href="tel:02%2080%2005%2005%2095" value="+33280050595" target="_blank">02 8005 0595</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p></div></div><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7476567313748657164m_3937406773062184909WordSection1"><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 href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@lists.koha-<wbr>community.org</a> [mailto:<a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@<wbr>lists.koha-community.org</a>] <b>On Behalf Of </b>Jonathan Druart<br><b>Sent:</b> Thursday, 20 July 2017 1:39 AM</span></p></div></div><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7476567313748657164m_3937406773062184909WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"><br><b>To:</b> <a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-<wbr>community.org</a><br><b>Subject:</b> Re: [Koha-devel] AUTO_INCREMENT fix - prevent data lost<u></u><u></u></span></p></div></div><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7476567313748657164m_3937406773062184909WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"></span></p><p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal">I did not get confirmation, so I am not sure you all understand how important is this fix.<u></u><u></u></p></div></div></div></div></div><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7476567313748657164m_3937406773062184909WordSection1"><div><div><p class="MsoNormal">We are going to fix properly and globally a long standing issue, and prevent data lost.<u></u><u></u></p></div></div></div></div><div link="blue" vlink="purple" lang="EN-AU"><div class="m_7476567313748657164m_3937406773062184909WordSection1"><div><p class="MsoNormal">I *really* want to see some of you to test this trick and confirm me that you agree on the solution and we can advertise it on the general Koha ML.<u></u><u></u></p><div><div><div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Wed, 12 Jul 2017 at 15:11 Jonathan Druart <<a href="mailto:jonathan.druart@bugs.koha-community.org" target="_blank">jonathan.druart@bugs.koha-<wbr>community.org</a>> wrote:<u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm"><div><div><div><div><div><div><div><div><div><p class="MsoNormal">Hi devs,<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></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" target="_blank">https://wiki.koha-community.<wbr>org/wiki/DBMS_auto_increment_<wbr>fix</a><u></u><u></u></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" target="_blank">https://wiki.koha-community.<wbr>org/wiki/Koha_on_Debian#<wbr>Further_Configuration</a><u></u><u></u></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?<u></u><u></u></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.<u></u><u></u></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.<u></u><u></u></p></div><p class="MsoNormal">Cheers,<u></u><u></u></p></div><p class="MsoNormal">Jonathan<u></u><u></u></p></div></blockquote></div></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-<wbr>community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.<wbr>org/cgi-bin/mailman/listinfo/<wbr>koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.<wbr>org/</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div>Michael Hafen<br></div>Washington County School District Technology Department<br></div>Systems Analyst<br><br></div></div></div></div>
</div>