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

Thomas Klausner <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #181471|0                           |1
        is obsolete|                            |

--- Comment #57 from Thomas Klausner <[email protected]> ---
Created attachment 181997
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181997&action=edit
Bug 37020: (Followup) Fix txn handling, loop label and record_number counter

So, I reviewed the code, which has a bunch of issues:

* there's a call to `next RECORD`, but no `RECORD` loop label.
* $record_number is incremented twice
* and the calls to txn_begin is moved from the outside the loop into each
record, starting one transaction per record. Not sure how mysql handles this,
but postgres would not like it.

This patch fixes those issues:

After I fixed the first two issues, I ran the patched script on a file
containing 75 authorities (from GND), and not one was added to the DB,
presuambly because nested transactions don't work in mysql?

So I also moved the BEGIN transaction outside of the main loop and started a
new one after each commit, and added a final commit after to loop.

Signed-off-by: Jan Kissig <[email protected]>
Signed-off-by: Thomas Klausner <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to