[Koha-bugs] [Bug 1963] Problem with deleted biblio in a virtual shelf

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 16 18:24:28 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=1963

--- Comment #9 from Paul Poulain <paul.poulain at biblibre.com> ---
(In reply to comment #8)

> I disagree. Frédéric submitted a patch which fixes the constraint problem,
> but in the meantime, this is a good workaround for those libraries that have
> the problem. There is absolutely no reason why library patrons should have
> to deal with errors, ever.

Jared, it does not fix the constraint problem, it fixes the perl error.
The proper way to fix the problem is to issue 3 SQL commands:
1- delete all wrong entries
2- switch to innodb
3- add the constraint

* DELETE FROM virtualshefcontent WHERE biblionumber NOT IN (SELECT
biblio.biblionumber FROM biblio WHERE
biblio.biblionumber=virtualshelfcontent.biblionumber)
 * ALTER TABLE virtualshelfcontent ENGINE=innodb
 * ALTER TABLE virtualshelfcontent ADD CONSTRAINT ...

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


More information about the Koha-bugs mailing list