[Koha-bugs] [Bug 7785] MySQL-specific syntax in C4::Members columns()

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 24 06:35:33 CEST 2013


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

Srdjan Jankovic <srdjan at catalyst.net.nz> changed:

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

--- Comment #18 from Srdjan Jankovic <srdjan at catalyst.net.nz> ---
Created attachment 19901
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19901&action=edit
[SIGNED-OFF] Bug 7785 - MySQL-specific syntax in C4::Members columns()

The initial thought was to remove this function. However,
tools/import_borrowers.pl uses it. So rather than remove
it to solve the problem, it was reworked to a more generic
solution which runs faster.

By accessing $sth->{NAME} directly, the driver becomes
responsible for filling it correctly. This happens when a SELECT
is done on the borrowers table. It does not even have to have
data in the result set!

The columns method could be more generic and used elsewhere too.
Comparison between the old method and the STH method showed a
significant time difference. The old method took 35 seconds
for 40k iterations versus 19 seconds for the same amount of
iterations with the STH method regardless of the size of the
borrowers table.

Signed-off-by: Srdjan <srdjan at catalyst.net.nz>

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


More information about the Koha-bugs mailing list