]> git.koha-community.org Git - koha.git/commit
Bug 27012: Fix incorrect SQL syntax in hold merging
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Fri, 13 Nov 2020 10:07:22 +0000 (12:07 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 16 Nov 2020 12:45:07 +0000 (13:45 +0100)
commit8b21682c332b63afd3be74073e5eeaf531dadeac
treeeaa6995896bfd76a6a7b0a5cf03fdcc3d2f4823b
parenta408fcc0b662c31a8911728ab3d6816ada4c3491
Bug 27012: Fix incorrect SQL syntax in hold merging

If you merge two records with holds in them following error happens
without this patch:

[WARN] DBD::mysql::st execute failed: called with 4 bind variables when 3 are needed [for Statement "SELECT * FROM reserves WHERE biblionumber = ? AND (found <> ? AND found <> ? OR found is NULL) ORDER BY reservedate ASC" with ParamValues: 0=Null!, 1=Null!, 2=Null!] at /kohadevbox/koha/C4/Reserves.pm line 2002.

To test:
   1) Notice prove t/db_dependent/Reserves.t fails with above error
   2) Apply patch
   3) Notice prove t/db_dependent/Reserves.t passes

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Reserves.pm