[Koha-bugs] [Bug 18428] Duplicate key error in old_reserves table.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 19 22:54:49 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18428

Barton Chittenden <barton at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major

--- Comment #1 from Barton Chittenden <barton at bywatersolutions.com> ---
The underlying problem is that innodb doesn't keep auto_increment across SQL
server restarts -- it simply sets auto_increment to max(reserves.reserve_id)+1
on startup.

Because the action of moving rows from reserves to old_reserves makes
old_reserves.reserve_id higher than reserves.reserve_id, rebooting the server
when it's in that state will create duplicate reserve_ids between reserves and
old_reserves.

since we treat deleted* tables the same way, we should also fix

select distinct table_name from information_schema.columns where table_name
like 'deleted%';  
+--------------------+
| table_name         |
+--------------------+
| deletedbiblio      |
| deletedbiblioitems |
| deletedborrowers   |
| deleteditems       |
+--------------------+

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list