[Koha-devel] AUTO_INCREMENT fix - prevent data lost

Katrin katrin.fischer.83 at web.de
Fri Jul 14 11:00:17 CEST 2017


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] *On Behalf Of 
> *Jonathan Druart
> *Sent:* Thursday, 13 July 2017 4:12 AM
> *To:* 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
> 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/20170714/9168203b/attachment.html>


More information about the Koha-devel mailing list