[Koha-devel] AUTO_INCREMENT fix - prevent data lost
David Cook
dcook at prosentient.com.au
Mon Jul 17 09:13:11 CEST 2017
Hi Katrin,
I think there must be some miscommunication here. I’ve experienced the doubled up IDs with reserves, and no data has been lost. It creates a fatal error, since the key already exists in the deleted/old table, and the whole process stops. If a person deleted the data out of the deleted/old table in order to perform the delete, then I could see data being lost, but that’s it. If there is data being lost (perhaps with a different tables than reserves), then something must be horribly wrong with the code to allow it to delete before checking that it can be copied/moved first. That’s all I’m saying.
In either case, it’s not good.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Direct: 02 8005 0595
From: koha-devel-bounces at lists.koha-community.org [mailto:koha-devel-bounces at lists.koha-community.org] On Behalf Of Katrin
Sent: Friday, 14 July 2017 7:00 PM
To: koha-devel at lists.koha-community.org
Subject: Re: [Koha-devel] AUTO_INCREMENT fix - prevent data lost
Hi David,
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.
Katrin
On 13.07.2017 05:07, David Cook wrote:
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?
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.
Anyway, I don’t have time to dwell at the moment, but just adding that to the mix.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Direct: 02 8005 0595
From: koha-devel-bounces at lists.koha-community.org <mailto:koha-devel-bounces at lists.koha-community.org> [mailto:koha-devel-bounces at lists.koha-community.org] On Behalf Of Jonathan Druart
Sent: Thursday, 13 July 2017 4:12 AM
To: koha-devel at lists.koha-community.org <mailto:koha-devel at lists.koha-community.org>
Subject: [Koha-devel] AUTO_INCREMENT fix - prevent data lost
Hi devs,
Please review and test https://wiki.koha-community.org/wiki/DBMS_auto_increment_fix
I have added a ref from the Koha on Debian wiki page https://wiki.koha-community.org/wiki/Koha_on_Debian#Further_Configuration
It sounds like I should add it somewhere more visible, but do not find where, any ideas?
See also bug 18931 where I would like to add a warning on the about page if data are corrupted.
Please review quickly, that way we can share the tips on the general mailing list.
Cheers,
Jonathan
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org <mailto:Koha-devel at lists.koha-community.org>
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20170717/2be309a6/attachment.html>
More information about the Koha-devel
mailing list